public
Created

Example spoke + hub mcollective configuration. ActiveMQ 5.7.0 + MCollective 2.2

  • Download Gist
activemq-dc.xml
XML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
 
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.base}/conf/credentials.properties</value>
</property>
</bean>
 
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="us-east-1b" useJmx="true" schedulePeriodForDestinationPurge="60000">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" producerFlowControl="false"/>
<policyEntry queue="*.reply.>" gcInactiveDestinations="true" inactiveTimoutBeforeGC="300000" />
<policyEntry queue=">" optimizedDispatch="true"/>
</policyEntries>
</policyMap>
</destinationPolicy>
 
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
 
<plugins>
<statisticsBrokerPlugin/>
<simpleAuthenticationPlugin>
<users>
<authenticationUser username="amq" password="password" groups="admins,everyone"/>
<authenticationUser username="mcollective" password="password" groups="mcollective,everyone"/>
<authenticationUser username="admin" password="password" groups="mcollective,admin,everyone"/>
</users>
</simpleAuthenticationPlugin>
<authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
<authorizationEntry queue=">" write="admins" read="admins" admin="admins" />
<authorizationEntry topic=">" write="admins" read="admins" admin="admins" />
<authorizationEntry topic="mcollective.>" write="mcollective" read="mcollective" admin="mcollective" />
<authorizationEntry queue="mcollective.>" write="mcollective" read="mcollective" admin="mcollective" />
<authorizationEntry topic="us-east-1b.>" write="mcollective" read="mcollective" admin="mcollective" />
<authorizationEntry queue="us-east-1b.>" write="mcollective" read="mcollective" admin="mcollective" />
<authorizationEntry topic="ActiveMQ.Advisory.>" read="everyone" write="everyone" admin="everyone"/>
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
</plugins>
 
<systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage limit="2 gb"/>
</memoryUsage>
<storeUsage>
<storeUsage limit="4 gb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="400 mb"/>
</tempUsage>
</systemUsage>
</systemUsage>
 
 
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
<transportConnector name="stomp+nio" uri="stomp+nio://0.0.0.0:61613"/>
</transportConnectors>
</broker>
<import resource="jetty.xml"/>
</beans>
activemq-noc.xml
XML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
 
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.base}/conf/credentials.properties</value>
</property>
</bean>
 
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="noc" useJmx="true" schedulePeriodForDestinationPurge="60000">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" producerFlowControl="false"/>
<policyEntry queue="*.reply.>" gcInactiveDestinations="true" inactiveTimoutBeforeGC="300000" />
<policyEntry queue=">" optimizedDispatch="true"/>
</policyEntries>
</policyMap>
</destinationPolicy>
 
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
 
<networkConnectors>
<!-- noc -> us-east-1a -->
<networkConnector
name="us_east_1a-topics"
uri="static:(tcp://us-east-1a:61616)"
userName="amq"
password="password"
duplex="true"
decreaseNetworkConsumerPriority="true"
networkTTL="1"
prefetchSize="1"
dynamicOnly="true">
<excludedDestinations>
<queue physicalName=">" />
</excludedDestinations>
</networkConnector>
<networkConnector
name="us_east_1a-queues"
uri="static:(tcp://us-east-1a:61616)"
userName="amq"
password="password"
duplex="true"
decreaseNetworkConsumerPriority="true"
networkTTL="1"
prefetchSize="1"
dynamicOnly="true"
conduitSubscriptions="false">
<excludedDestinations>
<topic physicalName=">" />
</excludedDestinations>
</networkConnector>
 
<!-- noc -> us-east-1b -->
<networkConnector
name="us_east_1b-topics"
uri="static:(tcp://us-east-1b:61616)"
userName="amq"
password="password"
duplex="true"
decreaseNetworkConsumerPriority="true"
networkTTL="1"
prefetchSize="1"
dynamicOnly="true">
<excludedDestinations>
<queue physicalName=">" />
</excludedDestinations>
</networkConnector>
<networkConnector
name="us_east_1b-queues"
uri="static:(tcp://us-east-1b:61616)"
userName="amq"
password="password"
duplex="true"
decreaseNetworkConsumerPriority="true"
networkTTL="1"
prefetchSize="1"
dynamicOnly="true"
conduitSubscriptions="false">
<excludedDestinations>
<topic physicalName=">" />
</excludedDestinations>
</networkConnector>
 
<!-- noc -> us-east-1d -->
<networkConnector
name="us_east_1d-topics"
uri="static:(tcp://us-east-1d:61616)"
userName="amq"
password="password"
duplex="true"
decreaseNetworkConsumerPriority="true"
networkTTL="1"
prefetchSize="1"
dynamicOnly="true">
<excludedDestinations>
<queue physicalName=">" />
</excludedDestinations>
</networkConnector>
<networkConnector
name="us_east_1d-queues"
uri="static:(tcp://us-east-1d:61616)"
userName="amq"
password="password"
duplex="true"
decreaseNetworkConsumerPriority="true"
networkTTL="1"
prefetchSize="1"
dynamicOnly="true"
conduitSubscriptions="false">
<excludedDestinations>
<topic physicalName=">" />
</excludedDestinations>
</networkConnector>
 
<!-- noc -> us-east-1e -->
<networkConnector
name="us_east_1e-topics"
uri="static:(tcp://us-east-1e:61616)"
userName="amq"
password="password"
duplex="true"
decreaseNetworkConsumerPriority="true"
networkTTL="1"
prefetchSize="1"
dynamicOnly="true">
<excludedDestinations>
<queue physicalName=">" />
</excludedDestinations>
</networkConnector>
<networkConnector
name="us_east_1e-queues"
uri="static:(tcp://us-east-1e:61616)"
userName="amq"
password="password"
duplex="true"
decreaseNetworkConsumerPriority="true"
networkTTL="1"
prefetchSize="1"
dynamicOnly="true"
conduitSubscriptions="false">
<excludedDestinations>
<topic physicalName=">" />
</excludedDestinations>
</networkConnector>
</networkConnectors>
 
<plugins>
<statisticsBrokerPlugin/>
<simpleAuthenticationPlugin>
<users>
<authenticationUser username="amq" password="password" groups="admins,everyone"/>
<authenticationUser username="mcollective" password="password" groups="mcollective,everyone"/>
<authenticationUser username="admin" password="password" groups="mcollective,admin,everyone"/>
</users>
</simpleAuthenticationPlugin>
<authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
<authorizationEntry queue=">" write="admins" read="admins" admin="admins" />
<authorizationEntry topic=">" write="admins" read="admins" admin="admins" />
<authorizationEntry topic="mcollective.>" write="mcollective" read="mcollective" admin="mcollective" />
<authorizationEntry queue="mcollective.>" write="mcollective" read="mcollective" admin="mcollective" />
<authorizationEntry topic="us-east-1a.>" write="mcollective" read="mcollective" admin="mcollective" />
<authorizationEntry queue="us-east-1a.>" write="mcollective" read="mcollective" admin="mcollective" />
<authorizationEntry topic="us-east-1b.>" write="mcollective" read="mcollective" admin="mcollective" />
<authorizationEntry queue="us-east-1b.>" write="mcollective" read="mcollective" admin="mcollective" />
<authorizationEntry topic="us-east-1d.>" write="mcollective" read="mcollective" admin="mcollective" />
<authorizationEntry queue="us-east-1d.>" write="mcollective" read="mcollective" admin="mcollective" />
<authorizationEntry topic="us-east-1e.>" write="mcollective" read="mcollective" admin="mcollective" />
<authorizationEntry queue="us-east-1e.>" write="mcollective" read="mcollective" admin="mcollective" />
<authorizationEntry topic="ActiveMQ.Advisory.>" read="everyone" write="everyone" admin="everyone"/>
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
</plugins>
 
<systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage limit="2 gb"/>
</memoryUsage>
<storeUsage>
<storeUsage limit="4 gb"/>
</storeUsage>
<tempUsage>
<tempUsage limit="400 mb"/>
</tempUsage>
</systemUsage>
</systemUsage>
 
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
<transportConnector name="stomp+nio" uri="stomp+nio://0.0.0.0:61613"/>
</transportConnectors>
</broker>
<import resource="jetty.xml"/>
</beans>
client.cfg
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
# Main
topicprefix = /topic/
main_collective = mcollective
collectives = mcollective,us-east-1a,us-east-1b,us-east-1d,us-east-1e
libdir = /usr/libexec/mcollective
logger_type = console
loglevel = warn
 
# Plugins
securityprovider = aes_security
 
# Middleware
connector = activemq
plugin.activemq.base64 = yes
plugin.activemq.pool.size = 1
plugin.activemq.pool.1.host = mcollective-noc
plugin.activemq.pool.1.port = 61613
plugin.activemq.pool.1.user = mcollective
plugin.activemq.pool.1.password = password
plugin.activemq.pool.1.ssl = false
plugin.activemq.pool.1.ssl.fallback = false
 
# SSL Security
plugin.aes.client_private = /Users/jeremycarroll/.mc/jeremy-private.pem
plugin.aes.client_public = /Users/jeremycarroll/.mc/jeremy.pem
 
# Discovery
plugin.discovery.timeout = 10
 
# Direct Addressing
direct_addressing = 1
 
# Facts
factsource = yaml
plugin.yaml = /etc/mcollective/facts.yaml
server.cfg
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
#_ Main
topicprefix = /topic
main_collective = mcollective
collectives = mcollective,us-east-1b
libdir = /usr/share/mcollective/plugins
logfile = /var/log/mcollective.log
loglevel = info
daemonize = 1
 
#_ Security Provider
securityprovider = aes_security
 
#_ AES Security Plugin
plugin.aes.serializer = marshal
plugin.aes.send_pubkey = 0
plugin.aes.learn_pubkeys = 0
plugin.aes.client_cert_dir = /etc/mcollective/ssl/clients
plugin.aes.server_private = /var/lib/puppet/ssl/private_keys/us-east-1b
plugin.aes.server_public = /var/lib/puppet/ssl/public_keys/us-east-1b
plugin.aes.enforce_ttl = 1
 
#_ Middleware Configuration
connector = activemq
plugin.activemq.base64 = yes
plugin.activemq.pool.size = 1
plugin.activemq.pool.1.host = us-east-1b
plugin.activemq.pool.1.port = 61613
plugin.activemq.pool.1.user = mcollective
plugin.activemq.pool.1.password = password
plugin.activemq.pool.1.ssl = false
plugin.activemq.pool.1.ssl.fallback = false
direct_addressing = 1
 
#_ SimpleRPC Authorization
rpcauthorization = 1
rpcauthprovider = action_policy
plugin.actionpolicy.allow_unconfigured = 0
plugin.actionpolicy.enable_default = 1
plugin.actionpolicy.default_name = default
 
#_ Fact Provider
factsource = yaml
plugin.yaml = /etc/mcollective/facts.yaml

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.