Openmano installation (release 0): Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
 
(30 intermediate revisions by 2 users not shown)
Line 9: Line 9:
*Base image: ubuntu-14.04.4-server-amd64
*Base image: ubuntu-14.04.4-server-amd64


=Installing required packages and libraries=
=Installation procedure for Release 0=
* Install required packages
 
  sudo apt-get install mysql-server git screen wget python-yaml python-libvirt python-bottle \
==Option 1. Automatic installation based on scripts==
   python-mysqldb python-jsonschema python-paramiko python-argcomplete python-requests
wget -O install-openmano.sh "https://osm.etsi.org/gitweb/?p=osm/openmano.git;a=blob_plain;f=scripts/install-openmano.sh"
chmod +x install-openmano.sh
sudo ./install-openmano.sh [-u <database-admin-user>] [-p <database-admin-password>]
cd openmano
git checkout tags/v0.0 -b v0.0
#NOTE: you can provide optionally the admin user (normally 'root') and password of the database.
 
==Option 2. Manual installation==
* Install required packages. Installation includes mysql-server, where you should specify a database root user (e.g. root) and a password.
  sudo apt-get install mysql-server git screen wget python-yaml python-bottle \
   python-mysqldb python-jsonschema python-argcomplete python-requests
  sudo apt-get install python-novaclient python-keystoneclient python-glanceclient python-neutronclient
  sudo apt-get install python-novaclient python-keystoneclient python-glanceclient python-neutronclient
* Configure python-argcomplete
* Configure python-argcomplete
  activate-global-python-argcomplete --user
  activate-global-python-argcomplete --user
 
echo ". /home/${USER}/.bash_completion.d/python-argcomplete.sh" >> ~/.bashrc
=Building and installing the module=
* Clone the git repository and situate in the v0.0 tag (OSM Release 0):
* Clone the git repository:
  git clone https://osm.etsi.org/gerrit/osm/openmano.git openmano
  git clone https://osm.etsi.org/gerrit/osm/openmano.git
cd openmano
git checkout tags/v0.0 -b v0.0
* If you are planning to develop code, you can always switch branches using:
git checkout master    # to situate in the master development branch
git checkout v0.0      # to situate back again in the OSM Release 0 stable code
* Database creation
* Database creation
  mysqladmin -u root -p create mano_db
  mysqladmin -u root -p create mano_db
* Grant access privileges from localhost. Go to mysql console and use the following commands to create user vim and nfvo, and grant privileges to the databases:
* Grant access privileges from localhost. Go to mysql console and use the following commands to create user mano and grant privileges to the databases:
$ mysql -u root -p
  mysql> CREATE USER 'mano'@'localhost' identified by 'manopw';
  mysql> CREATE USER 'mano'@'localhost' identified by 'manopw';
  mysql> GRANT ALL PRIVILEGES ON mano_db.* TO 'mano'@'localhost';       
  mysql> GRANT ALL PRIVILEGES ON mano_db.* TO 'mano'@'localhost';       
* Initialize database
* Initialize database
  openmano/database_utils/init_mano_db.sh -u mano -p manopw
  openmano/database_utils/init_mano_db.sh -u mano -p manopw
* Add openmano client to the PATH, by adding a link to the bin folder
* Add openmano 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}/openmano/openmano /home/${USER}/bin/openmano
  ln -s ${PWD}/openmano/openmano /home/${USER}/bin/openmano
  ln -s ${PWD}/openmano/scripts/service-openmano.sh /home/${SUDO_USER}/bin/service-openmano
  ln -s ${PWD}/openmano/scripts/service-openmano.sh /home/${USER}/bin/service-openmano
  ln -s ${PWD}/openmano/scripts/openmano-report.sh /home/${SUDO_USER}/bin/openmano-report
  ln -s ${PWD}/openmano/scripts/openmano-report.sh /home/${USER}/bin/openmano-report


=Configuring=
=Configuration=
* Go to openmano folder and edit [openmanod.cfg] (https://github.com/nfvlabs/openmano/raw/master/openmano/openmanod.cfg).
==Configuring openmano server==
* Go to openmano folder and edit openmanod.cfg.
* Start openmano server
* Start openmano server
  service-openmano openmano start
  service-openmano openmano start
Line 42: Line 58:
  less openmano/logs/openmano.0
  less openmano/logs/openmano.0


* Let's configure the openmano CLI client. This is only necessary if you have changed the file 'openmanod.cfg'
==Configuring openmano local CLI client==
* Let's configure the openmano local CLI client. This is only necessary if you have changed the file 'openmanod.cfg'
* List the environment variables
* List the environment variables
  openmano config                      #show openmano env variables
  openmano config                      #show openmano env variables
Line 50: Line 67:
  openmano config                      #show openmano env variables
  openmano config                      #show openmano env variables


==Create an openmano tenant==
* Let's create a new tenant:
* Let's create a new tenant:
  openmano tenant-create mytenant --description=tenant-description
  openmano tenant-create mytenant --description=tenant-description
  openmano tenant-list                          #show list of tenants uuid and name
  openmano tenant-list                          #show list of tenants uuid and name
* Update openmano client's environment variables with the tenant uuid or name, so that future operations will use that tenant:
export OPENMANO_TENANT=mytenant                #or the <obtained uuid>
openmano config                                #show openmano env variables
==Create a datacenter based on OpenVIM and attach openmano tenant to that datacenter==
Let's create a new datacenter 'openvim-site' in openmano. This datacenter will use OpenVIM as a VIM, located in 10.10.10.10 and whose tenant is "osm" (this needs to be created previously in openvim).
openmano datacenter-create --type openvim --description "Openvim Datacenter" openvim-site http://10.10.10.10:9080/openvim
openmano datacenter-list --all                                                              #show all datacenters
openmano datacenter-attach openvim-site --vim-tenant-name=osm                              #attach the datacenter 'openvim-site' and openvim tenant id to the openmano tenant 'mytenant'
openmano datacenter-list                                                                    #show datacenters associated to our tenant
openmano datacenter-netmap-upload -f --datacenter openvim-site                              #get the list of "shared" networks from openvim and update them in openmano
openmano datacenter-netmap-list                                                            #show datacenter net list
Update openmano client's environment variables with the datacenter uuid or name, so that future operations will use that datacenter:


* Take the uuid and update the environment variable associated to the openmano tenant:
  export OPENMANO_DATACENTER=openvim-site        #or the <obtained uuid>  
  export OPENMANO_TENANT=<obtained uuid>  
  openmano config                                #show openmano env variables
  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"
==Create a datacenter based on OpenStack and attach openmano tenant to that datacenter==
  openmano datacenter-create mydc http://localhost:9080/openvim
Let's create a new datacenter 'openstack-site' in openmano. This datacenter will use OpenStack as a VIM, located in 10.10.10.11 and whose tenant is "admin", user is "admin" and password is "userpwd"(this information can be read from keystonerc_admin).
  openmano datacenter-list --all                          #show all datacenters
  openmano datacenter-create --type openstack --description "OpenStack Datacenter" openstack-site http://10.10.10.11:5000/v2.0
openmano datacenter-attach mydc --vim-tenant-id <uuid>  #attach the datacenter mydc and openvim tenant id to the openmano tenant 'mytenant'
  openmano datacenter-attach openstack-site --user=admin --password=userpwd --vim-tenant-name=admin      #attach the datacenter 'openstack-site' to the openmano tenant 'mytenant'
  openmano datacenter-list                                 #show datacenters associated to our tenant
  openmano datacenter-netmap-upload -f --datacenter openstack-site                                        #get the list of "shared" networks from OpenStack and update them in openmano
openmano datacenter-net-update mydc
 
Edit datacenter mydc (y/N)? y
---
 
{{Feedback}}

Latest revision as of 12:16, 22 June 2016

VM creation

  • Requirements:
    • 1 vCPU (2 recommended)
    • 2GB RAM (4 recommended)
    • 40GB disk
    • 1 network interface to the OSM network
  • Base image: ubuntu-14.04.4-server-amd64

Installation procedure for Release 0

Option 1. Automatic installation based on scripts

wget -O install-openmano.sh "https://osm.etsi.org/gitweb/?p=osm/openmano.git;a=blob_plain;f=scripts/install-openmano.sh"
chmod +x install-openmano.sh
sudo ./install-openmano.sh [-u <database-admin-user>] [-p <database-admin-password>]
cd openmano
git checkout tags/v0.0 -b v0.0
#NOTE: you can provide optionally the admin user (normally 'root') and password of the database.

Option 2. Manual installation

  • Install required packages. Installation includes mysql-server, where you should specify a database root user (e.g. root) and a password.
sudo apt-get install mysql-server git screen wget python-yaml python-bottle \
  python-mysqldb python-jsonschema python-argcomplete python-requests
sudo apt-get install python-novaclient python-keystoneclient python-glanceclient python-neutronclient
  • Configure python-argcomplete
activate-global-python-argcomplete --user
echo ". /home/${USER}/.bash_completion.d/python-argcomplete.sh" >> ~/.bashrc
  • Clone the git repository and situate in the v0.0 tag (OSM Release 0):
git clone https://osm.etsi.org/gerrit/osm/openmano.git openmano
cd openmano
git checkout tags/v0.0 -b v0.0
  • If you are planning to develop code, you can always switch branches using:
git checkout master     # to situate in the master development branch
git checkout v0.0       # to situate back again in the OSM Release 0 stable code
  • Database creation
mysqladmin -u root -p create mano_db
  • Grant access privileges from localhost. Go to mysql console and use the following commands to create user mano and grant privileges to the databases:
$ mysql -u root -p
mysql> CREATE USER 'mano'@'localhost' identified by 'manopw';
mysql> GRANT ALL PRIVILEGES ON mano_db.* TO 'mano'@'localhost';       
  • Initialize database
openmano/database_utils/init_mano_db.sh -u mano -p manopw
  • Add openmano 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/openmano /home/${USER}/bin/openmano
ln -s ${PWD}/openmano/scripts/service-openmano.sh /home/${USER}/bin/service-openmano
ln -s ${PWD}/openmano/scripts/openmano-report.sh /home/${USER}/bin/openmano-report

Configuration

Configuring openmano server

  • Go to openmano folder and edit openmanod.cfg.
  • Start openmano server
service-openmano openmano start
#it creates a screen with name "mano" and starts inside the "./openmano/openmanod.py" program
screen -x mano                             # goes into openmano screen
[Ctrl+a , d]                               # goes out of the screen (detaches the screen)
less openmano/logs/openmano.0

Configuring openmano local CLI client

  • Let's configure the openmano local 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

  • Let's create a new tenant:
openmano tenant-create mytenant --description=tenant-description
openmano tenant-list                           #show list of tenants uuid and name
  • Update openmano client's environment variables with the tenant uuid or name, so that future operations will use that tenant:
export OPENMANO_TENANT=mytenant                #or the <obtained uuid> 
openmano config                                #show openmano env variables

Create a datacenter based on OpenVIM and attach openmano tenant to that datacenter

Let's create a new datacenter 'openvim-site' in openmano. This datacenter will use OpenVIM as a VIM, located in 10.10.10.10 and whose tenant is "osm" (this needs to be created previously in openvim).

openmano datacenter-create --type openvim --description "Openvim Datacenter" openvim-site http://10.10.10.10:9080/openvim
openmano datacenter-list --all                                                              #show all datacenters
openmano datacenter-attach openvim-site --vim-tenant-name=osm                               #attach the datacenter 'openvim-site' and openvim tenant id to the openmano tenant 'mytenant'
openmano datacenter-list                                                                    #show datacenters associated to our tenant
openmano datacenter-netmap-upload -f --datacenter openvim-site                              #get the list of "shared" networks from openvim and update them in openmano
openmano datacenter-netmap-list                                                             #show datacenter net list

Update openmano client's environment variables with the datacenter uuid or name, so that future operations will use that datacenter:

export OPENMANO_DATACENTER=openvim-site        #or the <obtained uuid> 
openmano config                                #show openmano env variables

Create a datacenter based on OpenStack and attach openmano tenant to that datacenter

Let's create a new datacenter 'openstack-site' in openmano. This datacenter will use OpenStack as a VIM, located in 10.10.10.11 and whose tenant is "admin", user is "admin" and password is "userpwd"(this information can be read from keystonerc_admin).

openmano datacenter-create --type openstack --description "OpenStack Datacenter" openstack-site http://10.10.10.11:5000/v2.0
openmano datacenter-attach openstack-site --user=admin --password=userpwd --vim-tenant-name=admin       #attach the datacenter 'openstack-site' to the openmano tenant 'mytenant'
openmano datacenter-netmap-upload -f --datacenter openstack-site                                        #get the list of "shared" networks from OpenStack and update them in openmano

---

Your feedback is most welcome!
You can send us your comments and questions to OSM_TECH@list.etsi.org
Or join the OpenSourceMANO Slack Workplace
See hereafter some best practices to report issues on OSM