For this setup, we’ll use the maas-server as the juju client to interact with the cluster.
This guide was very useful:
https://maas.ubuntu.com/docs/juju-quick-start.html
Update to the latest stable tools:
sudo apt-add-repository ppa:juju/stable sudo apt-get updateNext we want to setup juju on the host machine.
sudo apt-get install juju-coreCreate juju environment file.
juju initGenerate a specific MAAS API key by using the following link:
http://192.168.100.10/MAAS/account/prefs/
write the following to ~/.juju/environments.yaml replacing ‘maas api key’ with what was generated above:
default: vmaas environments: vmaas: type: maas maas-server: 'http://192.168.100.10/MAAS' maas-oauth: '<maas api key>' admin-secret: ubuntu # or something generated with uuid default-series: trustyNow let’s sync tools and bootstrap a node. Note, if you have multiple juju environments then you may need to specify ‘-e vmaas’ if it isn’t your default environment.
juju sync-tools juju bootstrap # add --show-log --debug for more outputSee if it works by using the following command:
juju statusYou should see something similar to the following:
~$ juju status environment: vmaas machines: "0": agent-state: down agent-state-info: (started) agent-version: 1.18.4 dns-name: maas-node-0.maas instance-id: /MAAS/api/1.0/nodes/node-e41b0c34-e1cb-11e3-98c6-5254001aae69/ series: trusty services: {}Now we can do a test deployment with the juju-gui to our bootstrap node.
juju deploy juju-guiWhile it is deploying you can type the following to get a log.
juju debug-logI wanted to be able to access the juju-gui from an ‘external’ address, so I edited /etc/networking/interfaces on that machine to have a static address:
juju ssh 0
sudo vim /etc/networking/interfacesAdd the following to the file:
auto eth0 iface eth0 inet static address 192.168.100.11 netmask 255.255.255.0Bring that interface up.
sudo ifup eth0The password can be found here on the host machine:
grep pass .juju/environments/vmaas.jenvIf you used the above configurations it should be ‘ubuntu’.
Log into the service so you can monitor the status graphically during the deployment.
If you get errors saying that servers couldn’t be reached you may have DNS configuration or proxy issues. You’ll have to first resolve these before using Juju. I’ve had is intermittent network issues in my lab. In order to workaround those physical issues you may have to retry the bootstrap, or increase the timeout values in ~/.juju/environments.yaml to use the following:
bootstrap-retry-delay: 5 bootstrap-timeout: 1200Now you’re cooking with juju.
This comment has been removed by the author.
ReplyDeleteGreat Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
ReplyDeletekvm hypervisor openstack