juju version 2.0-beta1-trusty-amd64

juju list-controllers CONTROLLER MODEL USER SERVER

Why it is not listing any controllers. I have created a maas environment using quickstart -i. environments.yaml is also created as below.

I tried to switch the environment but getting the error. Here is the yaml file placed at /root/.juju/environments.yaml

default: maas 
default-series: trusty 
maas-oauth: <key pasted here from the maas GUI>
type: maas

When try to add a cloud using juju add-cloud its also giving the error:

error: Usage: juju add-cloud

where is the cloud.yaml file ? I have also tried:

juju add-cloud maas envoirnments.yaml 
ERROR open envoirnments.yaml: no such file or directory

but still no luck.

Can someone please mention the exact steps to setup juju2/MAAS? it appears juju2 has made some major changes. Bootstrapping is also not as it was before.


You'll need to create a new file; cloud.yaml is an arbitrary file name, and you can put it anywhere. The contents should look like this:

    type: maas
    auth-types: [oauth1]

Then run juju add-cloud my-maas <path/to/your/cloud-yaml/file> to add the cloud to Juju.

You'll then need to add a credential for this by editing ~/.local/share/juju/credentials.yaml, so it contains:

      auth-type: oauth1
      maas-oauth: <API token from MAAS>

In 2.0.0-beta2, you'll be able to add credentials interactively using "juju add-credential". You won't be expected to edit the credentials file directly.

Once you've got those two files set up, you should then be able to run:

juju bootstrap <controller-name> my-maas


Thanks alot. It worked for me. Here are my files settings and few more questions to proceed:

cloud.yaml file

   type: maas
   auth-types: [oauth1]

and ~/.local/share/juju/credentials.yaml file.

          auth-type: oauth1
          maas-oauth: <API KEY copied from MAAS>

It created a controller named as maas and cloud name also maas.

root@maas61:~# juju list-controllers 
maas*       maas   admin@local

root@maas61:~# juju list-models 
maas  admin@local  just now

To access the ssh of the bootstrapped node I used this command:

juju ssh ubuntu@ (.193 is the IP of the bootstrapped node)

ubuntu@node0:~$ whoami

Now I have 3 questions here.

1- I have 4 nodes in my MAAS setup. Why it picked the node0 to bootstrap. Is there any way we can choose among these or pass the node details ourself ? Please tell the command to configure some other node lets say nodex as boot strap. Currently it appears to pick the first node in the list to bootstrap by default.

2- Can we boot strap multiple nodes for redundancy ? If yes How ?

3- If I want to su to root user in node0 after login as ubuntu how I can do that?

ubuntu@node0:~$ su Password: su: Authentication failure ubuntu@node0:~$

Is there any way to get root level access of the bootstraped node?? If I want to access the node0 from some other system which does not have juju installed how can I do that ?

  • Please create separate questions (not as an answer to a question), so they're not missed, and so they're more easily discovered by others seeking the same answers. – axw Mar 13 '16 at 1:40

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.