OpenVIM installation to be used with OSM release 0: Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
No edit summary
No edit summary
Line 11: Line 11:
*** Telco/VNF management network (to provide IP addresses via DHCP to the VNFs)  
*** Telco/VNF management network (to provide IP addresses via DHCP to the VNFs)  
*Base image: ubuntu-14.04.4-server-amd64
*Base image: ubuntu-14.04.4-server-amd64
=Infrastructure requirements=
In order to run openvim and be able to dataplane VNFs, some infrastructure requirements are missing:
https://github.com/nfvlabs/openvim/wiki/Getting-started#requirements


=Installation=
=Installation=
==Manual installation==
Installation process is detailed [https://github.com/nfvlabs/openvim/wiki/Getting-started#installation-endusers link here]. This will install required packages, openvim SW and Floodlight controller to control the underlay switch.
* Install required packages
 
sudo apt-get install mysql-server git screen wget python-yaml python-libvirt python-bottle \
=Configuration=
  python-mysqldb python-jsonschema python-paramiko python-argcomplete python-requests
Configuration details can be found [https://github.com/nfvlabs/openvim/wiki/Getting-started#configuration here]. For convenience
* Configure python-argcomplete
activate-global-python-argcomplete --user
echo ". /home/${USER}/.bash_completion.d/python-argcomplete.sh" >> ~/.bashrc
* Clone the git repository:
git clone https://github.com/nfvlabs/openmano.git openmano
* Database creation
mysqladmin -u root -p create vim_db
* Grant access privileges from localhost. Go to mysql console and use the following commands to create user vim and grant privileges to the databases:
mysql> CREATE USER 'vim'@'localhost' identified by 'vimpw';
mysql> GRANT ALL PRIVILEGES ON vim_db.* TO 'vim'@'localhost';
* Initialize database
openmano/openvim/database_utils/init_vim_db.sh -u vim -p vimpw
* Add openvim client and scripts to the PATH. It is enough to create the /home/${USER}/bin/ folder and add there the appropriate links:
mkdir /home/${USER}/bin/
ln -s ${PWD}/openmano/openvim/openvim /home/${USER}/bin/openvim
ln -s ${PWD}/openmano/scripts/service-openmano.sh /home/${USER}/bin/service-openmano


==Automatic installation==
==Configuring Floodlight Openflow Controller==
  wget https://github.com/nfvlabs/openvim/raw/master/scripts/install-openvim.sh
*Go to scripts folder and edit the file **flow.properties** setting the appropriate port values
  chmod +x install-openmano.sh
*Start FloodLight
  sudo ./install-openmano.sh [<database-root-user> [<database-root-password>]]
  service-openvim floodlight start
#NOTE: you can provide optionally the DB root user and password. If you don't provide it, the script will prompt for it.
#it creates a screen with name "flow" and start on it the openflow controller
  screen -x flow                            # goes into floodlight screen
  [Ctrl+a , d]                               # goes out of the screen (detaches the screen)
less openvim/logs/openflow.0


=Configuration=
==Openvim server configuration==
==Configuring openvim server==
*Go to openvim folder and edit openvimd.cfg. By default it runs in 'mode: **test**' where neither real hosts nor openflow controller are needed. You can change to 'mode **normal**' to use both hosts and openflow controller.
* Go to openvim folder and edit openvimd.cfg.
*Start openvim server
* Start openvim server
  service-openmano openvim start
  service-openmano openvim start
  #it creates a screen with name "vim" and starts inside the "./openvim/openvimd.py" program
  #it creates a screen with name "vim" and starts inside the "./openvim/openvimd.py" program
Line 49: Line 39:
  [Ctrl+a , d]                              # goes out of the screen (detaches the screen)
  [Ctrl+a , d]                              # goes out of the screen (detaches the screen)
  less openvim/logs/openvim.0
  less openvim/logs/openvim.0
==Openvim client configuration==
*Show openvim CLI client environment variables
openvim config                          # show openvim related variables
*Change environment variables properly     
#To change variables run
export OPENVIM_HOST=<http_host of openvimd.cfg>
export OPENVIM_PORT=<http_port of openvimd.cfg>
export OPENVIM_ADMIN_PORT=<http_admin_port of openvimd.cfg>
       
#You can insert at .bashrc for authomatic loading at login:
echo "export OPENVIM_HOST=<...>" >> /home/${USER}/.bashrc
...
==Create a tenant in openvim to be used by OSM==
*Create a tenant that will be used by OSM:
openvim tenant-create
tenant name? admin
tenant description (admin)?
<uuid>  admin  Created
*Take the uuid of the tenant and update the environment variables used by openvim client:
export OPENVIM_TENANT=<obtained uuid>
#echo "export OPENVIM_TENANT=<obtained uuid>" >> /home/${USER}/.bashrc
openvim config                            #show openvim env variables
==Additional configuration==
Finally, compute nodes as well as external networks are required to be added to openvim. Details on how to it can be found [https://github.com/nfvlabs/openvim/wiki/Getting-started#configuration here].

Revision as of 15:13, 17 May 2016

VM creation

  • Requirements:
    • 1 vCPU (2 recommended)
    • 2GB RAM (4 recommended)
    • 40GB disk
    • 3 network interfaces to:
      • OSM network (to interact with RO)
      • DC intfrastructure network (to interact with the compute servers and switches)
      • Telco/VNF management network (to provide IP addresses via DHCP to the VNFs)
  • Base image: ubuntu-14.04.4-server-amd64

Infrastructure requirements

In order to run openvim and be able to dataplane VNFs, some infrastructure requirements are missing: https://github.com/nfvlabs/openvim/wiki/Getting-started#requirements

Installation

Installation process is detailed link here. This will install required packages, openvim SW and Floodlight controller to control the underlay switch.

Configuration

Configuration details can be found here. For convenience

Configuring Floodlight Openflow Controller

  • Go to scripts folder and edit the file **flow.properties** setting the appropriate port values
  • Start FloodLight
service-openvim floodlight start
#it creates a screen with name "flow" and start on it the openflow controller
screen -x flow                             # goes into floodlight screen
[Ctrl+a , d]                               # goes out of the screen (detaches the screen)
less openvim/logs/openflow.0

Openvim server configuration

  • Go to openvim folder and edit openvimd.cfg. By default it runs in 'mode: **test**' where neither real hosts nor openflow controller are needed. You can change to 'mode **normal**' to use both hosts and openflow controller.
  • Start openvim server
service-openmano openvim start
#it creates a screen with name "vim" and starts inside the "./openvim/openvimd.py" program
screen -x vim                             # goes into openvim screen
[Ctrl+a , d]                              # goes out of the screen (detaches the screen)
less openvim/logs/openvim.0

Openvim client configuration

  • Show openvim CLI client environment variables
openvim config                           # show openvim related variables
  • Change environment variables properly
#To change variables run
export OPENVIM_HOST=<http_host of openvimd.cfg>
export OPENVIM_PORT=<http_port of openvimd.cfg>
export OPENVIM_ADMIN_PORT=<http_admin_port of openvimd.cfg>
       
#You can insert at .bashrc for authomatic loading at login:
echo "export OPENVIM_HOST=<...>" >> /home/${USER}/.bashrc
...

Create a tenant in openvim to be used by OSM

  • Create a tenant that will be used by OSM:
openvim tenant-create
tenant name? admin
tenant description (admin)?
<uuid>   admin   Created
  • Take the uuid of the tenant and update the environment variables used by openvim client:
export OPENVIM_TENANT=<obtained uuid>
#echo "export OPENVIM_TENANT=<obtained uuid>" >> /home/${USER}/.bashrc
openvim config                             #show openvim env variables

Additional configuration

Finally, compute nodes as well as external networks are required to be added to openvim. Details on how to it can be found here.