2 Copyright 2020 Arctos Labs Scandinavia AB
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14 See the License for the specific language governing permissions and
15 limitations under the License
18 # Placement module (PLA) User's Guide
21 To use the placement functionality of OSM several steps needs to be taken to configure and enable the function.
22 1. OSM needs to be installed with the PLA module included
23 2. Create the price lists for compute and transport links
24 3. Create the inventory of PoP interconnecting links
25 4. Update the PLA container with price list and inventory file
26 5. Usage - Instantiate the service using the placement engine
28 ## Install OSM including PLA
29 PLA is an optional module in OSM. It is installed together with OSM by adding ``--pla`` to the install script.
31 `$ ./install_osm.sh --pla`
33 ## Create the price lists
34 The price list for compute determines the price for each VNF at each VIM (or Point of Presence - PoP). The file (vnf_price_list.yaml) is written in Yaml and is exemplified below.
39 - vim_url: http://10.234.12.47:5000/v3
42 - vim_url: http://10.234.12.44:5000/v3
45 - vim_url: http://10.234.12.46:5000/v3
48 - vim_url: http://10.234.12.43:5000/v3
51 - vnfd: hackfest_multivdu-vnf
53 - vim_url: http://10.234.12.47:5000/v3
56 - vim_url: http://10.234.12.44:5000/v3
59 - vim_url: http://10.234.12.46:5000/v3
62 - vim_url: http://10.234.12.43:5000/v3
67 The price list for transport links between VIMs (PoP Interconnecting Link – PiL). In current release the price is given per link without any consideration to BW or other QoS parameter. The file (pil_price_list.yaml) is written in Yaml and is exemplified below. Note: In current OSM release the link characteristics are hard coded into this file, in future releases this data should be retrieved from the infrastructure by monitoring mechanisms.
71 - pil_description: Link between OpenStack1 and OpenStack2
76 - http://10.234.12.47:5000/v3
77 - http://10.234.12.44:5000/v3
78 - pil_description: Link between OpenStack1 and OpenStack3
83 - http://10.234.12.47:5000/v3
84 - http://10.234.12.46:5000/v3
85 - pil_description: Link between OpenStack1 and OpenStack4
90 - http://10.234.12.47:5000/v3
91 - http://10.234.12.43:5000/v3
92 - pil_description: Link between OpenStack2 and OpenStack3
97 - http://10.234.12.44:5000/v3
98 - http://10.234.12.46:5000/v3
99 - pil_description: Link between OpenStack2 and OpenStack4
104 - http://10.234.12.44:5000/v3
105 - http://10.234.12.43:5000/v3
106 - pil_description: Link between OpenStack3 and OpenStack4
111 - http://10.234.12.46:5000/v3
112 - http://10.234.12.43:5000/v3
116 ## Create the inventory file
117 The VIMs configured in OSM are assumed to be connected to each other with transport links - PiLs. In current release the inventory file describes the available PiLs with latency and jitter. If there is no PiL in the inventory file for any pair of PoPs the placement engine will not be able to use that relation for a VL.
119 ## Update the PLA container
120 Copy the price lists and inventory files to the PLA container using the following commands:
122 `$ docker cp vnf_price_list.yaml $(docker ps -qf name=osm_pla):/placement/.`
124 `$ docker cp pil_price_list.yaml $(docker ps -qf name=osm_pla):/placement/.`
126 ## Instantiate the service
127 When creating a NS instance, it is possible to pass instantiation parameters to OSM using the `--config` option of the client or the `config` parameter of the UI. To invoke the placement engine following directives are used.
130 --config '{placement-engine: PLA}'
136 `$ osm ns-create --ns_name ThreeVNFTest --nsd_name three_vnf_constrained_nsd --vim_account OpenStack1 --config '{placement-engine: PLA}'
139 Using PLA support from the GUI network service create form:
141 ![Instantiate with PLA support](img/osm_gui_ns_create.png)
143 ### With pinning of member-vnf-index: "3" to vim_account: OpenStack3
144 To enable automatic placement with one (or multiple) VNFs at a pre-determined place (e.g. near CPE), PLA has the ability do placement with one or multiple VNFs pinned to datacenter(s). The pinning is done in the same way as explained in section [Multi-site deployments](https://osm.etsi.org/wikipub/index.php/OSM_instantiation_parameters#Multi-site_deployments_.28specifying_different_VIM_accounts_for_different_VNFs.29) in the OSM wiki.
146 Example NS instantiation using CLI command (pinning one of three VNFs in the used NSD):
147 `$ osm ns-create --ns_name ThreeVnfTest2 --nsd_name three_vnf_constrained_nsd --vim_account OpenStack1 --config '{placement-engine: PLA, vnf: [{member-vnf-index: “3", vim_account: OpenStack3}]}'`
150 ### With constraints as instantiation parameters
151 It is also possible to provide constraints as instantiation parameters. Such constraints are included in a dictionary belonging to the `constraints` key as follows:
153 `config: {placement-engine: PLA, constraints: {<constraints specifications>}}`
155 #### vld constraints as instantiation parameters
156 Currently the supported type of constraints is placed on the vlds, and is identified with the `vld-constraints` key in the constraints specifications. Each vld that is given constraints have the form `{id: <id from nsd>, link-constraints: {latency: <max allowed latency>, jitter: <max allowed jitter>}`. It is not necessary to place constraints on all links, it is also possible to freely mix the supported constraint types `latency` and `jitter` as desired.
158 Example NS instantiation using CLI command with constraints put on `vld_1` and `vld_2`
160 `$ osm ns-create --ns_name ThreeVnfTest2 --nsd_name three_vnf_constrained_nsd --vim_account OpenStack1 --config '{placement-engine: PLA, vnf: [{member-vnf-index: “3", vim_account: OpenStack3}], constraints: {vld-constraints: [{id:vld_1, link-constraints: {latency: 120, jitter: 20}}, {id:vld_2, link-constraints: {latency: 120, jitter: 20 }}]}}'`