Skip to content

Installation: Agent

gbraad edited this page Sep 29, 2012 · 53 revisions

logo

This part will guide you through the installation of the agent.

Prerequisites

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)

Installation

You can choose between these two installation procedure

From published package on Pypi

As root, run from your hypervisor:

# easy_install archipel-agent

From the sources or nightlies

Assuming you have a clone of the repo:

# easy_install apscheduler xmpppy sqlalchemy numpy
# cd /path/to/clone/ArchipelAgent/
# ./buildAgent -d

IMPORTANT NOTE (2011/10/20): 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

Post install things

Whatever the installation procedure you choose, you must follow these steps.

Finalize installation

To finish the Archipel installation:

# archipel-initinstall

Tune the configuration.

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.

Create the pubsub nodes

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.

Start the agent

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

Logs and checks

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]

Testing communication

After sucessfull installation, you can run the archipel-test-xmppserver script to performe some checks.

test1

test2

The script will perform 10 connection commands with your XMPP Server ( ejabberd ):

test3

Update Archipel Agent

Update PyPi installation

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

Update Source installation

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

HOWTO run archipel not as root

Here is a small HOWTO with steps how to run Archipel as a not-root user.


Back to Installation Manual

Clone this wiki locally