“Ubuntu 16.04 LTS Juju gui Server – part 2/8”

ubuntu-16-04-lts

For more informations about Juju we can view this link:

https://jujucharms.com/

or we can view this video

UBUNTU JUJU

1 STEP – ADD JUJU STABLE PPA

Make the upgrade of MaaS to have the last stable release installed

$: sudo add-apt-repository -yu ppa:juju/stable
$: sudo apt update
$: sudo apt-get dist-upgrade

2 STEP – INSTALL UBUNTU  JUJU

Run these commands

$: sudo snap install juju --classic

then

$: sudo snap refresh juju

3 STEP – CONFIGURE JUJU WITH MAAS

Lets begin with its configuration creating a file called maas-clouds.yaml

$: nano maas-clouds.yaml

and adding the following lines

clouds:
   maaslab:
      type: maas
      auth-types: [oauth1]
      endpoint: http://10.20.81.10:5240/MAAS

then

$: juju add-cloud maaslab maas-clouds.yaml
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`

to check that our cloud environment has been created run

$: juju list-clouds
Cloud        Regions  Default        Type        Description
aws               12  us-east-1      ec2         Amazon Web Services
aws-china          1  cn-north-1     ec2         Amazon China
aws-gov            1  us-gov-west-1  ec2         Amazon (USA Government)
azure             18  centralus      azure       Microsoft Azure
azure-china        2  chinaeast      azure       Microsoft Azure China
cloudsigma         5  hnl            cloudsigma  CloudSigma Cloud
google             4  us-east1       gce         Google Cloud Platform
joyent             6  eu-ams-1       joyent      Joyent Cloud
rackspace          6  dfw            rackspace   Rackspace Cloud
localhost          1  localhost      lxd         LXD Container Hypervisor
maaslab           0                 maas        Metal As A Service

then

$: juju add-credential maaslab 
Enter credential name: admin 
Using auth-type "oauth1" 
Enter maas-oauth:  
Credentials added for cloud testmaas

Now we can create a Juju controller with the bootstrap command,

$: juju bootstrap maaslab maaslab-controller --to juju.maas --debug

at the end of all the procedure of bootstrapping our JUJU will  deploy Juju Gui on that node and on shell we’ll have something like that:

.......
.......
00:23:05 DEBUG juju.juju api.go:263 API hostnames unchanged - not resolving
00:23:05 INFO  cmd cmd.go:129 Bootstrap complete, "testmaas-controller" controller now available.
00:23:05 INFO  cmd cmd.go:129 Controller machines are in the "controller" model.
00:23:05 INFO  cmd cmd.go:129 Initial model "default" added.
00:23:05 INFO  cmd supercommand.go:465 command finished

The Juju controller was called ‘maaslab-controller’, running this command to check that

$: juju list-controllers
Use --refresh flag with this command to see the latest information.
Controller            Model    User   Access     Cloud/Region  Models  Machines    HA  Version
maaslab-controller*   default  admin  superuser  testmaas       2         1        none  2.0.2 
the bootstrap will start the VM dedicated to Juju Gui.

and the node from deploying passed to deployed

6 STEP – INSTALL JUJU GUI

Then as last step to have Juju gui installed, run this command

$: juju gui
GUI 2.6.0 for model "admin/default" is enabled at:
https://10.20.81.1:17070/gui/u/admin/default
Your login credential is:
username: admin
password: b83b2c9fa000a16b43ddcfbeed69ad55

using that address with that credentials

to have the credentials run this one

$: juju gui --show-credentials 
Opening the Juju GUI in your browser.
Couldn't find a suitable web browser!
Set the BROWSER environment variable to your desired browser.
If it does not open, open this URL:
https://10.20.81.115:17070/gui/6ac598d4-0f9d-47e9-870a-53854b2f9b6a/
Username: admin
Password: 11454d1bfadcb555ac9ff8b42e083fbd

7 STEP – UPGRADE JUJU GUI

To have the last release of Juju gui we can use that command

$: juju upgrade-gui
fetching Juju GUI archive
uploading Juju GUI 2.7.5
upload completed
Juju GUI switched to version 2.7.5

the second part is done see you to next part.

<- part 1/8part 3/8 ->


“cya to the next 1…. Njoy !”
bye dakj

Disclaimer: All the tutorials included on this site are performed in a lab environment to simulate a real world production scenario. As everything is done to provide the most accurate steps to date, we take no responsibility if you implement any of these steps in a production environment.

“We learn from our mistakes”

Advertisements