From f15ebf941359c46977746c18f3cfb7042af98e0b Mon Sep 17 00:00:00 2001
From: lavado <glavado@whitestack.com>
Date: Mon, 25 May 2020 23:06:14 +0200
Subject: [PATCH] Update README.md

---
 magma/README.md | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/magma/README.md b/magma/README.md
index 68167cbc..057532bd 100644
--- a/magma/README.md
+++ b/magma/README.md
@@ -8,11 +8,12 @@
 
 This example requires a PNF, emulated with a VyOS router (image [here](http://osm-download.etsi.org/ftp/osm-6.0-six/7th-hackfest/images/vyos-1.1.7-cloudinit.qcow2.tgz)), connected to a shared management network (osm-ext in this example) and to a shared internal "sgi" network where the Slice will be placed.
 
-1. Add the PDU with the yaml file (emulated by a VyOS VM in this environment)
-1. Upload the packages to OSM, the "build_slice.sh" file contain some useful commands.
-1. Make sure you got the images for AGW and srsLTE emulator, available at ETSI VIM or at the hackfest@172.21.248.19 home directory.
+**Important note**: a sandbox ready for testing is available at hackfest@172.21.248.19 (~/osm-packages/magma is synced with this repo), which has a PNF and the required "sgi" network already shared.
 
-Note: a sandbox for testing is available at hackfest@172.21.248.19 (~/osm-packages/magma is synced with this repo)
+1. If you just cloned the repo, make sure you run `git submodule update --init` under every "charms" folder.
+1. Add the PDU with the yaml file (emulated by a VyOS VM in this environment). You can do it with `osm pdu-create --descriptor_file pdu.yaml` (editing at least the VIM ID first)
+1. Upload the packages to OSM, the "build_slice.sh" file contain some useful commands, from building to launching.
+1. Make sure you got the images for AGW and srsLTE emulator, available at ETSI VIM or at the hackfest@172.21.248.19 home directory.
 
 ## Launching the Slice
 
@@ -53,13 +54,29 @@ With this, the UE machine will have access to Internet through the AGW and then
 
 ## Additional tests
 
+### Network Slicing
+
 - Additional slice instances can be launched (changing agw_id and agw_name), and we should see that just the AGW+emulator NS is launched (Orc8r NS is shared)
 
+### Placement
+
+A second slice, reusing the same Orc8r, can be launched at different VIM. The procedure is as follows:
+
+1. [ If PLA not available in setup] Build the PLA image by cloning the repo and running `docker build . -f docker/Dockerfile -t osm_pla:dev`, then plug it into the OSM network. In docker swarm it would be with `docker run -d --name osm_pla --network netosm osm_pla:dev`
+1. Prepare the second VIM by ensuring it has the PNF/PDU and the required images.
+1. Edit the `pil_price_list.yaml` and `vnf_price_list.yaml` as desired, ensuring that it's "less expensive" to launch the VNFs at the second VIM.      
+1. Copy the files to the placement folder at PLA:
+   `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/.`
+1. Uncomment the placement-engine line and launch as usual! you should see the second slice being instantiated in the second VIM.
+
+### Metrics collection
+
+VIM-level metrics are being collected by default, they can be observed at the Grafana dashboard (possible bug at the ns_id variable, under review)
+
 ## Pending additions
 
 - Navigating from a desktop browser (VNC not working properly)
-- Placement tests
-- Metrics collection
 - Automatic and manual scaling
 - KNF Primitives (via additional Webhost NS that will be added)
 - SDN Assist in the internal S1 VLD
-- 
GitLab