Puppet: Setting up mcollective on RHEL 7.0
Jump to navigation
Jump to search
System Setup
- Notes on the system setup
- Setup the puppetlabs repo
- disable selinux
[root@puppet ~]# rpm -qa | grep puppetlabs
puppetlabs-release-7-11.noarch
[root@puppet ~]# ls /etc/yum.repos.d/
puppetlabs.repo redhat.repo
[root@puppet ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.0 (Maipo)
[root@puppet ~]# getenforce
DisabledInstall the packages
yum install mcollective mcollective-common mcollective-client activemqSetup the activemq cfg files
- Enable the <createConnector> tag
[root@puppet activemq]# pwd
/etc/activemq
[root@puppet activemq]# diff activemq.xml activemq.xml.orig
65c65
< <managementContext createConnector="true"/>
---
> <managementContext createConnector="false"/>
130c130
< <!-- END SNIPPET: example -->
---
> <!-- END SNIPPET: example -->
\ No newline at end of file- Restart the activemq service
Test the ActiveMQ setup
[root@puppet activemq]# ps aux | grep activemq
activemq 17409 228 0.0 3957432 227928 ? Sl 22:50 0:04 java -Xms512m -Xmx512m -Djava.util.logging.config.file=logging.properties -Dhawtio.realm=activemq -Dhawtio.role=admins -Dhawtio.rolePrincipalClasses=org.apache.activemq.jaas.GroupPrincipal -Djava.security.auth.login.config=/etc/activemq/login.config -Dcom.sun.management.jmxremote -Djava.awt.headless=true -Djava.io.tmpdir=/usr/share/activemq/tmp -Dactivemq.classpath=/etc/activemq; -Dactivemq.home=/usr/share/activemq -Dactivemq.base=/usr/share/activemq -Dactivemq.conf=/etc/activemq -Dactivemq.data=/usr/share/activemq/data -jar /usr/share/activemq/bin/activemq.jar start
root 17457 0.0 0.0 112640 980 pts/0 S+ 22:50 0:00 grep --color=auto activemq
# JMX connector
[root@puppet activemq]# netstat -lptun | grep 1099
tcp6 0 0 :::1099 :::* LISTEN 17409/java
[root@puppet ~]# netstat -tulpn | grep 616
tcp6 0 0 :::61613 :::* LISTEN 17409/java
tcp6 0 0 :::61614 :::* LISTEN 17409/java
tcp6 0 0 :::61616 :::* LISTEN 17409/java- Check the output of activemq-admin list
[root@puppet activemq]# activemq-admin list
Java Runtime: Oracle Corporation 1.7.0_79 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.79-2.5.5.1.el7_1.x86_64/jre
Heap sizes: current=2010112k free=1989099k max=27810816k
JVM args: -Dactivemq.classpath=/usr/share/activemq/conf; -Dactivemq.home=/usr/share/activemq -Dactivemq.base=/usr/share/activemq -Dactivemq.conf=/usr/share/activemq/conf -Dactivemq.data=/usr/share/activemq/data
Extensions classpath:
[/usr/share/activemq/lib,/usr/share/activemq/lib/camel,/usr/share/activemq/lib/optional,/usr/share/activemq/lib/web,/usr/share/activemq/lib/extra]
ACTIVEMQ_HOME: /usr/share/activemq
ACTIVEMQ_BASE: /usr/share/activemq
ACTIVEMQ_CONF: /usr/share/activemq/conf
ACTIVEMQ_DATA: /usr/share/activemq/data
Connecting to JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
brokerName = localhostSetup the Mcollective cfgs
[root@puppet ~]# grep activemq /etc/mcollective/client.cfg
connector = activemq
plugin.activemq.pool.size = 1
plugin.activemq.pool.1.host = localhost
plugin.activemq.pool.1.port = 61613
plugin.activemq.pool.1.user = system
plugin.activemq.pool.1.password = manager
[root@puppet ~]# grep activemq /etc/mcollective/server.cfg
connector = activemq
plugin.activemq.pool.size = 1
plugin.activemq.pool.1.host = localhost
plugin.activemq.pool.1.port = 61613
plugin.activemq.pool.1.user = system
plugin.activemq.pool.1.password = manager- Restart the mcollective service
Test MCO
[root@puppet ~]# mco ping
puppet time=42.26 ms
---- ping statistics ----
1 replies max: 42.26 min: 42.26 avg: 42.26