Using Juju

Currently, we use a small wrapper around the juju command in order access the correct juju for the installation type. For example, running openstack-juju on a single install will make sure to run against the juju environment inside the toplevel container.

Running Juju outside of the OpenStack Cloud

You can add services to the existing deployment before switching over to your OpenStack private cloud.

Some examples of getting the status, deploying services, and adding units:

   1 # juju status
   2 $ openstack-juju status
   4 # Deploying a service
   5 $ openstack-juju deploy jenkins
   7 # Adding units
   8 $ openstack-juju add-unit mysql
  10 # Setting configuration options
  11 $ openstack-juju set mysql 'tuning-level=fast'
  13 # Getting configuration options
  14 $ openstack-juju get mysql

Juju inside your private cloud

Once the OpenStack cloud has been deployed there are only a couple of steps to enable juju to deploy charms into the private cloud.

Generate necessary image metadata for Juju to utilize:

   1 $ openstack-juju switch openstack
   2 $ openstack-juju metadata generate-image -i <image_id> -s trusty
   4 # Sync Juju tools and bootstrap onto your OpenStack private cloud:
   6 $ openstack-juju sync-tools
   7 $ openstack-juju bootstrap --metadata-source /home/ubuntu

Now you can deploy charms within your OpenStack cloud.

   1 $ openstack-juju deploy jenkins
   2 $ openstack-juju deploy -n 5 jenkins-slave
   3 $ openstack-juju add-relation jenkins jenkins-slave
   4 $ openstack-juju set jenkins password=AseCreTPassWoRd
   5 $ openstack-juju expose jenkins

OpenStack/Installer/using-juju (last edited 2015-10-21 12:38:42 by adam-stokes)