Table of Contents

Using Juju and MaaS with CentOS

Initial support has landed in Juju's master branch for CentOS 7 and is planned to be released with version 1.24. Keep in mind that this is an initial release and there are slight differences from using Juju with Ubuntu, which will be discussed later on.

To start off, you should follow our previous two tutorials on setting up our testing environment:

MaaS installation guide

Juju installation guide

This will give you a ready to go MaaS and Juju environment. Make sure you can bootstrap a trusty state machine before following the next steps to make debugging easier.

Generating MaaS images for CentOS 7

There is a nice project made available by Canonical that will facilitate the creation of a new CentOS image compatible with MaaS. We are using MaaS to test this, because it's the easiest way to have a locally working testing environment. Due to limited support for container-based CentOS deplyments, we cannot use the local provider yet. More details on that will be provided as they arise.

Lets get a local copy of maas-iumagebuilder:

bzr branch lp:maas-image-builder
cd maas-image-builder
python setup.py install

You may need to change the python-stevedore dependency to stevedore in setup.py for the installation to work. Once the image builder is installed, you need to make sure KVM works on the Ubuntu machine that you're building the image on. Have a look at this guide for instructions on checking if it's enabled and installing it if necessary.

maas-image-builder -o centos7-amd64-root-tgz centos --edition 7

:!: This will probably take a very long time. You can pass on to configuring Juju, but make sure you stop before issuing the `juju boostrap` command and come back here to upload the image to MaaS.

maas <session-name> boot-resources create title=centos7 name=centos7 architecture=amd64/generic content@=centos7-amd64-root-tgz

Create jujud agent tools

mkdir -p ~/.juju/tools/releases
cd ~/.juju/tools/releases
cp ~/golang/bin/jujud* .
tar -czf juju-1.24-centos7-amd64.tgz jujud
tar -czf juju-1.24-trusty-amd64.tgz jujud
rm jujud
rm -rf ~/.juju/tools/streams
juju-metadata generate-tools
cp -r ~/.juju/tools /var/www/html
chmod -R 755 /var/www/html/tools

Editing your environments.yaml

agent-metadata-url: http://<MaaS-Machine-IP>/tools
default-series: 'centos7'
juju bootstrap

Limitations

While these issues are present in this initial release, we are working on remedying them as soon as possible. Some may take longer then others, but we do want to have 1:1 feature set on all supported platforms.