Preparing the Systems

Installing juju

The first thing we need to do is install the requirements for juju. This is done as follows:

sudo apt-get install python-zookeeper python-virtualenv python-yaml python-txzookeeper

Now, we can either install juju from the repositories, or use the trunk branch which will contain the latest features and fixes. This is done as follows:

sudo apt-get install juju


bzr branch lp:juju

Configuring the Environment

Once juju is installed, we need to configure the environment that we are going to use. Remember that juju client needs to be able to contact the Orchestra Provisioning Server via a DNS name or an IP address, which means that can be both a public or private address.

The Environment

The environment is configured in ~/juju/environments.yaml. We first need to make sure the file exists and if not we need to create it as follows:

sudo mkdir -p ~/.juju
sudo vim ~/.juju/environments.yaml

The environment file should contain the following:

juju: environments
    type: orchestra
    # Specify the orchestra server
    orchestra-server: ''
    # Specify storage.
    storage-url: ''
    # Specify cobbler's user/pass
    orchestra-user: cobbler
    orchestra-pass: cobbler
    admin-secret: change-me-to-something-random
    # Mangement classes
    acquired-mgmt-class: orchestra-juju-acquired
    available-mgmt-class: orchestra-juju-available

Creating SSH Keys

juju also requires that SSH keys to be able to access the deployed nodes. In case the SSH keys do not exists, we can create them as follows:

ssh-keygen -t rsa


After we have configured the environment and made sure to add all the available systems for juju in Orchestra's Provisioning Server, then we can deploy. The first thing we need to do though, is to bootstrap and deploy the zookeeper node.


If we are using juju from the bzr branch, then we need to do the following:

cd juju/
export PYTHONPATH=`pwd`
./bin/juju bootstrap

On the other hand, if we are using Juju installed on the system, we simply do the following:

$ juju bootstrap

Deploying Services

Deploying services is similar to the bootstrap process. When using a branch we do as follows:

./bin/juju deploy --repository=examples mysql

When using from the installed package:

$ juju deploy --repository=examples mysql

Orchestra/Juju (last edited 2011-10-17 17:28:05 by 163)