User Tools

Site Tools


juju-centos

This is an old revision of the document!


Using Juju and MaaS with CentOS

This page will describe how you can test running CentOS under Juju. This has been just merged so full support is not yet here. Some of the known issues are: no support for yum mirrors/proxies, no mongo tools(which implies no backups amongst other things). However most of the functionality of Juju should be here.

First off, to get started you should follow our other two tutorials:

http://wiki.cloudbase.it/maas

http://wiki.cloudbase.it/juju

This should 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.

  • Now we need to prepare a CentOS image. Get the maas-image-builder
$ 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 https://help.ubuntu.com/community/KVM/Installation for a guide on checking if it's enabled and installing it if necessary.
  • Run the command for creating the image

:!: This will probably take a very long time. You can do the rest of the juju configuration in the meantime. However, before bootstrapping a node with CentOS, the image should be uploaded to MaaS.

 # maas-image-builder -o centos7-amd64-root-tgz centos --edition 7
  • Import the image in MaaS
# maas <session-name> boot-resources create title=centos7 name=centos7 architecture=amd64/generic content@=centos7-amd64-root-tgz
  • While the image is uploading, you can create the tools and make them available to the MaaS machines. You do not need to create the trusty ones if they're already there.
$ 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
  • If you followed the previous tutorials you may have already generated the metadata. In that case there may be some bugs, so it is better to remove it first.
$ rm -rf ~/.juju/tools/streams
  • Generate the metadata and make it available locally
$ juju-metadata generate-tools
# cp -r ~/.juju/tools /var/www/html
# chmod -R 755 /var/www/html/tools
  • Now you should edit the environments.yaml file in ~/.juju. Make maas the default provider. Then in the section for maas configuration set:
agent-metadata-url: http://<MaaS-Machine-IP>/tools
  • If you want to bootstrap using a CentOS machine you also need to set:
default-series: 'centos7'
  • Moreover sometimes it might complain about not having an admin-secret. You can just provide a dummy one.
  • At this point you should be able to run:
juju bootstrap
  • Once this is complete you can deploy Juju charms on either Ubuntu, CentOS or Windows(provided you followed the previous tutorials fully).
juju-centos.1430856216.txt.gz · Last modified: 2015/05/05 23:03 by bteleaga