Skip to content
Raphaël De Giusti edited this page Sep 3, 2012 · 1 revision

Quick start guide

Basically, we're going to install a synapse-agent on a host and get some informations about that host with the synapse-client.

We need to install 3 major components:

  • RabbitMQ Server (v2.6.1)
  • The synapse agent (latest from synapse-dev repository)
  • The synapse client (latest from synapse-dev repository)

The following procedure has been tested with all 3 components on the same host (Centos 6.3). Some options, paths and URLs must be modified accordingly if you happen to try this on different hosts.

Add the comodit repository

rpm -ivh http://dl.comodit.com/pub/centos/6/x86_64/comodit-release-6-3.el6.noarch.rpm

Install the RabbitMQ Server

This server will relay any message between the client and the agent.

yum install rabbitmq-server

Start the rabbitmq-server.

service rabbitmq-server start

Install Synapse on the machine you want to manage

Then install the synapse agent on a host you want to manage remotely.

yum install synapse-agent

Start the agent:

synapse-agent -d

Stop it by calling:

synapse-agent stop

Retrieve its status:

synapse-agent status

Install the Synapse Client

From the same repository as above.

yum install synapse-client

Now, try to reach the host running the synapse-agent. By default, it will try to reach localhost

synapse-client hosts status --all

Note: This command will build a request in a json format, publish it into the amq.fanout exchange (by default), and wait for responses of consumers bound to that exchange (only one at the moment).

  • hosts: retrieve informations using the hosts collection. (get other available resources by typing synapse-client with no argument).
  • status: get the status of the host
  • --all: this is a synapse-client command line shortcut that bundles all available informations (ip, hostname, uptime, total memory, mac addresses, platform, ...)

If your RabbitMQ server is on another host, you can specify the --endpoint your.server.net option to the CLI.

The response should look like this:

INFO Discovered 1 host...

[test]
uptime        17 days, 18 hours, 43 minutes, 37 seconds
memtotal      1020852
ip            {'lo': '127.0.0.1', 'eth0': '192.168.5.139'}
hostname      ip139.angleur.guardis.be
mac_addresses {'lo': '00:00:00:00:00:00', 'eth0': '52:54:00:62:f2:ab'}
platform      ['centos', '6_2']

Congrats !

What next ?

  • You can now discover other available synapse-client command reading the man pages or calling for --help
  • Try installing the synapse-agent on another host, create another queue and bind it to the same exchange. You will now get 2 responses from asynapse-client request.