Update code from https://github.com/dmi-try/marionette-collective
[packages/precise/mcollective.git] / website / reference / basic / gettingstarted.md
index 6a36e6cb0f05179fe3f5278f08940087135c24c5..bd1755de8a127f6f0796a92f15da68d93280d9cc 100644 (file)
@@ -4,6 +4,7 @@ title: Getting Started
 ---
 [Screencasts]: /mcollective/screencasts.html
 [ActiveMQ]: http://activemq.apache.org/
+[RabbitMQ]: http://www.rabbitmq.com/
 [EC2Demo]: /mcollective/ec2demo.html
 [Stomp]: http://stomp.codehaus.org/Ruby+Client
 [DepRPMs]: http://www.marionette-collective.org/activemq/
@@ -17,24 +18,24 @@ title: Getting Started
 [ControllingTheDaemon]: /mcollective/reference/basic/daemon.html
 [SSLSecurityPlugin]: /mcollective/reference/plugins/security_ssl.html
 [AESSecurityPlugin]: /mcollective/reference/plugins/security_aes.html
-[ConnectorStomp]: /mcollective/reference/plugins/connector_stomp.html
+[ConnectorActiveMQ]: /mcollective/reference/plugins/connector_activemq.html
+[ConnectorRabbitMQ]: /mcollective/reference/plugins/connector_rabbitmq.html
 [MessageFlowCast]: /mcollective/screencasts.html#message_flow
 [Plugins]: http://projects.puppetlabs.com/projects/mcollective-plugins/wiki
 [RedHatGuide]: gettingstarted_redhat.html
 [DebianGuide]: gettingstarted_debian.html
+[server_config]: /mcollective/configure/server.html
 
-*NOTE:* We are currently improving the Getting Started documentation.  Red Hat and CentOS users can refer to [our Redhat guide][RedHatGuide]. Debian users can refer to [our Debian guide][DebianGuide].
+*NOTE:* This is an older, deprecated version of the Getting Started documentation.  Red Hat and CentOS users can refer to [our Redhat guide][RedHatGuide]. Debian users can refer to [our Debian guide][DebianGuide]. Users on less common platforms should adapt one of those two instead of continuing to read this page.
 
 Below find a rough guide to get you going, this assumes the client and server is on the same node, but servers don't need the client code installed.
 
-For an even quicker intro to how it all works you can try our [EC2 based demo][EC2Demo]
-
 Look at the [Screencasts] page, there are [some screencasts dealing with basic architecture, terminology and so forth][MessageFlowCast] that you might find helpful before getting started.
 
 ## Requirements
 We try to keep the requirements on external Gems to a minimum, you only need:
 
- * A Stomp server, tested against [ActiveMQ]
+ * A Stomp server, tested against [ActiveMQ] and [RabbitMQ]
  * Ruby
  * Rubygems
  * [Ruby Stomp Client][Stomp]
@@ -42,9 +43,9 @@ We try to keep the requirements on external Gems to a minimum, you only need:
 RPMs for these are available [here][DepRPMs].
 
 ## ActiveMQ
-I've developed this against ActiveMQ.  It should work against other Stomp servers but I suspect if you choose
-one without username and password support you might have problems, please let me know if that's the case
-and I'll refactor the code around that.
+ActiveMQ is currently the most used middleware for MCollective, it would be our recommended choice and one
+that the community has most experience supporting.  There is a specific connector for RabbitMQ if you wish
+to go that route though - see [ConnectorRabbitMQ] for details.  This guide will focus on ActiveMQ.
 
 Full details on setting up and configuring ActiveMQ is out of scope for this, but you can follow these simple
 setup instructions for initial testing (make sure JDK is installed, see below for Debian specific issue regarding JDK):
@@ -129,8 +130,8 @@ And then you should add a user or two, to keep it simple we'll just add one user
         </systemUsage>
 
         <transportConnectors>
-            <transportConnector name="openwire" uri="tcp://0.0.0.0:6166"/>
-            <transportConnector name="stomp" uri="stomp://0.0.0.0:6163"/>
+            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
+            <transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
         </transportConnectors>
     </broker>
 </beans>
@@ -143,7 +144,7 @@ Save the above code as activemq.xml and run activemq as - if installing from a p
 Else your package would have a RC script:
 
 {% highlight console %}
-  # /etc/init.d/activemq start
+# /etc/init.d/activemq start
 {% endhighlight %}
 
 For further info about ActiveMQ settings you might need see [SecurityWithActiveMQ] and [ActiveMQClustering].
@@ -161,7 +162,7 @@ locations.  If you use the tarball you'll need to double check all the paths in
 You'll need to tweak some configs in */etc/mcollective/client.cfg*, a full reference of config settings can be
 found [here][ConfigurationReference]:
 
-Mostly what you'll need to change is the *identity*, *plugin.stomp.`*`* and the *plugin.psk*:
+Mostly what you'll need to change is the *identity*, *plugin.activemq.1.`*`* and the *plugin.psk*:
 
 {% highlight ini %}
   # main config
@@ -171,18 +172,19 @@ Mostly what you'll need to change is the *identity*, *plugin.stomp.`*`* and the
   identity = fqdn
 
   # connector plugin config
-  connector = stomp
-  plugin.stomp.host = stomp.your.net
-  plugin.stomp.port = 6163
-  plugin.stomp.user = unset
-  plugin.stomp.password = unset
+  connector = activemq
+  plugin.activemq.pool.size = 1
+  plugin.activemq.pool.1.host = stomp.your.net
+  plugin.activemq.pool.1.port = 61613
+  plugin.activemq.pool.1.user = unset
+  plugin.activemq.pool.1.password = unset
 
   # security plugin config
   securityprovider = psk
   plugin.psk = abcdefghj
 {% endhighlight %}
 
-You should also create _/etc/mcollective/server.cfg_ here's a sample, , a full reference of config settings can be found here [ConfigurationReference]:
+You should also create _/etc/mcollective/server.cfg_ here's a sample, a full reference of config settings can be found on the [Server Configuration Reference][server_config]:
 
 {% highlight ini %}
   # main config
@@ -196,11 +198,12 @@ You should also create _/etc/mcollective/server.cfg_ here's a sample, , a full r
   registerinterval = 300
 
   # connector plugin config
-  connector = stomp
-  plugin.stomp.host = stomp.your.net
-  plugin.stomp.port = 6163
-  plugin.stomp.user = mcollective
-  plugin.stomp.password = password
+  connector = activemq
+  plugin.activemq.pool.size = 1
+  plugin.activemq.pool.1.host = stomp.your.net
+  plugin.activemq.pool.1.port = 61613
+  plugin.activemq.pool.1.user = mcollective
+  plugin.activemq.pool.1.password = password
 
   # facts
   factsource = yaml
@@ -211,12 +214,12 @@ You should also create _/etc/mcollective/server.cfg_ here's a sample, , a full r
   plugin.psk = abcdefghj
 {% endhighlight %}
 
-Replace the *plugin.stomp.host* with your server running ActiveMQ and replace the *plugin.psk* with a Pre-Shared Key of your own.
+Replace the *plugin.activemq.pool.1.host* with your server running ActiveMQ and replace the *plugin.psk* with a Pre-Shared Key of your own.
 
-The STOMP connector supports other options like failover pools, see [ConnectorStomp] for full details.
+The ActiveMQ connector supports other options like failover pools, see [ConnectorActiveMQ] for full details.
 
 ### Create Facts
-By default - and for this setup - we'll use a simple YAML file for a fact source, later on you can use Reductive Labs Facter or something else.
+By default - and for this setup - we'll use a simple YAML file for a fact source, later on you can use Puppet Labs Facter or something else.
 
 Create */etc/mcollective/facts.yaml* along these lines:
 
@@ -252,7 +255,7 @@ your.domain.com
 
 This searches all systems currently active for ones with a fact *country=uk*, it got the data from the yaml file you made earlier.
 
-If you use confiuration management tools like puppet and the nodes are setup with classes with *classes.txt* in */var/lib/puppet* then you
+If you use configuration management tools like puppet and the nodes are setup with classes with *classes.txt* in */var/lib/puppet* then you
 can search for nodes with a specific class on them - the locations will configurable soon:
 
 {% highlight console %}
@@ -280,4 +283,3 @@ From here you should look at the rest of the wiki pages some key pages are:
  * [ControllingTheDaemon] - Controlling a running daemon
  * [AESSecurityPlugin] - Using AES+RSA for secure message encryption and authentication of clients
  * [SSLSecurityPlugin] - Using SSL for secure message signing and authentication of clients
- * [ConnectorStomp] - Full details on the Stomp adapter including failover pools