Juju installation (release 0): Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
Line 51: Line 51:
  LXC_NETWORK="10.1.3.0/24"
  LXC_NETWORK="10.1.3.0/24"
  LXC_DHCP_RANGE="10.1.3.2,10.1.3.254"
  LXC_DHCP_RANGE="10.1.3.2,10.1.3.254"


More about using juju : https://github.com/juju/cheatsheet
More about using juju : https://github.com/juju/cheatsheet

Revision as of 15:17, 20 April 2016

This document intent is to provide a practical way to reproduce the environment in Telefonica lab (TEF) aim at running the demo scenario for Mobile World Congress 2016. It is not an explanation or long term recommendation for using juju.

Initially setup two Ubuntu 14.04 LTS VMs with 4 vcpu, 4G RAM and 40GB drive. Create user juju in sudo group (usermod -a -G sudo juju) in both VMs.

  1. The first is juju client VM (or juju jump server) (10.95.172.10). This VM is only required for manual execution of juju commands and charms debugging.
  2. The second is juju server VM (10.95.172.193). This VM will receive commands from Juju client VM when doing manual testing, or directly from Rift.io Launchpad VM in OSM context. Juju charms will be deployed as containers in this VM

juju client VM

1. Install juju:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:juju/stable
sudo apt-get update
sudo apt-get install juju-quickstart juju-core

2. Configure the connection to juju server VM in manual provider mode: ensure to have the following in your ~/.juju/environements.yaml

environments:
 mwc16manual:
   admin-secret: nfvjuju
   bootstrap-host: 10.95.172.193
   bootstrap-user: juju
   default-series: trusty
   type: manual

Where:

bootstrap-host: IP address of juju server VM

bootstrap-user: user in juju server VM

admin-secret: password of the bootstrap user

3. Execute the following commands to connect both VMs:

juju switch mwc16manual
juju bootstrap --upload-tools

4. As a nice optional add-on deploy juju-gui to graphically monitor juju status

juju deploy juju-gui --to 0

Once done you can connect via https to the IP of the juju client VM. More information on the bootstrap process is available here: https://jujucharms.com/docs/1.25/config-manual

juju server VM:

1. Configure the VM to access the management networks of openvim and openstack. This is a requirement for juju to be able to connect to the deployed VNFs.

2. Change the default lxc networks, as in the lab setup the default lxc network (10.0.3.0/24) is already being used:

sudo apt-get install systemd-services lxc

Edit /etc/default/lxc-net to change the lxc network to 10.1.3.0/24:

LXC_BRIDGE="lxcbr0" 
LXC_ADDR="10.1.3.1"
LXC_NETMASK="255.255.255.0"
LXC_NETWORK="10.1.3.0/24"
LXC_DHCP_RANGE="10.1.3.2,10.1.3.254"

More about using juju : https://github.com/juju/cheatsheet

Charms for MWC

This step is only required to test the charms manually from juju client VM. The installation of the charms in Rift.io Launchpad VM is out of the scope of this document.

1. Install the charms in a local repo for convenience:

mkdir -p ~/mwc16charms/trusty
cd ~/mwc16charms/trusty
git clone git@github.com:6WIND/LinuxPE.git vpe-router
git clone -b clearwater-aio-proxy https://github.com/Metaswitch/clearwater-juju.git
cp -rf clearwater-juju/charms/trusty/clearwater-aio-proxy/ . 

2. To deploy the charms in containers in juju server VM:

cd ~/mwc16charms/ 
juju deploy local:trusty/vpe-router --to lxc:0 vpe1
juju deploy local:trusty/vpe-router --to lxc:0 vpe2
juju deploy local:trusty/vpe-router --to lxc:0 vpe3
juju deploy local:trusty/clearwater-aio-proxy --to lxc:0 ims-a
juju deploy local:trusty/clearwater-aio-proxy --to lxc:0 ims-b

You can then configure/run actions on them.

Using the API:

juju api-endpoints 

Will give you the IP:Port to connect the juju client API code to.