Juju gui access internal and external

On this video we will go through the step to get access to both internal and external JUJU gui's. This will help you greatly in troubleshooting issues with your openstack cloud.

Link to the videos:



14.04 stuff:

The site has helped me greatly:

From you MAAS server enter to export the JUJU home directory:
export JUJU_HOME=~/.cloud-install/juju

Then do juju status to see the machines and charms install:
juju status

Now lets install the juju gui here so it is easier to see what's going on, this command will install the gui along side juju on machine 0. Be careful as the juju gui is really the only thing you should run on the same machine as the juju bootstrap:

juju deploy --to 0 juju-gui

Now we do check the juju status on the juju gui, wait until the status says started:

juju status juju-gui

Status should look like this.
 juju-gui/0:
        agent-state: started
        agent-version: 1.22.1
        machine: "0"
        open-ports:
        - 80/tcp
        - 443/tcp
        public-address: node2780.maas

Note the DNS name on the MAAS node in the juju gui status, go to MAAS and find the IP of that MAAS node and enter it in your browser address bar:

The username for this external gui will be admin and the password will be the admin-secret that you used in you MAAS server ~/.juju/environments.yaml

From the MAAS server:
cat ~/.juju/environments.yaml

Now that you have the external JUJU gui exposed, you can now get the internal GUI setup.

Lets pull apart this giant command, you can run this all at once to make things easier:

 juju ssh landscape-server/0 sudo 'JUJU_HOME=/var/lib/landscape/juju-homes/`sudo ls -rt /var/lib/landscape/juju-homes/ | tail -1` sudo -u landscape -E bash'

You can ssh with juju to different juju charms/container machines as well as get information from juju charms:

Examples:
juju get nova-compute
juju get nova-cloud-controller
juju set nova-cloud-controller "key=value"
juju ssh keystone/0

Here we are using juju to ssh to landscape server which is an lxc container:
juju ssh landscape-server/0

The next part we set the new juju_home variable of the internal JUJU environment and list everything in juju-homes in reverse order and by order of modification, this will get your internal juju environment name mine is "1", then we tail it and ssh to it using landscape user and bash as our shell :
sudo 'JUJU_HOME=/var/lib/landscape/juju-homes/`sudo ls -rt /var/lib/landscape/juju-homes/ | tail -1` sudo -u landscape -E bash'

Now on the internal juju environment, juju status, this one will be much bigger:

juju status

Now lets put a gui on this machine 0 along side the juju bootstrap.

Currently to install the JUJU GUI on the internal side you need to login to the command line as root before you deploy the GUI, enter the command like this:

juju ssh landscape-server/0 sudo 'JUJU_HOME=/var/lib/landscape/juju-homes/`sudo ls -rt /var/lib/landscape/juju-homes/ | tail -1` sudo -u root -E bash'

Then you can deploy the GUI successfully.:

juju deploy --to 0 juju-gui

Now we do check the juju status on the juju gui, wait until the status says started:

juju status juju-gui

Status should look like this.
 juju-gui/0:
        agent-state: started
        agent-version: 1.22.1
        machine: "0"
        open-ports:
        - 80/tcp
        - 443/tcp
        public-address: node1780.maas

Now go to maas and lookup the IP address of the node where we put the juju gui on machine 0 and put it in the browser window.



To get you internal JUJU GUI password run this command from the internal JUJU command line, your username is still admin:
juju api-info --password password


No longer need below in RED

Again the username will be admin, but you notice below it tells you where to locate the password. We can use the same command to log into the landscape juju node, but you need to use the ubuntu user as it has access to use sudo to view the environments.yaml file:

From the maas server:
juju ssh landscape-server/0 sudo 'JUJU_HOME=/var/lib/landscape/juju-homes/`sudo ls -rt /var/lib/landscape/juju-homes/ | tail -1` sudo -u ubuntu -E bash'

From here cat the environments.yaml file, grab the admin-secret and stash is somewhere so you don't have to look it up again:
sudo cat /var/lib/landscape/juju-homes/1/environments.yaml

Now use that admin secret to log in to the gui.

 

16.04 conjure-up stuff:

The juju status  command will work right out of the box on the MAAS server.

On MAAS, if you want a juju GUI for "external" just do:

juju gui

Get into internal with this command as root:

 juju ssh landscape-server/0 sudo 'JUJU_DATA=/var/lib/landscape/juju-homes/`sudo ls -rt /var/lib/landscape/juju-homes/ | tail -1` sudo -u root -E bash'

Then switch to the non default controller with, here it is called controller:

juju switch controller

From here do a juju status to see the good stuff:

juju status

Now you can install the juju gui for the internal on machine 0 with this command:

juju deploy --to 0 juju-gui

The IP for the juju gui will be the one listed in juju status:

juju status juju-gui/0

Run this command to get your admin password, it will be at the bottom of the output:

juju show-controller --show-password





Comments