Juju installation (release 0): Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
No edit summary
Line 2: Line 2:


=VM creation=
=VM creation=
* Juju Server
* Juju Server and Client (single VM)
**Minimum Requirements:
**Minimum Requirements:
*** 4 vCPU
*** 4 vCPU
*** 4GB RAM
*** 4GB RAM
*** 40GB disk
*** 40GB disk
*Base image: ubuntu-14.04.4-server-amd64


* Juju Client
In case you want to install them in separate VMs, the minimum requirements are:
** Minimum Requirements:
* Juju Server:
*** 2 vCPU
** 4 vCPU
*** 2GB RAM
** 4GB RAM
*** 20GB disk
** 40GB disk
 
* Juju Client:
*Base image: ubuntu-14.04.4-server-amd64
** 2 vCPU
** 2GB RAM
** 20GB disk
*Base image in both cases: ubuntu-14.04.4-server-amd64


=Installing required packages and libraries=
=Installing required packages and libraries=
==Install Juju Server==
==Install Juju Server==
*Create a user (e.g. user juju, pwd juju) and add it to the sudo group.
*Create a user (e.g. user osm, pwd osm) and add it to the sudo group.
  sudo adduser juju
  sudo adduser osm
  usermod -a -G sudo juju
  usermod -a -G sudo osm
*Install packages for Juju Server
*Install packages for Juju Server
  sudo apt-get install systemd-services lxc
  sudo apt-get install systemd-services lxc
Line 26: Line 30:
For instance, in order to use the subnet 10.0.3.0/24, you could make the following configuration:
For instance, in order to use the subnet 10.0.3.0/24, you could make the following configuration:
  LXC_BRIDGE="lxcbr0"  
  LXC_BRIDGE="lxcbr0"  
  LXC_ADDR="10.10.3.1"
  LXC_ADDR="10.0.3.1"
  LXC_NETMASK="255.255.255.0"
  LXC_NETMASK="255.255.255.0"
  LXC_NETWORK="10.0.3.0/24"
  LXC_NETWORK="10.0.3.0/24"
Line 33: Line 37:


==Install Juju Client==
==Install Juju Client==
On the Juju client VM
*Install packages for Juju Client
*Install packages for Juju Client
  sudo add-apt-repository ppa:juju/stable
  sudo add-apt-repository ppa:juju/stable
  sudo apt-get update
  sudo apt-get update
  sudo apt-get install juju juju-local juju-quickstart charm-tools
  sudo apt-get install juju juju-local juju-quickstart charm-tools squid-deb-proxy


* Setup squid-deb-proxy
=Configuration=
  sudo apt-get install squid-deb-proxy
*In the Juju client, edit /etc/squid-deb-proxy/mirror-dstdomain.acl to add the following lines:
# launchpad personal package archives (disabled by default)
  ppa.launchpad.net
private-ppa.launchpad.net


=Configuration=
*In the Juju client, Restart squid-deb-proxy
*In the Juju client, create file .juju/environments.yaml:
sudo service squid-deb-proxy restart
 
*In the Juju client, create file .juju/environments.yaml using the appropriate IP address for the bootstrap host (the Juju server IP address) and for the squid proxy (either the IP address of the LXC bridge - 10.0.3.1 - in case of a single-VM installation, or the IP address of the Juju client in case server and client are running in different VMs).
  default: osm0-manual
  default: osm0-manual
  environments:
  environments:
   osm0-manual:
   osm0-manual:
     admin-secret: juju
     admin-secret: osm
     bootstrap-host: 10.11.12.13
     bootstrap-host: <jujuserver-ip>
     bootstrap-user: juju
     bootstrap-user: osm
     default-series: trusty
     default-series: trusty
     type: manual
     type: manual
     enable-os-refresh-update: False
     enable-os-refresh-update: False
     enable-os-upgrade: False
     enable-os-upgrade: False
     apt-http-proxy: http://<juju-client>:8000
     apt-http-proxy: http://<proxy-ip>:8000
     apt-https-proxy: http://<juju-client>:8000
     apt-https-proxy: http://<proxy-ip>:8000
*Bootstrap the environment:
*Bootstrap the environment:
  juju bootstrap -v    # -v so you can see what's going on
  juju bootstrap -v    # -v so you can see what's going on
*Test the environment deploying juju-gui:
juju deploy juju-gui --to 0
*Access juju-gui through the web browser (https://<jujuserver-ip>)
*Additional commands:
*Additional commands:
  juju debug-log        # open this in another terminal or tab, so you can see what juju is doing while you type other commands
  juju debug-log        # open this in another terminal or tab, so you can see what juju is doing while you type other commands

Revision as of 15:44, 25 May 2016

VM creation

  • Juju Server and Client (single VM)
    • Minimum Requirements:
      • 4 vCPU
      • 4GB RAM
      • 40GB disk
  • Base image: ubuntu-14.04.4-server-amd64

In case you want to install them in separate VMs, the minimum requirements are:

  • Juju Server:
    • 4 vCPU
    • 4GB RAM
    • 40GB disk
  • Juju Client:
    • 2 vCPU
    • 2GB RAM
    • 20GB disk
  • Base image in both cases: ubuntu-14.04.4-server-amd64

Installing required packages and libraries

Install Juju Server

  • Create a user (e.g. user osm, pwd osm) and add it to the sudo group.
sudo adduser osm
usermod -a -G sudo osm
  • Install packages for Juju Server
sudo apt-get install systemd-services lxc
  • If required, edit the file /etc/default/lxc-net to change the lxc network addressing. This is only needed if there is overlapping with other network interfaces used by the Juju Server.

For instance, in order to use the subnet 10.0.3.0/24, you could make the following configuration:

LXC_BRIDGE="lxcbr0" 
LXC_ADDR="10.0.3.1"
LXC_NETMASK="255.255.255.0"
LXC_NETWORK="10.0.3.0/24"
LXC_DHCP_RANGE="10.0.3.2,10.0.3.254"
LXC_DHCP_MAX="253"

Install Juju Client

  • Install packages for Juju Client
sudo add-apt-repository ppa:juju/stable
sudo apt-get update
sudo apt-get install juju juju-local juju-quickstart charm-tools squid-deb-proxy

Configuration

  • In the Juju client, edit /etc/squid-deb-proxy/mirror-dstdomain.acl to add the following lines:
# launchpad personal package archives (disabled by default)
ppa.launchpad.net
private-ppa.launchpad.net
  • In the Juju client, Restart squid-deb-proxy
sudo service squid-deb-proxy restart
  • In the Juju client, create file .juju/environments.yaml using the appropriate IP address for the bootstrap host (the Juju server IP address) and for the squid proxy (either the IP address of the LXC bridge - 10.0.3.1 - in case of a single-VM installation, or the IP address of the Juju client in case server and client are running in different VMs).
default: osm0-manual
environments:
  osm0-manual:
    admin-secret: osm
    bootstrap-host: <jujuserver-ip>
    bootstrap-user: osm
    default-series: trusty
    type: manual
    enable-os-refresh-update: False
    enable-os-upgrade: False
    apt-http-proxy: http://<proxy-ip>:8000
    apt-https-proxy: http://<proxy-ip>:8000
  • Bootstrap the environment:
juju bootstrap -v     # -v so you can see what's going on
  • Test the environment deploying juju-gui:
juju deploy juju-gui --to 0
  • Access juju-gui through the web browser (https://<jujuserver-ip>)
  • Additional commands:
juju debug-log        # open this in another terminal or tab, so you can see what juju is doing while you type other commands
juju status           # provides the status. When no charms have been launched, you should see an output like below:
 environment: osm0-manual
 machines:
   "0":
     agent-state: started
     agent-version: 1.25.5
     dns-name: 10.11.12.13
     instance-id: 'manual:'
     series: trusty
     hardware: arch=amd64 cpu-cores=4 mem=3953M
     state-server-member-status: has-vote
 services: {}