Skip to content
Nicolas Ochem edited this page Apr 4, 2015 · 15 revisions

Archipel central agent is an optional module which enables advanced features of Archipel which need central coordination.

For example :

  • track the state of your hypervisors
  • when an hypervisor gets offline or becomes unavailable, start its VMs somewhere else
  • [TODO] high availability support
  • [TODO] platform statistics and accounting

It is an autonomous entity which you can start anywhere you want (typically, in your ejabberd server).

Installation

It is recommended to install central agent on the same server that runs ejabberd. But it could be anywhere else (i.e. one of your hypervisors).

From Puppet

The archipel::central_server class will install both ejabberd and the Central Agent on the same machine.

Follow this link for detailed instructions.

From published package on pypi

As root, run :

easy_install archipel-central-agent

From source :

First install the dependencies witch easy_install

easy_install sqlalchemy

Next proceed to installation

cd clone_of_archipel_repo/ArchipelAgent
./buildCentralAgent -d

Create the pubsub node for central agent

If not done so already during Archipel Agent installation, login to one hypervisor and type the command :

archipel-centralagentnode --jid=admin@FQDN --password=YOURPASSWORD --create

Finalize the installation by typing :

archipel-central-agent-initinstall -x your_ejabberd_server_FQDN

Configuring your agents

Hypervisor Agents

You need to configure your archipel agents to communicate with the central agent.

For this, in your agent, edit /etc/init.d/archipel.conf, and in the modules section, set "centraldb" and "vmparking" to True.

[MODULES]

action_scheduler            = True
centraldb                   = True
geolocalization             = True
hypervisor_health           = True
hypervisor_network          = True
hypervisor_vmcasts          = True
iphone_notification         = False
oomkiller                   = True
snapshoting                 = True
storage                     = True
virtualmachine_appliance    = True
vnc                         = True
xmppserver                  = True
vmparking                   = True  # needs centraldb to be activated

Central Agent

The configuration file for the central agent is in /etc/archipel/archipel-central-agent.conf

You can adjust the following parameters :

Distibuted mode

[CENTRALAGENT]
# centralagent can be :
#  - auto (default) : will be central agent if there is none already started
#  - force : will be central agent (be careful to configure only one of your hypervisors this way)
centralagent               = auto

"auto" is the default mode. In this mode, the central agent listens to a pubsub to check that another central agent is not in operation before launching. This way, you can create 2 central agents in order to make it highly available.

If you are sure you only want one central agent, you can switch "centralagent" parameter to "force" so that it will start a bit faster.

Central DB

The central agent stores all the platform information in a sqlite file.

# location of the central agent database. Must be readable by all central agent instances.
database                   = %(archipel_folder_lib)s/central_db.sqlite3
Clone this wiki locally