If you want to know more about what happened during the installation, then you should continue, if not, you can skip to the next section.
The steps followed during installation are as follows:
- Installation of snaps for MicroK8s and Juju
- Setting up the MicroK8s
- Bootstrapping the Juju controller on MicroK8s and LXD clusters
- Deploying the charmed OSM bundle
- Installation of snap for OSM client
- Integration of charmed OSM with Microstack VIM
- Onboarding VNFs and KNFs
Snaps installation
The first thing that script does is installs the snaps of MicroK8s and Juju using the following commands
sudo snap install microk8s --classic
Sudo snap install juju --classic
Charmed OSM installation uses multiple charmed operators that are managed by Juju for day-to-day operations such as the backup and restoration of the platform. It runs on top of a Kubernetes cluster cloud, and we use MicroK8s for this.
To see all the snap packages installed on your system, use this command:
sudo snap list
Setup MicroK8s
MicroK8s is an upstream Kubernetes deployment that can run directly on your workstation. It is a Kubernetes in a snap, which means that all Kubernetes services and supporting libraries are packaged together in a single image that can be installed on over 40 Linux distributions, Windows, and Mac OS. MicroK8s is fully compliant with the upstream Kubernetes, thus you can use it to host your OSM installation.
The MicroK8s cluster must be configured to enable the following addons:
- dns, ingress, storage, and metallb
Your local Kubernetes cluster should now be up and running. You can interact with it by using the microk8s.kubectl command. To verify MicroK8s installation, we can use microk8s.status
.
$ microk8s.status
microk8s is running
high-availability: no
datastore master nodes: 127.0.0.1:19001
datastore standby nodes: none
addons:
enabled:
dns # CoreDNS
ha-cluster # Configure high availability on the current node
ingress # Ingress controller for external access
metallb # Loadbalancer for your Kubernetes cluster
prometheus # Prometheus operator for monitoring and logging
storage # Storage class; allocates storage from host directory
...
For more information on MicroK8s visit https://microk8s.io/.
Found a bug? Report it here.
Setup Juju Controller
The installation script bootstraps Juju controller to MicroK8s to deploy OSM, setting up an LXD cluster on the host system and adding it to the controller. If you wish to know more about the procedure, you can find it in this guide.
Check if the controller has been added:
$ juju controllers
Use --refresh option with this command to see the latest information.
Controller Model User Access Cloud/Region Models Nodes HA Version
osm-vca* osm admin superuser microk8s/localhost 2 1 - 2.8.6
To see the configuration of controller use the following command:
$ juju show-controller osm-vca
osm-vca:
details:
uuid: 4fe941a9-cf2a-4a0a-87c5-578078ea2074
controller-uuid: 4fe941a9-cf2a-4a0a-87c5-578078ea2074
api-endpoints: ['...:17070']
cloud: microk8s
region: localhost
agent-version: 2.8.6
agent-git-commit: 5d0442d3e15952bfc0ce059cb43ef7949ca71aaa
controller-model-version: 2.8.6
mongo-version: 4.0.18
ca-fingerprint: 49:58:C7:46:1E:2A...
ca-cert: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
models:
controller:
uuid: 8b3a8329-1d40-4034-8abd-730f6186c51f
model-uuid: 8b3a8329-1d40-4034-8abd-730f6186c51f
osm:
uuid: 060b8889-6789-4afc-8943-80b7e9c89bc8
model-uuid: 060b8889-6789-4afc-8943-80b7e9c89bc8
unit-count: 14
current-model: admin/osm
account:
user: admin
access: superuser
You can also verify the clouds managed by Juju controller:
$ juju clouds --controller osm-vca
Clouds available on the controller:
Cloud Regions Default Type
2e14cc8e-e427-4605-ab79-3e7b687e957e 1 default k8s
lxd-cloud 1 default lxd
microk8s 1 localhost k8s
Deploy Charmed OSM bundle
To deploy the Charmed OSM Juju Bundle on the controller, a model named osm will be created by the script. On completion, you can expose some OSM services: NBI, NG-UI, Grafana, and Prometheus.
To verify the deployment with services enabled you can check the status of juju:
$ juju status
Model Controller Cloud/Region Version SLA Timestamp
osm osm-vca microk8s/localhost 2.8.6 unsupported 10:42:50Z
App Version Status Scale Charm Store Rev OS Address Notes
grafana-k8s rocks.canonical.com:443/gra... active 1 grafana-k8s jujucharms 32 kubernetes 10.152.183.201 exposed
kafka-k8s rocks.canonical.com:443/wur... active 1 kafka-k8s jujucharms 21 kubernetes 10.152.183.178
...
Unit Workload Agent Address Ports Message
grafana-k8s/2* active idle 10.1.170.79 3000/TCP ready
kafka-k8s/2* active idle 10.1.170.103 9092/TCP ready
...
The following will allow you to check what has been created on MicroK8s:
$ microk8s.kubectl -n osm get all -n osm
NAME READY STATUS RESTARTS AGE
pod/ro-k8s-0 1/1 Running 3 19d
...
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/modeloperator ClusterIP 10.152.183.222 <none> 17071/TCP 20d
...
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/modeloperator 1/1 1 1 20d
...
NAME DESIRED CURRENT READY AGE
replicaset.apps/modeloperator-6797c74575 1 1 1 20d
...
NAME READY AGE
statefulset.apps/ro-k8s 1/1 20d
...
To understand each component of the bundle, see OSM Architecture tutorial
OSM client
Once the bundle has been deployed, a snap for the OSM client will be installed. The Charmed OSM has now been deployed and ready to use.
To verify the client installation use:
$ osm version
Server version: 10.0.0+gc47d045 2020-04-17
Client version: 10.0.0+g42e87fa
You can also access Charmed OSM web GUI using the IP address returned by the following command:
juju status ui-k8s | grep kubernetes | awk '{print $8}'
Microstack installation
MicroStack is an upstream OpenStack deployment that can also run directly on your workstation. It includes all the key components of OpenStack: Keystone, Nova, Neutron, Glance and is evolving extremely fast. Similar to MicroK8s, it is an OpenStack in snap.
In this case, as we have specified the --microstack
option during deployment, the installer will automatically add Microstack to the stack, and configure it so that it can be used by OSM.
The script will install a snap of MicroStack into the host machine. To configure MicroStack, a new network will be created and a router will be set up. Upon configuration, MicroStack will be added to the OSM.
You can check if MicroStack is properly configured with the following commands:
$ microstack.openstack network list
$ microstack.openstack router list
To verify its integration with OSM, do the following:
$ osm vim-list
+-------------+--------------------------------------+-------------------+
| vim name | uuid | operational state |
+-------------+--------------------------------------+-------------------+
| microstack | 8dcb3b1d-a758-498d-b157-c6eb916d2747 | ENABLED |
+-------------+--------------------------------------+-------------------+
For more information on MicroStack visit https://opendev.org/x/microstack.
Found a bug? Report it here.