Juju installation (release 0): Difference between revisions
Lopezgracia (talk | contribs) |
Lopezgracia (talk | contribs) |
||
Line 66: | Line 66: | ||
2. To deploy the charms in containers in juju server VM: | 2. To deploy the charms in containers in juju server VM: | ||
cd ~/mwc16charms/ | cd ~/mwc16charms/ | ||
juju deploy local:trusty/vpe-router --to lxc:0 | juju deploy local:trusty/vpe-router --to lxc:0 vPE1 | ||
juju deploy local:trusty/vpe-router --to lxc:0 | juju deploy local:trusty/vpe-router --to lxc:0 vPE2 | ||
juju deploy local:trusty/vpe-router --to lxc:0 | juju deploy local:trusty/vpe-router --to lxc:0 vPE3 | ||
juju deploy local:trusty/clearwater-aio-proxy --to lxc:0 | juju deploy local:trusty/clearwater-aio-proxy --to lxc:0 vIMS | ||
3. Now it is possible to configure/run actions on the deployed vPE and vIMS | |||
Actions required to configure vPE1 for MWC16: | |||
Actions required to configure vPE2 for MWC16: | |||
Actions required to configure vPE3 for MWC16: | |||
Actions required to configure vIMS for MWC16: | |||
==Using the API== | ==Using the API== |
Revision as of 15:26, 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.
- 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.
- 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 vIMS
3. Now it is possible to configure/run actions on the deployed vPE and vIMS
Actions required to configure vPE1 for MWC16:
Actions required to configure vPE2 for MWC16:
Actions required to configure vPE3 for MWC16:
Actions required to configure vIMS for MWC16:
Using the API
In juju client VM execute
juju api-endpoints
This will provide the IP:Port to connect the juju client API code to
juju@mwc16-juju:~$ juju api-endpoints 10.95.172.193:17070