Juju bootstrap


#1

When I run juju bootstrap --constraints tags =juju mymaas maas-controller I get the error

ERROR failed to bootstrap model: cannot start bootstrap instance in availability zone “default”: failed to acquire node: No available machine matches constraints: [(‘agent_name’, [‘39287c02-44be-4f78-89e9-b40d8d25c332’]), (‘mem’, [‘3584’]), (‘zone’, [‘default’])] (resolved to “mem=3584.0 zone=default”)


#2

For my lab I’ve used the Interactive Mode of JUJU and run the following command, obviously you’ve to change with your data. From MAAS:

$: juju add-cloud
Since Juju 2 is being run for the first time, downloading latest cloud information. Fetching latest public cloud list... Your list of public clouds is up to date, see `juju clouds`. Cloud Types
   maas
   manual
   openstack
   oracle
   vsphere
 Select cloud type: maas
Enter a name for your maas cloud: maas-cloud 
Enter the API endpoint url: http://your_Maas_IP:5240/MAAS
Cloud "maas-cloud" 

In order to access our cloud, JUJU needs to know how to authenticate itself with MAAS and the way to make that is use the following command:

$: juju add-credential maas-cloud 
Enter credential name: rich 
Using auth-type "oauth1". 
Enter maas-oauth: (paste the MAAS Keys copied) 
Credential "rich" added locally for cloud "maas-cloud".
to list our credentials use:

then run the bootstrap

$: juju bootstrap --constraints tags=juju maas-cloud maas-controller --debug