Release ONE HowTo guide for users

From OSM Public Wiki
Revision as of 17:08, 4 October 2016 by Bayramov (talk | contribs)
Jump to: navigation, search

This wiki page is under development. It contains some of the common tasks done in OSM.

Adding datacenters/VIMs

Three kind of datacenters are currently supported by OSM:

  • OpenVIM
  • OpenStack
  • VMware vCloud Director

The following instructions are required to be executed in the host to add each kind of datacenter

  • OpenVIM DC (e.g. IP address: 10.10.10.10, VIM tenant "osm")
lxc exec RO -- export OPENMANO_TENANT=osm "&&" openmano datacenter-create --type openvim --description "Openvim Datacenter" openvim-site http://10.10.10.10:9080/openvim
lxc exec RO -- export OPENMANO_TENANT=osm "&&" openmano datacenter-attach openvim-site --vim-tenant-name=osm
  • OpenStack DC (e.g. IP address: 10.10.10.11, VIM tenant "admin", user "admin", password "userpwd")
lxc exec RO -- export OPENMANO_TENANT=osm "&&" openmano datacenter-create --type openstack --description "OpenStack Datacenter" openstack-site http://10.10.10.11:5000/v2.0
lxc exec RO -- export OPENMANO_TENANT=osm "&&" openmano datacenter-attach openstack-site --user=admin --password=userpwd --vim-tenant-name=admin
  • VMware DC (e.g. IP address: 10.10.10.12, VIM tenant "vmware-tenant", user "osm", password "osm4u", admin user "admin", admin password "adminpwd")
lxc exec RO -- export OPENMANO_TENANT=osm "&&" openmano datacenter-create --type vmware --description "vmWare Datacenter" vmware-site https://10.10.10.12" --config '{admin_password: adminpwd, admin_username: admin}'
lxc exec RO -- export OPENMANO_TENANT=osm "&&" openmano datacenter-attach vmware-site --user=osm --password=osm4u --vim-tenant-name=vmware-tenant


Note: It is needed to match the name of the datacenter "vmware-site" to the name of the organization of "vCloud Director". Inside this organization the tenant "vmware-tenant" must exist

vCloud director initial preparation

  • In order to get vim-tenant_name from vCloud Director or/and tenant UUID execute.

./vmwarecli.py -u admin -p 12345 -c vcloud_host_name -U Administrator -P 123456 -o test list vdc

+--------------------------------------+----------+
|               vdc uuid               | vdc name |
+--------------------------------------+----------+
| 605ad9e8-04c5-402d-a3b7-0b6c1bacda75 |   test   |
| a5056f85-418c-4bfd-8041-adb0f48be9d9 |   TEF    |
+--------------------------------------+----------+
  • In this example two VDC (tenants) are available for organization test
  • Create default network by either using Web UI of vCloud director or vmwarecli.py

./vmwarecli.py -u admin -p 123456 -c vcloud_host_name -U Administrator -P 123456 -o test -v TEF create network test

Crated new network test and uuid: bac9f9c6-6d1b-4af2-8211-b6258659dfb1
  • View organization/dataceter.

./vmwarecli.py -u admin -p 123456 -c vcloud_host_name -U Administrator -P 123456 -o test view org test

+--------------------------------------+----------+
|               vdc uuid               | vdc name |
+--------------------------------------+----------+
| 605ad9e8-04c5-402d-a3b7-0b6c1bacda75 |   test   |
| a5056f85-418c-4bfd-8041-adb0f48be9d9 |   TEF    |
+--------------------------------------+----------+
+--------------------------------------+-------------------------------------------+
|             network uuid             |                network name               |
+--------------------------------------+-------------------------------------------+
| f2e8a499-c3c4-411f-9cb5-38c0df7ccf8e |                  default                  |
| 0730eb83-bfda-43f9-bcbc-d3650a247015 |                    test                   |
+--------------------------------------+-------------------------------------------+
+--------------------------------------+--------------+
|             catalog uuid             | catalog name |
+--------------------------------------+--------------+
| 811d67dd-dd48-4e79-bb90-9ba2199fb340 |    cirros    |
| 147492d7-d25b-465c-8eb1-b181779f6f4c | ubuntuserver |
+--------------------------------------+--------------+

Adding VNF and NS to the catalog

You can use the UI to onboard VNF and NS to the catalog. VNF and NS packages can be found in the URLs below:

Image preparation for VMware

If a user needs on-board image that is not a VMware compatible disk image format such as qcow. User need to convert qcow image to an OVF.

  • The first step is convert qcow disk image to vmdk.
    • qemu-img convert -f qcow2 cirros-disk.img -O vmdk cirros-0.3.4-x86_64-disk.vmdk
  • Second step.
    • Click "New in VMware Fusion , Vmware workstation or vCenter and create a VM from VMDK file created in step one.
  • Third step
    • Adjust hardware setting for VM. For example, if target VMs should have only one vNIC delete all vNIC.
    • Openmano will set up and attach vNIC based on VNF file.
    • Make sure hardware version for VM set to 11 or below.
    • Export VM as OVF and upload file to Openmano.
      • Example of folder structure inside VNF directory. Each exported image placed inside ovfs directory.
drwxr-xr-x   2 spyroot  staff        68 Oct  4 19:31 cirros
-rw-r--r--   1 spyroot  staff  13287936 May  7  2015 cirros-0.3.4-x86_64-disk.img
-rw-r--r--   1 spyroot  staff  21757952 Oct  4 19:38 cirros-0.3.4-x86_64-disk.vmdk
-rwxr-xr-x   1 spyroot  staff        57 Oct  4 18:58 convert.sh
drwxr-xr-x  10 spyroot  staff       340 Oct  4 07:24 examples
drwxr-xr-x   3 spyroot  staff       102 Oct  4 19:41 ovfs
-rw-r--r--   1 spyroot  staff     11251 Oct  4 07:24 vnf-template-2vm.yaml
-rw-r--r--   1 spyroot  staff      5931 Oct  4 07:24 vnf-template.yaml

bash$ ls -l ovfs/cirros/
total 25360
-rw-r--r--  1 spyroot  staff  12968960 Oct  4 19:41 cirros-disk1.vmdk
-rw-r--r--  1 spyroot  staff       125 Oct  4 19:41 cirros.mf
-rw-r--r--  1 spyroot  staff      5770 Oct  4 19:41 cirros.ovf


Note: You should create OVF image only once if all images of same VNF/OS share same hardware specs. The VM image used as reference VM in vCloud director. Each respected VM that Openmano instantiate used that image as reference.


  • VNF preparation step.
    • Create or copy vnf yaml file and adjust VNFC Image path.
bash$ cd vnfs/examples/
bash$ cp linux.yaml cirros.vmware.yaml

cat cirros.vmware.yaml | grep "VNFC image"
        VNFC image:  /path/to/imagefolder/linux.qcow2

change

VNFC image:  /path/to/imagefolder/linux.qcow2

to

VNFC image:  /opt/Openmano/RO/vnfs/ovfs/cirros/cirros.ovf