Juju installation (release 0): Difference between revisions

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


=Installing required packages and libraries=
=Installing required packages and libraries=
 
==Install Juju Server==
Juju server requires
*Create a user (e.g. user juju, pwd juju) and add it to the sudo group.
 
=Building and installing the module=
 
=Configuring=
 
=Previous installation procedure (Juju server VM)=
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.
 
1. Create a VM with Ubuntu 14.04 LTS and assign 4 vcpu, 4GB RAM and 40GB drive at least
 
2. Create user juju in sudo group  
  sudo adduser juju
  sudo adduser juju
  usermod -a -G sudo juju
  usermod -a -G sudo juju
 
*Install packages for Juju Server
3. 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
  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.
Edit /etc/default/lxc-net to change the lxc network to 10.1.3.0/24:
For instance, in order to use the subnet 10.10.10.0/24, you could make the following configuration:
  LXC_BRIDGE="lxcbr0"  
  LXC_BRIDGE="lxcbr0"  
  LXC_ADDR="10.1.3.1"
  LXC_ADDR="10.10.10.1"
  LXC_NETMASK="255.255.255.0"
  LXC_NETMASK="255.255.255.0"
  LXC_NETWORK="10.1.3.0/24"
  LXC_NETWORK="10.10.10.0/24"
  LXC_DHCP_RANGE="10.1.3.2,10.1.3.254"
  LXC_DHCP_RANGE="10.10.10.2,10.10.10.254"


4. 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.
==Install Juju Client==
Juju client can be installed in the same machine as Juju Server or in a different one.
*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


=Configuration=
*In the Juju client, create file .juju/environments.yaml:
default: osm0-manual
environments:
  osm0-manual:
    admin-secret: juju
    bootstrap-host: 10.11.12.13
    bootstrap-user: juju
    default-series: trusty
    type: manual
    enable-os-refresh-update: False
    enable-os-upgrade: False
*Bootstrap the environment:
juju bootstrap -v    # -v so you can see what's going on
*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.95.172.23
      instance-id: 'manual:'
      series: trusty
      hardware: arch=amd64 cpu-cores=4 mem=3953M
      state-server-member-status: has-vote


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

Revision as of 17:16, 12 May 2016

VM creation

  • Minimum Requirements:
    • 4 vCPU
    • 4GB RAM
    • 40GB disk
  • Base image: ubuntu-14.04.4-server-amd64

Installing required packages and libraries

Install Juju Server

  • Create a user (e.g. user juju, pwd juju) and add it to the sudo group.
sudo adduser juju
usermod -a -G sudo juju
  • 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.10.10.0/24, you could make the following configuration:

LXC_BRIDGE="lxcbr0" 
LXC_ADDR="10.10.10.1"
LXC_NETMASK="255.255.255.0"
LXC_NETWORK="10.10.10.0/24"
LXC_DHCP_RANGE="10.10.10.2,10.10.10.254"

Install Juju Client

Juju client can be installed in the same machine as Juju Server or in a different one.

  • 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

Configuration

  • In the Juju client, create file .juju/environments.yaml:
default: osm0-manual
environments:
  osm0-manual:
    admin-secret: juju
    bootstrap-host: 10.11.12.13
    bootstrap-user: juju
    default-series: trusty
    type: manual
    enable-os-refresh-update: False
    enable-os-upgrade: False
  • Bootstrap the environment:
juju bootstrap -v     # -v so you can see what's going on
  • 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.95.172.23
     instance-id: 'manual:'
     series: trusty
     hardware: arch=amd64 cpu-cores=4 mem=3953M
     state-server-member-status: has-vote