Skip to content
Cyril Peponnet edited this page Apr 6, 2016 · 15 revisions

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

For instance:

  • Manage XMPP users and Shared Roster Group
  • Fetch ejabberd users to use the permission module on hypervisor and vms
  • 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 source :

First install the dependencies witch easy_install

easy_install sqlalchemy

Next clone the Archipel repository

git clone https://github.com/ArchipelProject/Archipel.git
cd Archipel

Run pull.sh to get submodules

./pull.sh

Build the Central Agent in debug mode

cd Archipel/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