Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to test MAAS + JUJU + OpenStack (I followed the documentation on maas.ubuntu.org)

I already made a test environment:

  • 1 MAAS server wich will also run JuJu
  • 10 KVM servers for Openstack

The KVM servers are already in "ready" state in MAAS.

I would like to set up JuJu but i could not which is drives me crazy.

My environments.yaml:

environments:
maassrv:
type: maas
maas-server: 'http://${192.168.1.116}/MAAS/'
maas-oauth: 'my-key-from-maas'
authorized-keys-path: /root/.ssh/id_rsa.pub
admin-secret: 1234
default-series: trusty

When I run juju status -e maassrv :

ERROR Unable to connect to environment "maassrv".
Please check your credentials or use 'juju bootstrap' to create a new environment.

Error details:
environment "maassrv" not found

OK, it's right, so i should run juju bootstrap -e maassrv:

ERROR environment "maassrv" not found

When i run the command without the -e switch:

error: no environment specified

So, I am stuck here, I already added the required ssh keys to maas too. I ran out of ideas why it isn't working.

I did not use '${}' form in my config file (the forum did not allow me to post that line without it :) ). So it exactly looks like you adviced to modify.

When i run juju bootstrap -e maas --debug

2014-06-10 08:34:11 INFO juju.cmd supercommand.go:302 running juju-1.18.4-trusty-amd64 [gc]
2014-06-10 08:34:11 ERROR juju.cmd supercommand.go:305 environment "maas" not found

juju status -e maas --debug gives me this, this is OK, there is no maas environment...but i can't create is...it's a trap :)

2014-06-10 08:39:09 INFO juju.cmd supercommand.go:302 running juju-1.18.4-trusty-amd64 [gc]
2014-06-10 08:39:09 DEBUG juju api.go:179 no cached API connection settings found
2014-06-10 08:39:09 ERROR juju.cmd supercommand.go:305 Unable to connect to environment "maas".
Please check your credentials or use 'juju bootstrap' to create a new environment.
Error details:
environment "maas" not found

Follow up:

I managed to run juju bootstrap (had to create a maas user). Which command failed again, so I had to run

juju sync-tools --show-log

Then rerun juju bootstrap which is failed again

The sympton: when I ran juju bootstrap it will pick up a random machine eg: maas-10, starts the machine and install the operating system, then swit it off and gave me this as result:

DEBUG juju.utils.ssh ssh_openssh.go:122 running: ssh -o "StrictHostKeyChecking no" -o "PasswordAuthentication no" -i /home/maas/.juju/ssh/juju_id_rsa -i /home/maas/.ssh/id_rsa ubuntu@192.168.200.114 /bin/bash
ERROR juju.provider.common bootstrap.go:123 bootstrap failed: waited for 10m0s without being able to connect: 
Permission denied (publickey,password).
Stopping instance...
INFO juju.cmd cmd.go:113 Bootstrap failed, destroying environment
INFO juju.provider.common destroy.go:14 destroying environment "maas"
ERROR juju.cmd supercommand.go:305 waited for 10m0s without being able to connect:    
Permission denied (publickey,password).`

It is weird, i added maas user's public key to MAAS API so that should be OK. During the install process the installed server should import the key?!

share|improve this question
    
Looks like you called your environment 'maassrv' so then you'd need to pass that to the juju bootstrap command. For example: juju bootstrap -e maassrv --debug –  Diogo Matsubara Jun 10 at 15:49

1 Answer 1

Try removing the ${} from the maas-server address. It should then look like:

maassrv:
  type: maas
  maas-server: 'http://192.168.1.116/MAAS/'
  maas-oauth: 'your-key-from-maas'
  admin-secret: 1234
  default-series: trusty
  authorized-keys-path: /root/.ssh/id_rsa.pub

If that fails, run juju with the --debug and paste the output in your question. E.g. juju bootstrap -e maassrv --debug

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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