OpenVIM installation to be used with OSM release 0: Difference between revisions
From OSM Public Wiki
Garciadeblas (talk | contribs) (Created page with "__TOC__ =VM creation= * Requirements: ** 1 vCPU (2 recommended) ** 2GB RAM (4 recommended) ** 40GB disk ** 3 network interfaces to: *** OSM network (to interact with RO) ***...") |
Garciadeblas (talk | contribs) No edit summary |
||
Line 9: | Line 9: | ||
*** OSM network (to interact with RO) | *** OSM network (to interact with RO) | ||
*** DC intfrastructure network (to interact with the compute servers and switches) | *** DC intfrastructure network (to interact with the compute servers and switches) | ||
*** Telco/VNF management network (to provide IP addresses via DHCP | *** Telco/VNF management network (to provide IP addresses via DHCP in the | ||
*Base image: ubuntu-14.04.4-server-amd64 | *Base image: ubuntu-14.04.4-server-amd64 | ||
=Installing required packages and libraries= | =Installing required packages and libraries= | ||
* Install required packages | * Install required packages | ||
sudo apt-get install mysql-server git | sudo apt-get install mysql-server git screen wget python-yaml python-libvirt python-bottle \ | ||
python-mysqldb python-jsonschema python-paramiko python-argcomplete python-requests | python-mysqldb python-jsonschema python-paramiko python-argcomplete python-requests | ||
* Configure python-argcomplete | * Configure python-argcomplete | ||
Line 21: | Line 21: | ||
=Building and installing the module= | =Building and installing the module= | ||
Openvim is still part of the github openmano repository. These instructions download all components, but just configure the openvim-related aspects. | |||
* Clone the git repository: | * Clone the git repository: | ||
git clone https://github.com/nfvlabs/openmano | git clone https://github.com/nfvlabs/openmano.git openmano | ||
* Database creation | * Database creation | ||
mysqladmin -u root -p create vim_db | mysqladmin -u root -p create vim_db | ||
Line 29: | Line 30: | ||
mysql> GRANT ALL PRIVILEGES ON vim_db.* TO 'vim'@'localhost'; | mysql> GRANT ALL PRIVILEGES ON vim_db.* TO 'vim'@'localhost'; | ||
* Initialize database | * Initialize database | ||
openvim/database_utils/init_vim_db.sh -uvim -pvimpw | openmano/openvim/database_utils/init_vim_db.sh -uvim -pvimpw | ||
* Add openvim client and scripts to the PATH. It is enough to create the /home/${USER}/bin/ folder and add there the appropriate links: | * 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/ | mkdir /home/${USER}/bin/ | ||
ln -s ${PWD}/openvim/openvim /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 | ln -s ${PWD}/openmano/scripts/service-openmano.sh /home/${USER}/bin/service-openmano | ||
=Configuring= | =Configuring= | ||
==Configuring openvim server== | ==Configuring openvim server== | ||
* Go to | * Go to openvim folder and edit openvimd.cfg. | ||
* Start | * Start openvim server | ||
service-openmano | service-openmano openvim start | ||
#it creates a screen with name " | #it creates a screen with name "vim" and starts inside the "./openvim/openvimd.py" program | ||
screen -x | screen -x vim # goes into openvim screen | ||
[Ctrl+a , d] | [Ctrl+a , d] # goes out of the screen (detaches the screen) | ||
less | less openvim/logs/openvim.0 | ||
==Configuring | ==Configuring openvim client== | ||
* Let's configure the openmano CLI client. This is only necessary if you have changed the file 'openmanod.cfg' | * Let's configure the openmano CLI client. This is only necessary if you have changed the file 'openmanod.cfg' | ||
* List the environment variables | * List the environment variables |
Revision as of 08:10, 12 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 in the
- Base image: ubuntu-14.04.4-server-amd64
Installing required packages and libraries
- Install required packages
sudo apt-get install mysql-server git screen wget python-yaml python-libvirt python-bottle \ python-mysqldb python-jsonschema python-paramiko python-argcomplete python-requests
- Configure python-argcomplete
activate-global-python-argcomplete --user echo ". /home/${USER}/.bash_completion.d/python-argcomplete.sh" >> ~/.bashrc
Building and installing the module
Openvim is still part of the github openmano repository. These instructions download all components, but just configure the openvim-related aspects.
- 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 -uvim -pvimpw
- 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
Configuring
Configuring openvim server
- Go to openvim folder and edit openvimd.cfg.
- 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
Configuring openvim client
- Let's configure the openmano CLI client. This is only necessary if you have changed the file 'openmanod.cfg'
- List the environment variables
openmano config #show openmano env variables
- Update the environment variables accordingly:
export OPENMANO_HOST=<http_host of openmanod.cfg> export OPENMANO_PORT=<http_port of openmanod.cfg> openmano config #show openmano env variables
Create an openmano tenant, a datacenter based on openvim and attach the tenant to the datacenter
- Let's create a new tenant:
openmano tenant-create mytenant --description=tenant-description openmano tenant-list #show list of tenants uuid and name
- Take the uuid and update the environment variable associated to the openmano tenant:
export OPENMANO_TENANT=<obtained uuid> openmano config #show openmano env variables
- Let's create a new datacenter 'mydc' in openmano. This datacenter will use openvim as a VIM, and the VIM tenant id is "admin"
openmano datacenter-create mydc http://localhost:9080/openvim openmano datacenter-list --all #show all datacenters openmano datacenter-attach mydc --vim-tenant-id <uuid> #attach the datacenter mydc and openvim tenant id to the openmano tenant 'mytenant' openmano datacenter-list #show datacenters associated to our tenant openmano datacenter-net-update mydc Edit datacenter mydc (y/N)? y