Release ONE HowTo guide for users: Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
No edit summary
 
(13 intermediate revisions by 2 users not shown)
Line 5: Line 5:
==Adding datacenters/VIMs==
==Adding datacenters/VIMs==
Three kind of datacenters are currently supported by OSM:
Three kind of datacenters are currently supported by OSM:
*OpenVIM
*[[OpenVIM installation (Release One)|OpenVIM]]
*OpenStack
*OpenStack
*VMware vCloud Director
*[[Configuring VMware vCloud Director for OSM Release One|VMware vCloud Director]]


The following instructions are required to be executed in the host to add each kind of datacenter
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")
*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 --env 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
  lxc exec RO --env OPENMANO_TENANT=osm -- openmano datacenter-attach openvim-site --vim-tenant-name=osm
lxc exec RO --env OPENMANO_TENANT=osm -- openmano datacenter-list


*OpenStack DC (e.g. IP address: 10.10.10.11, VIM tenant "admin", user "admin", password "userpwd")
*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 --env 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
  lxc exec RO --env OPENMANO_TENANT=osm -- openmano datacenter-attach openstack-site --user=admin --password=userpwd --vim-tenant-name=admin
lxc exec RO --env OPENMANO_TENANT=osm -- openmano datacenter-list


*VMware DC (e.g. IP address: 10.10.10.12, VIM tenant "vmware-tenant", user "osm", password "osm4u", admin user "admin", admin password "adminpwd")
*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 --env OPENMANO_TENANT=osm -- openmano datacenter-create --type vmware --description "vmWare Datacenter" --config '{admin_password: adminpwd, admin_username: admin}' vmware-site https://10.10.10.12
  lxc exec RO -- export OPENMANO_TENANT=osm "&&" openmano datacenter-attach vmware-site --user=osm --password=osm4u --vim-tenant-name=vmware-tenant
  lxc exec RO --env OPENMANO_TENANT=osm -- openmano datacenter-attach vmware-site --user=osm --password=osm4u --vim-tenant-name=vmware-tenant
 
lxc exec RO --env OPENMANO_TENANT=osm -- openmano datacenter-list


  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
  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
'''
<pre>
+--------------------------------------+----------+
|              vdc uuid              | vdc name |
+--------------------------------------+----------+
| 605ad9e8-04c5-402d-a3b7-0b6c1bacda75 |  test  |
| a5056f85-418c-4bfd-8041-adb0f48be9d9 |  TEF    |
+--------------------------------------+----------+
</pre>
*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'''
<pre>Crated new network test and uuid: bac9f9c6-6d1b-4af2-8211-b6258659dfb1</pre>
*View organization/dataceter.
'''./vmwarecli.py -u admin -p 123456 -c vcloud_host_name -U Administrator -P 123456 -o test view org test
'''
<pre>
+--------------------------------------+----------+
|              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 |
+--------------------------------------+--------------+
</pre>


==Adding VNF and NS to the catalog==
==Adding VNF and NS to the catalog==
Line 76: Line 33:
*NS packages: https://osm-download.etsi.org/ftp/osm-1.0-one/ns-packages
*NS packages: https://osm-download.etsi.org/ftp/osm-1.0-one/ns-packages


==Image preparation for VMware ==
==Creating your own VNF packages==
If a user needs on-board image that is not a VMware compatible
===VNF without primitives===
disk image format such as qcow. User need to convert qcow image to an OVF.
You can use the form in this [http://riftio.com/osm-vnf-package-generator/ web page], or use the CLI tool. In order to use the CLI tool, follow these instructions:
 
*Clone the descriptor-packages repo:
*The first step is convert qcow disk image to vmdk.
  git clone https://osm.etsi.org/gerrit/osm/descriptor-packages
**'''qemu-img convert -f qcow2 cirros-disk.img -O vmdk cirros-0.3.4-x86_64-disk.vmdk'''
*Run the following command to create a folder with all the files required for a single-VM VNF package:
 
  ./descriptor-packages/src/generate_descriptor_pkg.sh -t vnfd --image <IMAGE_PATH> -c <VNF_NAME>
*Second step.
*A folder called <VNF_NAME>_vnfd will be created with all the files required for a VNF package.
 
*Edit the file <VNF_NAME>_vnfd.yaml.
**Click "New in VMware Fusion , Vmware workstation or vCenter and create a VM from  VMDK file created in step one.
*Once done, you can generate the tar.gz VNF package with the command:
 
  ./descriptor-packages/src/generate_descriptor_pkg.sh -t vnfd -N <VNF_NAME>_vnfd
*Third step
#Note: the argument -N is optional and is intended to keep the package files after creating the package
**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. 
 
<pre>
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
</pre>
 
 
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.
 
<pre>
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
</pre>
 
change
 
<pre>VNFC image: /path/to/imagefolder/linux.qcow2</pre>
 
to


<pre>VNFC image:  /opt/Openmano/RO/vnfs/ovfs/cirros/cirros.ovf</pre>
===VNF with primitives===
(Under elaboration)
You will have to create a proxy charm for the VNF. You can follow the general instructions below:
*Clone the descriptor-packages repo:
  git clone https://osm.etsi.org/gerrit/osm/juju-charms
*...

Latest revision as of 09:00, 25 October 2016

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:

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

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:

Creating your own VNF packages

VNF without primitives

You can use the form in this web page, or use the CLI tool. In order to use the CLI tool, follow these instructions:

  • Clone the descriptor-packages repo:
git clone https://osm.etsi.org/gerrit/osm/descriptor-packages
  • Run the following command to create a folder with all the files required for a single-VM VNF package:
./descriptor-packages/src/generate_descriptor_pkg.sh -t vnfd --image <IMAGE_PATH> -c <VNF_NAME>
  • A folder called <VNF_NAME>_vnfd will be created with all the files required for a VNF package.
  • Edit the file <VNF_NAME>_vnfd.yaml.
  • Once done, you can generate the tar.gz VNF package with the command:
./descriptor-packages/src/generate_descriptor_pkg.sh -t vnfd -N <VNF_NAME>_vnfd
#Note: the argument -N is optional and is intended to keep the package files after creating the package

VNF with primitives

(Under elaboration) You will have to create a proxy charm for the VNF. You can follow the general instructions below:

  • Clone the descriptor-packages repo:
git clone https://osm.etsi.org/gerrit/osm/juju-charms
  • ...