From ef2ec8f45983959c631857c83116207dcc5c0064 Mon Sep 17 00:00:00 2001 From: magnussonl Date: Tue, 14 Jul 2020 08:49:31 +0200 Subject: [PATCH] Add placement feature test procedure --- 03-osm-rel8-tests.md | 108 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/03-osm-rel8-tests.md b/03-osm-rel8-tests.md index a0a98db..7ef9dd0 100644 --- a/03-osm-rel8-tests.md +++ b/03-osm-rel8-tests.md @@ -246,3 +246,111 @@ osm ns-op-list hf-k8s ``` 7. SSH into VNF 1 and make sure that the `firsttouch` and `mytouch1` files have been created. + +## Automatic Placement Feature (feature 7953) +### [PLA-01] Basic Placement + +_Note. The following is a basic test of PLA using a nsd with a single vnf and only two VIMs. It does therefore not capture more elaborate capabilities of the PLA module such as e.g. pinning and vld constraints._ +1. Install PLA + +PLA is an optional module, install by adding --pla to install script + +```bash +$ ./install.sh <...> --pla` +``` + +2. Create the VIMs + +Create at least two VIM instances + +```bash +$ osm vim-create --name --account_type openstack --auth_url --user --password -- tenant --description "my description"` +``` + +The list of VIMs should be similar to e.g.: +``` ++------------+--------------------------------------+ +| vim name | uuid | ++------------+--------------------------------------+ +| OpenStack2 | eb553051-5b6c-4ad6-939b-2ad23bd82e57 | +| OpenStack1 | 576bbe0a-b95d-4ced-a63e-f387f8e6e2ce | ++------------+--------------------------------------+ +``` + +3. Get the descriptors and onboard them + +```bash +$ wget http://osm-download.etsi.org/ftp/osm-6.0-six/8th-hackfest/packages/hackfest-basic_vnfd.tar.gz + +$ wget http://osm-download.etsi.org/ftp/osm-6.0-six/8th-hackfest/packages/hackfest-basic_nsd.tar.gz + +$ osm vnfd-create hackfest-basic_vnfd.tar.gz + +$ osm nsd-create hackfest-basic_nsd.tar.gz +``` + +4. Create the price lists for compute and transport links + +Create the price list files vnf_price_list.yaml and pil_price_list.yaml + +vnf_price_list.yaml should contain an entry for the vnfd to use, e.g. +``` +- vnfd: hackfest-basic_vnfd + prices: + - vim_url: http://10.234.12.47:5000/v3 + vim_name: OpenStack1 + price: 5 + - vim_url: http://10.234.12.44:5000/v3 + vim_name: OpenStack2 + price: 10 + ``` +Note `vim_url` and `vim_name` corresponding to step 2. + +pil_price_list.yaml describes the inter-vim communication links, e.g. + +``` +pil: + - pil_description: Link between OpenStack1 and OpenStack2 + pil_price: 5 + pil_latency: 20 + pil_endpoints: + - OpenStack1 + - OpenStack2 +``` +Note `pil_endpoints` using VIM names corresponding to step 2. + + +5. Update the PLA container with price list and inventory file + +```bash +$ docker cp vnf_price_list.yaml $(docker ps -qf name=osm_pla):/placement/. + +$ docker cp pil_price_list.yaml $(docker ps -qf name=osm_pla):/placement/. +``` + +6. Instantiate the service using the placement engine + +Use the more expensive vim for `--vim_account`. + +```bash +$ osm ns-create --ns_name pla_test --nsd_name hackfest-basic_nsd --vim_account OpenStack2 --config '{placement-engine: PLA}' +``` + +7. Check VNF deployment + +The VNF will be deployed to a VIM according to the content of price list. + +```bash +$ osm vnf-list +``` + +``` ++--------------------------------------+------+--------------------------------------+------------------+----------------------+--------------------------------------+----------------+ +| vnf id | name | ns id | vnf member index | vnfd name | vim account id | ip address | ++--------------------------------------+------+--------------------------------------+------------------+----------------------+--------------------------------------+----------------+ +| cbacb383-c2e9-4fda-b066-649165e294bc | - | 54d36395-53cd-4b99-817b-5900f88523da | 1 | hackfest-basic_vnfd | 576bbe0a-b95d-4ced-a63e-f387f8e6e2ce | 192.168.241.9 | ++--------------------------------------+------+--------------------------------------+------------------+----------------------+--------------------------------------+----------------+ + +``` + +In this example the VNF is deployed to OpenStack1 being the cheapest VIM for the vnf -- GitLab