From b7ec40d9139cebc465fe17bc1068995058ba86e9 Mon Sep 17 00:00:00 2001 From: calvinosanc1 Date: Fri, 14 Oct 2022 14:32:47 +0000 Subject: [PATCH] Update 20-tutorial.md (cherry picked from commit 830f3219be507680d86047861557b91c6b0ec4ee) --- 20-tutorial.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/20-tutorial.md b/20-tutorial.md index 15e785a..d2fa10e 100644 --- a/20-tutorial.md +++ b/20-tutorial.md @@ -1,7 +1,7 @@ # OSM installation tutorial ## Introduction -In this tutorial you will install OSM that will be used to deploy and configure a CNF in a K8s cluster. Along the way you will learn how to attach a VIM and a K8s cluster to OSM in order to be able to deploy workloads, and also how VNF packages are uploaded to OSM, so they can be used later on. +In this tutorial you will install OSM that will be used to deploy and configure a CNF in a K8s cluster. Along the way you will attach a VIM and a K8s cluster to OSM in order to be able to deploy workloads, and also upload VNF packages, so they can be used later on. ## Prerequisites @@ -14,7 +14,7 @@ To complete this tutorial you need a fresh [Ubuntu 20.04](https://cloud-images.u ## Install OSM -Download the installation script, and give it executable permissions. Then, install OSM with `--small-profile` option. That will install an OSM version prepared to deploy CNFs only. +We are goiing to download the installation script, and give it executable permissions. Then, we will install OSM with `--small-profile` option. That will install an OSM version prepared to deploy CNFs only. ```bash wget https://osm-download.etsi.org/ftp/osm-12.0-twelve/install_osm.sh @@ -46,7 +46,7 @@ Track end installation_type: https://osm.etsi.org/InstallLog.php?&installation_i DONE ``` -Now follow the instructions in points 1 and 2 of the installer output. You can copy and paste the commands directly: +Now you can follow the instructions in points 1 and 2 of the installer output to finish the installation. You can copy and paste the commands directly: ```bash export OSM_HOSTNAME=nbi.172.21.248.37.nip.io:443 @@ -76,7 +76,7 @@ microk8s.config > microk8s-kubeconfig.yaml --- **NOTE** -If you have just installed Charmed OSM, could be the case that you need to logout and login again in the console, in order to use the `microk8s` command +If you have just installed Charmed OSM, could be the case that you need to logout and login again in the console, in order to use the `microk8s` command. --- @@ -86,7 +86,7 @@ And then to attach our microk8s to deploy CNFs: osm k8scluster-add microk8s --creds microk8s-kubeconfig.yaml --vim dummyvim --k8s-nets '{k8s_net1: null}' --version "v1.23" --description="Isolated K8s cluster" ``` -Check the status of the K8scluster with the following command: +You can check the status of the K8scluster with the following command: ```bash $ osm k8scluster-list @@ -98,6 +98,8 @@ $ osm k8scluster-list +----------+--------------------------------------+----------+-------------------+-------------------+ ``` +If you see that the `operational state` is **ENABLED** and the `operational state` of Helm and Juju are **ENABLED** then your K8s cluster is ready to be used. + ### Upload the CNF packages to Charmed OSM First we will clone the `osm-packages` repo. In this repo, we can find different examples of VNFs and CNFs that can be deployed with OSM. @@ -116,7 +118,7 @@ osm nspkg-create squid_metrics_cnf_ns ``` -Check that the packages have been successfully uploaded with the following commands: +You can see that the packages have been successfully uploaded if the `squid_cnf` vnf package and the `squid_cnf_ns` network service package are listed when you type the following commands: ```bash $ osm vnfd-list @@ -138,7 +140,7 @@ $ osm nsd-list ### Deploy the CNF -Then instantiate the CNF using this command: +Now that we have all the packages uploaded to OSM, we are going to instantiate the squid proxy using this command: ```bash osm ns-create --ns_name squid --nsd_name squid_cnf_ns --vim_account dummyvim @@ -157,13 +159,15 @@ To get the history of all operations over a NS, run "osm ns-op-list NS_ID" For more details on the current operation, run "osm ns-op-show OPERATION_ID" ``` +You can see that the `ns state` has changed from **BUILDING** to **READY**, and the `current operation` has changed from **INSTANTIATING** to **IDLE**. + ## Testing the CNF and day-2 actions ### Test the squid proxy The squid proxy is configured by default to deny the access to any web page we want to browse. First, we are going to test this behavior. -We need the IP address of our squid: +We need the IP address of our squid, to be able to use the proxy to go to internet. We can get the IP executing the following commands: ```bash # Get squid VNF ID @@ -187,7 +191,7 @@ We will receive an `HTTP 403 - FORBIDDEN` response. ### Allow a url to pass through the proxy -We will use a day-2 action to allow us to navigate to `google.com` url: +So, we saw that our squid proxy will forbid us to navigate to Internet. Now, we want to change the configuration of our proxy in order to be able to go to `google.com`. For that we will use the following OSM's day-2 action: ```bash $ osm ns-action squid --vnf_name squid_cnf \ @@ -197,7 +201,7 @@ $ osm ns-action squid --vnf_name squid_cnf \ --wait ``` -So then, if we try again (the action could take a couple of minutes until it is completed) we will see that we can navigate to `google.com`: +So then, if we try again (the squid can take a couple of minutes until it is updated with the new configuration) we will see that we can navigate to `google.com`: ```bash $ HTTPS_PROXY=$SQUID_IP:3128 curl https://google.com @@ -208,3 +212,5 @@ The document has moved here. ``` + +OSM allowed us to manage the CNF and made some changes in its configuration. -- GitLab