I created a node in MaaS from where I could ssh into it and installed juju. After passing the Juju boostrap command, the node was deployed but now I can no longer ssh into this deployed node. It returns with the error :
permission denied(publickey)
Also the ip address changed when deployed(not sure if that means anything, i can ping the new ip but cannot ssh into it)
When you ran the bootstrap command, Juju asked MAAS to redeploy the node with a fresh cloud image, and with ssh keys that Juju generated. You can access the node in one of two ways.
Switch to the controller model and juju ssh into the node:
juju switch controller
juju ssh 0
SSH to the node, using the key that juju generated:
CONTROLLER_IP=<copy and paste ip from maas gui>
ssh -i ~/.local/share/juju/ssh/juju_id_rsa $CONTROLLER_IP
The former is the most convenient. I included the latter just to illustrate that there’s nothing too strange going on under the hood. juju ssh is just a wrapper that saves you some typing, and ip address lookups.
I’m a bit new to this…what do you mean by switch to the controller model? Where do I pass those commands?
So I have my maas server where maas is installed and the maas node where juju is installed. So those commands would only work on the node where juju is installed but since I can’t access that node how would I be able to pass those commands?
The maas server doesn’t have juju installed on it.
I’m a bit new to this…what do you mean by switch to the controller model? Where do I pass those commands?
No worries! I’m happy to clarify.
I mean that you should run the commands from the machine from which you ran juju bootstrap. This might be your laptop, or might be a “jump box” somewhere in the cloud. This machine serves as a Juju client, which you can use to talk to the Juju controller that you bootstrapped.
Under normal circumstances, you don’t need to ssh into the juju controller. You run most Juju commands from the client.
If you have a special reason to ssh into the controller, let me know, and I can explain those commands in more depth. For now, the next steps are probably to use “juju deploy” and “juju relate” commands to install and integrate your cloud applications.
So I passed the juju bootstrap command on that node. As soon as I did, the connection to that node went and maas started deploying that node and assigned it a new IP(which im unable to ssh into, as per that documentation, i need to pass more juju based commands to install openstack basically) So yea…i have no clue where exactly to pass those commands you told me to, since the only place where juju based commands works is the node that i deployed…am I misunderstanding something?
Thank you for taking the time…I’m so confused lol…
Hi so yea I figured it out, sorry for that, thanks for explaining it so well, I basically passed the bootstrap command on the wrong machine(the node before deployment, so the client goes as soon as it deploys and I couldn’t pass those commands. Yea I’m an idiot haha) Thanks a lot!