Configuring for MAAS
Metal As A Service is software which allows you to deal with physical hardware just as easily as virtual nodes. For more information about MAAS, see maas.ubuntu.com
Get your API key
You'll need an API key from MAAS so that the Juju client can access it. Each user account in MAAS can have as many API keys as desired. One hard and fast rule is that you'll need to use a different API key for each Juju environment you set up within a single MAAS cluster.
To get the API key:
- Go to your MAAS preferences page, or go to your MAAS home page and choose Preferences from the drop-down menu that appears when clicking your username at the top-right of the page.
- Optionally add a new MAAS key. Do this if you're setting up another environment within the same MAAS cluster.
- Copy the key value - you will need it shortly!
Edit or create the configuration
Create or modify ~/.juju/environments.yaml with the following content:
maas:
type: maas
maas-server: 'http://xxyourMAASServernamexx:80/MAAS'
maas-oauth: '$MAAS_API_KEY'
admin-secret: 'nothing'
default-series: 'precise'
Substitute the API key from earlier into the $MAAS_API_KEY slot. You may need to modify the maas-server setting too; if you're running from the maas package it should be something like "http://hostname.xxxx.yyy/MAAS".