-
Notifications
You must be signed in to change notification settings - Fork 127
Central agent
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).
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).
The archipel::central_server
class will install both ejabberd and the Central Agent on the same machine.
Follow this link for detailed instructions.
As root, run :
easy_install archipel-central-agent
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
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
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
The configuration file for the central agent is in /etc/archipel/archipel-central-agent.conf
You can adjust the following parameters :
[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.
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