-
Notifications
You must be signed in to change notification settings - Fork 127
Installation: Agent
This part will guide you through the installation of the agent.
The prerequisites of Archipel Agent are a little bit more complicated than the ones for Client. You'll need :
- a decent version of Linux with the KVM module (fedora 13+ is great and fully tested)
- a decent version of qemu (0.12.5 is great, and included into fedora 13)
- a decent version of libvirt (0.8.7+) or trunk version.
- python 2.5, 2.6 or 2.7
- a shared folder between hypervisors if you want to use live migration (drive migration isn't ready in libvirt)
- qemu-img
- python setuptools, in order to be able to run easy_install
- python-imaging (PIL)
- python-numeric (numpy)
- libvirt python bindings
- subversion (sometimes needed to install some eggs dependencies)
- gcc (sometimes needed to install some eggs dependencies)
- python-devel (sometimes needed to install some eggs dependencies)
Mixing OS packaged versions of libraries with easy_install/pip can cause some installation problems (seen on Ubuntu), therefore it is recommended to try to not mix both methods when possible and use easy_install/pip.
You can choose between these two installation procedure
As root, run from your hypervisor:
# easy_install archipel-agent
Assuming you have a clone of the repo:
# easy_install apscheduler xmpppy sqlalchemy numpy
# cd /path/to/clone/ArchipelAgent/
# ./buildAgent -d
NOTE 1: Dependencies checking is disabled by buildAgent -d and the latest versions of master sources needs to install some dependencies. To be sure you have everything installed, run at least one time: easy_install apscheduler xmpppy sqlalchemy numpy python-magic
NOTE 2: If you want to encrypt XMPP communication using SSL, you need a more recent version of xmpppy. To install it from source : sudo pip install git+git://github.com/normanr/xmpppy.git
Whatever the installation procedure you choose, you must follow these steps.
To finish the Archipel installation:
# archipel-initinstall
The configuration file of Archipel agent can be found in /etc/archipel/archipel.conf
You must adapt some value to your system. To get information about this configuration file,
you can look at Archipel Agent's configuration file.
If you just installed your Ejabberd server, you need to create the following pubsub nodes to store stuff. Just run
# archipel-tagnode --jid=admin@FQDN --password=YOURPASSWORD --create
# archipel-rolesnode --jid=admin@FQDN --password=YOURPASSWORD --create
# archipel-adminaccounts --jid=admin@FQDN --password=YOURPASSWORD --create
# archipel-vmparkingnode --jid=admin@FQDN --password=YOURPASSWORD --create #!!! READ NOTE BELOW
# [OPTIONAL] archipel-vmrequestnode --jid=admin@FQDN --password=YOURPASSWORD --create
NOTE: Since May 7 2012, for Master code users, usage of
archipel-vmparkingnode
is no more required. The command has been removed. Parking is now using a shared sqlite3 for performance improvement.
If you want to use the vmparking feature, you need to declare your hypervisors as publisher. To do so, please do, for each hypervisor:
# archipel-vmparkingnode --jid=admin@FQDN --password=YOURPASSWORD -a hypervisor_jid@FQDN
More information about these tools can be found in the Tools page.
Finally go to /etc/archipel/archipel.conf
and replace the first token with your Ejabberd FQDN. Then run
# /etc/init.d/archipel start
If it doesn't start, try to manually run this command:
# runarchipel
In case of basic initialization errors, they will be printed in the terminal. Do not forget to kill the runarchipel process you have manually launch before restarting it from the init script
The logs will be printed into /var/log/archipel/archipel.log
. To be completely sure Archipel is up and your hypervisor is connected you can run:
# ejabberdctl connected_users
(in case of using Ubuntu you must always use sudo in front of ejabberdctl, otherwise you get a confusing error)
You should see at least an entry like [email protected]
After sucessfull installation, you can run the archipel-testxmppserver
script to performe some checks :
# archipel-testxmppserver --jid=admin@FQDN --password=YOURPASSWORD
The script will perform 10 connection commands with your XMPP Server ( ejabberd ):
Note : If you don't use ejabberd xmlrpc module, the last two tests will fail (xmlrpc and admin_extra). But don't worry, you can continue the installation process.
To update archipel-agent when a new egg is pushed, you just have to run
# easy_install -U archipel-agent
# /etc/init.d/archipel restart
You may want in certain circumstances also run
archipel-initinstall
if configuration file changed, but most of the time, you should not need to run this script again
Just go to your repository clone and perform:
# git pull
# /etc/init.d/archipel restart
You may want in certain circumstances also run
archipel-initinstall
if configuration file changed, but most of the time, you should not need to run this script again
Here is a small HOWTO with steps how to run Archipel as a not-root user.