First steps with the Canonical Distribution of Open Source Mano

Canonical Distribution of OSM

Welcome to Canonical Distribution of OSM!

The objective of this page is to give an overview of the first steps to get up and running with Canonical Distribution of OSM (CDO).


  • OS: Ubuntu 18.04 LTS
    • 2 CPUs
    • 4 GB RAM
    • 40GB disk
    • Single interface with Internet access.
    • 4 CPUs
    • 8 GB RAM
    • 80GB disk
    • Single interface with Internet access.

User Guide

Installing OSM has never been easier. With a few commands, you will be able to deploy OSM in an empty environment using microk8s.

First of all, let’s download the repository of Canonical Distribution of OSM.

git clone 
cd ./canonical-osm/


To install Canonical Distribution of OSM locally you should execute the following commands, and it will be installed in a local Microk8s.

sudo snap install microk8s --classic
sudo snap install juju --classic
microk8s.status --wait-ready
microk8s.enable dashboard storage dns
echo "./" | at now
juju bootstrap localhost osm-lxd
juju bootstrap microk8s osm-on-k8s
juju add-model osm
juju create-storage-pool operator-storage kubernetes storage-class=microk8s-hostpath
juju create-storage-pool osm-pv kubernetes storage-class=microk8s-hostpath
juju create-storage-pool packages-pv kubernetes storage-class=microk8s-hostpath
juju deploy cs:~charmed-osm/osm --overlay overlay.yaml

Checking the status

When the juju deploy command is executed, it will take several minutes to have the OSM up and running. To see the status of the deployment execute watch -c juju status --color. Also, you can execute watch kubectl -n osm get pods to see the status of the Kubernetes Pods.

You will see this output from the juju status command when the deployment is finished.

juju status
Model  Controller  Cloud/Region        Version  SLA          Timestamp
osm    osm-on-k8s  microk8s/localhost  2.6.5    unsupported  11:10:16Z

App             Version  Status  Scale  Charm           Store       Rev  OS          Address         Notes
grafana-k8s              active      1  grafana-k8s     jujucharms   15  kubernetes
kafka-k8s                active      1  kafka-k8s       jujucharms    1  kubernetes
lcm-k8s                  active      1  lcm-k8s         jujucharms   20  kubernetes
mariadb-k8s              active      1  mariadb-k8s     jujucharms   13  kubernetes
mon-k8s                  active      1  mon-k8s         jujucharms   14  kubernetes
mongodb-k8s              active      1  mongodb-k8s     jujucharms   14  kubernetes
nbi-k8s                  active      1  nbi-k8s         jujucharms   21  kubernetes
pol-k8s                  active      1  pol-k8s         jujucharms   14  kubernetes
prometheus-k8s           active      1  prometheus-k8s  jujucharms   12  kubernetes
ro-k8s                   active      1  ro-k8s          jujucharms   17  kubernetes
ui-k8s                   active      1  ui-k8s          jujucharms   23  kubernetes
zookeeper-k8s            active      1  zookeeper-k8s   jujucharms   16  kubernetes

Unit               Workload  Agent  Address    Ports                                Message
grafana-k8s/0*     active    idle  3000/TCP                             configured
kafka-k8s/0*       active    idle  9092/TCP                             configured
lcm-k8s/0*         active    idle  80/TCP                               configured
mariadb-k8s/0*     active    idle  3306/TCP,4444/TCP,4567/TCP,4568/TCP  configured
mon-k8s/0*         active    idle  8000/TCP                             configured
mongodb-k8s/0*     active    idle  27017/TCP                            configured
nbi-k8s/0*         active    idle  9999/TCP                             configured
pol-k8s/0*         active    idle  80/TCP                               configured
prometheus-k8s/0*  active    idle  9090/TCP                             configured
ro-k8s/0*          active    idle  9090/TCP                             configured
ui-k8s/0*          active    idle  80/TCP                               configured
zookeeper-k8s/0*   active    idle  2181/TCP,2888/TCP,3888/TCP           configured

OSM Client

If you want to interact with OSM using the OSM client, just execute the following after the deployment is finished:

source ~/.osmclient.env

If you want to see the the commands available for the OSM client, execute osm --help.


To uninstall Canonical Distribution of OSM you should execute the following command.


Start playing with OSM

After the deployment is finished, check the IP of the ui-k8s application in the juju status command, and go to in your web-browser.

Access services from outside

If you have installed OSM in an external machine, or in a VM, you can access it enabling the ingress module on microk8s, and exposing the application. Enter the following commands, where <ip> is the external ip of the machine in which the OSM has been installed.

microk8s.enable ingress
juju config ui-k8s juju-external-hostname=osm.<ip>
juju expose ui-k8s
juju config prometheus-k8s juju-external-hostname=prometheus.<ip>
juju expose prometheus-k8s
juju config grafana-k8s juju-external-hostname=grafana.<ip>
juju expose grafana-k8s

The ingress module uses nginx. By default, it has the option proxy-body-size to 1m. This will be a problem if a VNF package of more than 1m is uploaded. To solve it, we only have to add an annotation to the ingress.

kubectl -n osm edit ingress ui-k8s

# Add the following line in the annotations "0"

You can access now these services:

  • OSM: http://osm.<ip>
  • Prometheus: http://prometheus.<ip>
  • Grafana: http://grafana.<ip>


Known issues

Microk8s not starting on reboot

Microk8s is not started properly. The bug is already reported:

Workaround: Just execute microk8s.start on reboot. Pods will be available after a few minutes.


If you have any trouble with the installation, please contact us, we will be glad to answer your questions:

1 Like

In environments with restricted network access, you may encounter an error similar to this:

ERROR cannot deploy bundle: cannot add charm "cs:~charmed-osm/grafana-k8s-13": cannot retrieve charm "cs:~charmed-osm/grafana-k8s-13": cannot get archive: Get dial tcp: lookup on read udp> i/o timeout

In order to solve this, we need to edit the kube-dns configuration to point to your DNS servers. Edit the configuration and both sets of DNS addresses accordingly:

microk8s.kubectl -n kube-system edit configmap/kube-dns

kube-dns will automatically reload the configuration, so re-run juju deploy command and verify that the error is resolved.

Get the name of the kube-dns pod:

$ kubectl -n kube-system get pods
NAME                                              READY   STATUS    RESTARTS   AGE
heapster-v1.5.2-6b5d7b57f9-c9vln                  4/4     Running   0          67m
hostpath-provisioner-6d744c4f7c-cr9br             1/1     Running   0          71m
kube-dns-6bfbdd666c-xrnnb                         3/3     Running   3          71m
kubernetes-dashboard-6fd7f9c494-zx6s9             1/1     Running   0          71m
monitoring-influxdb-grafana-v4-78777c64c8-lsh8l   2/2     Running   2          71m

Check the logs for dnsmasq container in the pod:

$ kubectl -n kube-system logs kube-dns-6bfbdd666c-xrnnb dnsmasq

Once dnsmasq is able to resolve hostnames, you can continue with the installation.


Thanks for the info… but can you please elaborate a bit on the needed changes? E.g. do we edit the upstreamNameservers only or also the What are the correct values? how should we get them? E.g. I tries an nslookup and got the addresses from there to put on the DNS config… saved and exited… but didn’t work. I still have same error.

Can you please mention a bit more detailed how to fix this error? Thank you and sorry… forgot to mention… newbie alert :slight_smile:

hello again,
Whatever attempt I did with editing that file didn’t work.

I managed to solve this with:
sudo iptables -P FORWARD ACCEPT
(ubuntu 18.04 fresh install on a VM)

After exposing the services, I am receiving a Disallowed Host error from Django. Is there a juju or kubernetes configuration settings to allow access from the host of the VM host? I am using multipass to run ubuntu 18.04 and the OSM environment.

Found the override file: /var/snap/microstack/common/etc/horizon/local_settings.d/

Reference article:

Excellent. Does this mean that your problem is solved?

Yes and no. I have been trying to follow the Canonical tutorial here. As I wrote above, I am installing on a multipass VM and want to access the GUI from my laptop. Following this article, enabling ingress and exposing the services, the snap install of microstack --classic --beta installed a with ALLOWED_HOSTS set to internal VM addresses; overriding using the local_settings.d file worked. But I found that enabling the ingress module causes nginx.service to no longer restart. I rebuilt a brand new VM today and install microstack --classic --edge and the ALLOWED_HOSTS setting has been updated to *.

Yes, I can access the Web Gui at However, this is showing me the openstack web page not the OSM web page that I have seen in the ETSI OSM presentation videos. Also, after the exposing osm/prometheus/grafana services per the article, all addresses are resolving to the same openstack gui rather than 3 different services.

The instructions to expose the services above are identical to several other references, so should I be expecting the OSM Web UI or the Openstack Web UI? If the former, do you have any pointers how to properly expose it?

Hello @aahamlin!

You’re having that issue basically because ingress and the microstack dashboard are using basically the same port.

I’m going to find out the way of changing the microstack dashboard port, and will come back to you.

In the meantime, you can disable ingress, and use sshuttle to access the OSM services.

sshuttle -r ubuntu@<ip> -N -v
# Access the IPs of the services shown by the `juju status` command

Regarding the ALLOWED_HOSTS, I’m going to find out the way to add an IP to that, but in the meantime you can map it to your localhost by using the -L flag:

ssh ubuntu@<ip> -L 8080:localhost:80

Thanks @davigar15

Your reply confirms my deduction of the issue. Thanks for suggestions, I will give them a try tomorrow. If you do find a way to alter the microstack dashboard port that would be appreciated, if I figure it out I’ll post back.

This is the first time I have used multipass. I had hoped the tutorial would provide a simple way to get all the way to a running OSM installation, including accessing the web gui. :slight_smile:

The edge release of microstack (or the use of the local_setting.d directory overrides) have gotten me past the ALLOWED_HOSTS issue for the moment.

Hello @aahamlin,

I have spoken with the main developer of microstack, and we sort out a list of steps that should solve the issue you’re having. When installing microstack, do this:

sudo snap install microstack --edge --classic
sudo snap set microstack
sudo snap set microstack*
sudo microstack.init --auto

Then try to access the openstack dashboard at http://<VM_IP>:8080
That should also unblock you from not being able to use the microk8s ingress, since the openstack dashboard will be running in another port.

PS: I will test those steps, but if you’re able to test it before me, please make sure you ping me how did it go.

Ping me if you need anything.

1 Like

I don’t see the file. Can anyone please help to point me where I can find it?