ActiveMQ 和 HawtIO 已翻译 100%

oschina 投递于 2014/05/03 07:55 (共 5 段, 翻译完成于 05-03)
阅读 2849
收藏 2
1
加载中

We introduced HawtIO console as a tech preview in 5.9.0 ActiveMQ release, with an idea to replace the old and rusty web console in the distribution. Unfortunately, that idea didn’t go well with the rest of Apache community so it’s voted out and 5.9.1 is released without it. You can read more on the topic of distributing non-Apache developed web consoles in Apache projects in this (lengthy) thread if you’re interested.

Anyhow, there’s a lot of people out there who liked HawtIO and are asking questions on how to use it with the future (and some old) releases. So here, I’ll try to sum up different ways of how ActiveMQ and HawtIO can be used together.

已有 1 人翻译此段
我来翻译

HawtIO is pure JavaScript application that doesn’t have any server-side component. It uses Jolokia REST API to access managed servers. As a pure JavaScript application it’s possible to package it as a Chrome application, so you can run HawtIO locally in your browser. Take a look at the HawtIO Get Started guide on how to do this.

Once, you have your console running you can use it to connect to any remote broker, running management REST API (5.8.0 and newer). Take a look at this connect form

activemq-hawtio1

已有 1 人翻译此段
我来翻译

You can notice that management API uses /api/jolokia/ path and that by default ActiveMQ web server is listening on port 8161. Just click Connect to remote server and you’ll have the access to the broker.

activemq-hawtio2

The nice thing is that you can save different broker settings in the application, so it’s easy to connect to any of the brokers you have in your environment with the single click.

activemq-hawtio3

So, if you’re a Chrome user or willing to use Chrome apps in this way, there’s really nothing stopping you from accessing remote brokers from your local HawtIO instance.

已有 1 人翻译此段
我来翻译

If this solution is not ideal for you, you can always embed the console back in your ActiveMQ installation. Luckily, it’s very easy thing to do.

First, you need to download Hawtio default war, presumably in the webapps/ directory of your installation

cd webapps
wget http://central.maven.org/maven2/io/hawt/hawtio-default/1.3.1/hawtio-default-1.3.1.war

Now, add appropriate web application context to the web server, by adding something lile

<bean class="org.eclipse.jetty.webapp.WebAppContext">
    <property name="contextPath" value="/hawtio" />
    <property name="war" value="${activemq.home}/webapps/hawtio-default-1.3.1.war" />
    <property name="logUrlOnStart" value="true" />
</bean>

to the etc/jetty.xml

The final step is to configure HawtIO authentication and adjust it to the broker’s one. This is done by providing the following system properties

-Dhawtio.realm=activemq -Dhawtio.role=admins 
-Dhawtio.rolePrincipalClasses=org.apache.activemq.jaas.GroupPrincipal

The easiest way to do it, is to add them to the ACTIVEMQ_OPTS variable in the bin/activemq startup script.

已有 1 人翻译此段
我来翻译

Now, run your broker and enjoy the hawtness.

Finally, if you’re interested in a great platform for running ActiveMQ and other integration technologies (HawtIO included), you should definitely give fabric8 a try. It provides an easy way to provision, configure and manage vast array of integration endpoints (broker included).

Or if you prefer standalone broker installation, you can try RedHat distributions that still come with the HawtIO included by default.

So, even if HawtIO is not distributed with ActiveMQ, you can easily use it in number of different setups depending solely on your preference.

已有 1 人翻译此段
我来翻译
本文中的所有译文仅用于学习和交流目的,转载请务必注明文章译者、出处、和本文链接。
我们的翻译工作遵照 CC 协议,如果我们的工作有侵犯到您的权益,请及时联系我们。
加载中

评论(1)

qwfys
qwfys
不错,
返回顶部
顶部