Juju installation (release 0): Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
No edit summary
Line 86: Line 86:
  juju action do vPE1/0 connect-domains domain-name=corpA iface-name=eth2 tunnel-name=greAC1 local-ip=10.10.10.1 remote-ip=10.10.10.2 tunnel-key=\"1\" internal-local-ip=10.255.255.1 internal-remote-ip=10.255.255.3 tunnel-type=gre
  juju action do vPE1/0 connect-domains domain-name=corpA iface-name=eth2 tunnel-name=greAC1 local-ip=10.10.10.1 remote-ip=10.10.10.2 tunnel-key=\"1\" internal-local-ip=10.255.255.1 internal-remote-ip=10.255.255.3 tunnel-type=gre


*Operationsrequired to configure vPE2 for MWC16 manually:
*Operations required to configure vPE2 for MWC16 manually:


  juju set vPE2 vpe-router=10.250.250.81 user=root pass=6windos hostname="vPE2"
  juju set vPE2 vpe-router=10.250.250.81 user=root pass=6windos hostname="vPE2"
Line 121: Line 121:
  juju action do vIMS/0 create-update-user number=\"1234567891\" password=\"AAbbCCdd\"
  juju action do vIMS/0 create-update-user number=\"1234567891\" password=\"AAbbCCdd\"
  juju action do vIMS/0 create-update-user number=\"1234567892\" password=\"AAbbCCdd\"
  juju action do vIMS/0 create-update-user number=\"1234567892\" password=\"AAbbCCdd\"


==Using the API==
==Using the API==

Revision as of 15:40, 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 vIMS

3. Now it is possible to configure/run actions on the deployed vPE and vIMS

  • Operations required to configure vPE1 for MWC16 manually:
juju set vPE1 vpe-router=10.250.250.83 user=root pass=6windos hostname="vPE1"
juju action do vPE1/0 configure-interface iface-name='eth1' cidr='10.10.10.9/30'
juju action do vPE1/0 configure-interface iface-name='eth2' cidr='10.10.10.1/30'
juju action do vPE1/0 configure-interface iface-name='eth3'
juju action do vPE1/0 add-corporation domain-name=SP iface-name=eth3 vlan-id=3000 cidr=10.0.1.0/24 area=10.0.1.1 subnet-cidr=10.255.255.0/24 subnet-area=\"0\"
juju action do vPE1/0 connect-domains domain-name=SP iface-name=eth1 tunnel-name=greAB local-ip=10.10.10.9 remote-ip=10.10.10.10 tunnel-key=\"10\" internal-local-ip=10.255.255.1 internal-remote- ip=10.255.255.2 tunnel-type=gre
juju action do vPE1/0 connect-domains domain-name=SP iface-name=eth2 tunnel-name=greAC local-ip=10.10.10.1 remote-ip=10.10.10.2 tunnel-key=\"10\" internal-local-ip=10.255.255.1 internal-remote-ip=10.255.255.3 tunnel-type=gre
juju action do vPE1/0 add-corporation domain-name=corpA iface-name=eth3 vlan-id=101 cidr=10.0.1.0/24 area=10.0.1.1 subnet-cidr=10.255.255.0/24 subnet-area=\"0\"
juju action do vPE1/0 connect-domains domain-name=corpA iface-name=eth1 tunnel-name=greAB1 local-ip=10.10.10.9 remote-ip=10.10.10.10 tunnel-key=\"1\" internal-local-ip=10.255.255.1 internal-remote ip=10.255.255.2 tunnel-type=gre
juju action do vPE1/0 connect-domains domain-name=corpA iface-name=eth2 tunnel-name=greAC1 local-ip=10.10.10.1 remote-ip=10.10.10.2 tunnel-key=\"1\" internal-local-ip=10.255.255.1 internal-remote-ip=10.255.255.3 tunnel-type=gre
  • Operations required to configure vPE2 for MWC16 manually:
juju set vPE2 vpe-router=10.250.250.81 user=root pass=6windos hostname="vPE2"
juju action do vPE2/0 configure-interface iface-name='eth1' cidr='10.10.10.10/30'
juju action do vPE2/0 configure-interface iface-name='eth2' cidr='10.10.10.6/30'
juju action do vPE2/0 configure-interface iface-name='eth3'
juju action do vPE2/0 add-corporation domain-name=SP iface-name=eth3 vlan-id=3000 cidr=10.0.2.0/24 area=10.0.2.1 subnet-cidr=10.255.255.0/24 subnet-area=\"0\"
juju action do vPE2/0 connect-domains domain-name=SP iface-name=eth1 tunnel-name=greBA local-ip=10.10.10.10 remote-ip=10.10.10.9 tunnel-key=\"10\" internal-local-ip=10.255.255.2 internal-remote- ip=10.255.255.1 tunnel-type=gre
juju action do vPE2/0 connect-domains domain-name=SP iface-name=eth2 tunnel-name=greBC local-ip=10.10.10.6 remote-ip=10.10.10.5 tunnel-key=\"10\" internal-local-ip=10.255.255.2 internal-remote-ip=10.255.255.3 tunnel-type=gre
juju action do vPE2/0 add-corporation domain-name=corpA iface-name=eth3 vlan-id=102 cidr=10.0.2.0/24 area=10.0.2.1 subnet-cidr=10.255.255.0/24 subnet-area=\"0\"
juju action do vPE2/0 connect-domains domain-name=corpA iface-name=eth1 tunnel-name=greBA1 local-ip=10.10.10.10 remote-ip=10.10.10.9 tunnel-key=\"1\" internal-local-ip=10.255.255.2 internal-remote-ip=10.255.255.1 tunnel-type=gre
juju action do vPE2/0 connect-domains domain-name=corpA iface-name=eth2 tunnel-name=greBC1 local-ip=10.10.10.6 remote-ip=10.10.10.5 tunnel-key=\"1\" internal-local-ip=10.255.255.2 internal-remote-ip=10.255.255.3 tunnel-type=gre
  • Operations required to configure vPE3 for MWC16 manually:
juju set vPE3 vpe-router=10.250.250.80 user=root pass=6windos hostname="vPE3"
juju action do vPE3/0 configure-interface iface-name='eth1' cidr='10.10.10.2/30'
juju action do vPE3/0 configure-interface iface-name='eth2' cidr='10.10.10.5/30'
juju action do vPE3/0 configure-interface iface-name='eth3'
juju action do vPE3/0 configure-interface iface-name='eth4'
juju action do vPE3/0 add-corporation domain-name=SP iface-name=eth3 vlan-id=3000 cidr=10.0.3.0/24 area=10.0.3.1 subnet-cidr=10.255.255.0/24 subnet-area=\"0\"
juju action do vPE3/0 connect-domains domain-name=SP iface-name=eth1 tunnel-name=greCA local-ip=10.10.10.2 remote-ip=10.10.10.1 tunnel-key=\"10\" internal-local-ip=10.255.255.3 internal-remote-ip=10.255.255.1 tunnel-type=gre
juju action do vPE3/0 connect-domains domain-name=SP iface-name=eth2 tunnel-name=greCB local-ip=10.10.10.5 remote-ip=10.10.10.6 tunnel-key=\"10\" internal-local-ip=10.255.255.3 internal-remote-ip=10.255.255.2 tunnel-type=gre
juju action do vPE3/0 add-corporation domain-name=corpA iface-name=eth4 vlan-id=108 cidr=10.0.4.0/24 area=10.0.4.1 subnet-cidr=10.255.255.0/24 subnet-area=\"0\"
juju action do vPE3/0 connect-domains domain-name=corpA iface-name=eth1 tunnel-name=greCA1 local-ip=10.10.10.2 remote-ip=10.10.10.1 tunnel-key=\"1\" internal-local-ip=10.255.255.3 internal-remote-ip=10.255.255.1 tunnel-type=gre
juju action do vPE3/0 connect-domains domain-name=corpA iface-name=eth2 tunnel-name=greCB1 local-ip=10.10.10.5 remote-ip=10.10.10.6 tunnel-key=\"1\" internal-local-ip=10.255.255.3 internal-remote-ip=10.255.255.2 tunnel-type=gre
  • Operations required to configure vIMS for MWC16 manually:
// Set the IMS domain
juju set vIMS proxied_ip=10.250.251.18 password=cw-aio home_domain=ims.com
// Provision 2 users to be able to make a call
juju action do vIMS/0 create-update-user number=\"1234567891\" password=\"AAbbCCdd\"
juju action do vIMS/0 create-update-user number=\"1234567892\" password=\"AAbbCCdd\"

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