Install OSM - caprivm/virtualization GitHub Wiki

caprivm ([email protected])

Description

This page explains all the steps required orchestrating a CNF in OSM on a Ubuntu VM. All steps that expose this section has been tested in a Virtual Machine using the following OS preparation requirements.

Feature Value
OS Used Ubuntu 18.04 LTS
vCPU 4
RAM (GB) 8
Disk (GB) 50

The contents of the page are:

Prerequisites

For the installation of OSM it is necessary to have Docker previously installed. For this, you can refer to the following link:

Install OSM

At time of writing, the OSM version is 9.1.1. Based on the installing OSM official documentation, the first step is to guarantee an appropiate configuration in VM. Consider the next commands for this purpose:

sudo apt update && sudo apt upgrade -y
sudo apt install -y git
mkdir osm && cd osm
wget https://osm-download.etsi.org/ftp/osm-10.0-ten/install_osm.sh
chmod +x install_osm.sh

Install OSM on Kubernetes

Install OSM on Kubernetes and report logs in a .txt file:

./install_osm.sh --k8s_monitor --elk_stack 2>&1 | tee osm_install_log.txt

If the installation success, the next command must to be functional CLI:

kubectl get pods -A
# NAMESPACE        NAME                                           READY   STATUS    RESTARTS   AGE
# controller-osm   controller-0                                   2/2     Running   1          35d
# controller-osm   modeloperator-747c69699f-tvq7w                 1/1     Running   0          35d
# kube-system      coredns-5c98db65d4-hdhlr                       1/1     Running   0          35d
# kube-system      coredns-5c98db65d4-w6rlg                       1/1     Running   0          35d
# kube-system      etcd-osm-9                                     1/1     Running   0          35d
# kube-system      kube-apiserver-osm-9                           1/1     Running   0          35d
# kube-system      kube-controller-manager-osm-9                  1/1     Running   2          35d
# kube-system      kube-flannel-ds-trq9s                          1/1     Running   0          35d
# kube-system      kube-proxy-xjlc9                               1/1     Running   0          35d
# kube-system      kube-scheduler-osm-9                           1/1     Running   1          35d
# metallb-system   controller-bb4f86c59-b2pbt                     1/1     Running   0          35d
# metallb-system   speaker-6fq66                                  1/1     Running   0          35d
# openebs          maya-apiserver-6866b7b55-97s8t                 1/1     Running   2          35d
# openebs          openebs-admission-server-77d489c57d-jbw9t      1/1     Running   0          35d
# openebs          openebs-localpv-provisioner-8447b496c7-qnr24   1/1     Running   1          35d
# openebs          openebs-ndm-9tt5x                              1/1     Running   0          35d
# openebs          openebs-ndm-operator-f64c5bb7-dnmcn            1/1     Running   1          35d
# openebs          openebs-provisioner-557d489db8-f2t5w           1/1     Running   1          35d
# openebs          openebs-snapshot-operator-6d48b74fdb-w8pft     2/2     Running   2          35d
# osm              grafana-755979fb8c-trx6c                       2/2     Running   0          35d
# osm              kafka-0                                        1/1     Running   0          35d
# osm              keystone-6db69d6d64-dgpks                      1/1     Running   0          35d
# osm              lcm-694bd95d9-lw6dr                            1/1     Running   0          35d
# osm              modeloperator-56b89574dd-pt7c5                 1/1     Running   0          35d
# osm              mon-76cfdcf476-zcqfs                           1/1     Running   0          35d
# osm              mongodb-k8s-0                                  2/2     Running   0          35d
# osm              mongodb-k8s-operator-0                         1/1     Running   0          35d
# osm              mysql-0                                        1/1     Running   0          35d
# osm              nbi-74f7d9f57b-976bp                           1/1     Running   0          35d
# osm              ng-ui-c57f7f5d-7vnp8                           1/1     Running   0          35d
# osm              pol-69d6c996ff-tnj6d                           1/1     Running   0          35d
# osm              prometheus-0                                   1/1     Running   0          35d
# osm              ro-64ddfd854f-v948p                            1/1     Running   0          35d
# osm              zookeeper-0                                    1/1     Running   0          35d

Install OSM on Docker

Install OSM and report logs in a .txt file:

./install_osm.sh --elk_stack -c swarm 2>&1 | tee osm_install_log.txt

If the installation success, the next command must to be functional CLI:

docker ps -a
# CONTAINER ID   IMAGE                           COMMAND                  CREATED       STATUS                 PORTS                                  NAMES
# 5bd7743432be   opensourcemano/lcm:9            "/bin/sh -c 'python3…"   10 days ago   Up 10 days (healthy)                                          osm_lcm.1.1psdmw1o7lav05paskg5rg0e1
# bf911ca42097   opensourcemano/pol:9            "/bin/sh -c '/bin/ba…"   10 days ago   Up 10 days (healthy)                                          osm_pol.1.j0casr4jtm6zfod76ta5fh1jq
# a6cc3efac2a2   wurstmeister/kafka:2.11-1.0.2   "start-kafka.sh"         10 days ago   Up 10 days (healthy)                                          osm_kafka.1.i9kzppb3ijcklrlfmx82hh7bc
# 9285ca03ceb6   mongo:latest                    "docker-entrypoint.s…"   10 days ago   Up 10 days             27017/tcp                              osm_mongo.1.k2wjr3hmwnjsnq38t6brh1nlp
# 75261762810c   opensourcemano/ro:9             "/bin/sh -c 'python3…"   10 days ago   Up 10 days (healthy)   9090/tcp                               osm_ro.1.8hafbxtno0tkv1pxvweknaxd7
# 39585ad2e356   opensourcemano/ng-ui:9          "nginx -g 'daemon of…"   10 days ago   Up 10 days (healthy)   80/tcp                                 osm_ng-ui.1.p2eb0lhsvgj5jy40ruwujzrni
# ec4882be7101   prom/prometheus:v2.4.3          "/bin/prometheus --c…"   10 days ago   Up 10 days             9090/tcp                               osm_prometheus.1.bezi8yua06xfjrg4ilr0wfhzy
# 52af0a479db1   opensourcemano/mon:9            "/bin/sh -c '/bin/ba…"   10 days ago   Up 10 days (healthy)   8000/tcp                               osm_mon.1.o6lel0f6sa0ytylj2x9xd4nwv
# 51a51c535b07   google/cadvisor:latest          "/usr/bin/cadvisor -…"   10 days ago   Up 10 days             8080/tcp                               osm_prometheus-cadvisor.1.nx1ozrb8kos8d1502gfa9cjh4
# 17cbd0418a11   mysql:5                         "docker-entrypoint.s…"   10 days ago   Up 10 days             3306/tcp, 33060/tcp                    osm_mysql.1.jkpy9mrw3cd9ec0jact8pavur
# 7f0c1ab38bdf   opensourcemano/nbi:9            "/bin/sh -c 'python3…"   10 days ago   Up 10 days (healthy)   9999/tcp                               osm_nbi.1.s54uifbek6y69wnzdzhjxj25d
# 495056cc6089   opensourcemano/keystone:9       "/bin/sh -c ./start.…"   10 days ago   Up 10 days             5000/tcp                               osm_keystone.1.tfd7guwdydr4xo4spin0nozu4
# b1ca4409c317   grafana/grafana:latest          "/run.sh"                10 days ago   Up 10 days             3000/tcp                               osm_grafana.1.spnwyji1yz4sdj8z2k38nqvbi
# 8bcf42ae355b   wurstmeister/zookeeper:latest   "/bin/sh -c '/usr/sb…"   10 days ago   Up 10 days (healthy)   22/tcp, 2181/tcp, 2888/tcp, 3888/tcp   osm_zookeeper.1.yhlb0iuky0vxn88hd5jgxogpx

Create a VIM for Orchestration

In this case, we use OpenStack VIM. OpenStack provides an Identity API on :5000 port. Also, into OpenStack a tenant, a user and a management network must be created. After this, is possible to create the VIM in OSM. Use the next command:

osm vim-create --name <VIM_name_in_OSM> \
  --user <user> --password <password> \
  --auth_url http://<OpenStack_IP>:5000/v3/ \
  --tenant "<tenant_name>" \
  --account_type openstack \
  --config='{management_network_name: <mgmt_network>}' \
  --description "VIM for OSM"

For validating the VIM creation in OSM use:

osm vim-list
# +-------------------+--------------------------------------+-------------------+
# | vim name          | uuid                                 | operational state |
# +-------------------+--------------------------------------+-------------------+
# | <VIM_name_in_OSM> | df3d7b4c-1340-4f2d-9484-a5be7d07b7d0 | ENABLED           |
# +-------------------+--------------------------------------+-------------------+

Create a Kubernetes Cluster for Orchestration

In this case, we use a Kubernetes cluster deployed using Juju Charms. The most important things to consider for OSM configuration is the config.yaml file and the management network previously configured for the VIM. For creating the Kubernetes Cluster in OSM use the next command:

NOTE: The versions of Kubernetes client and server is 1.20.1.

osm k8scluster-add --creds <path_to_config.yaml> --version '<kubernetes_version>' --vim <vim_id> --description "K8s cluster for OSM" --k8s-nets '{"net1": "<mgmt_network>"}' <k8s_name_in_OSM>

For validating the Kubernetes cluster creation in OSM use:

osm k8scluster-list
⚠️ **GitHub.com Fallback** ⚠️