One Machine: Charmed OSM and Microstack
Why Charmed OSM?
- Current. Charmed OSM tracks upstream releases.
-
Simple. Minimize administration and operations with a juju deployed OSM installation.
juju deploy osm
and juju will handle everything. - Flexible and scalable. It can be deployed on any Kubernetes cluster (Microk8s, Charmed Kubernetes, EKS, and GKE). Charmed OSM can be deployed in standalone or high availability mode.
- Secure. Canonical team uses rocks.canonical.com:5000 registry to spin the docker images used in Charmed OSM, applying security patches to them (also pushed to upstream).
Why Microstack?
- Openstack in one machine. No need for a big infrastructure to start playing with Openstack.
- Fast. Have a fully functional Openstack in a few minutes.
- Made for everyone. No need to understand the depths of Openstack.
Requirements
- Ubuntu Bionic
- 4 CPU
- 16 GB RAM
- 80G free disk space
Install Charmed OSM
Bootstrap Juju on LXD
sudo snap install juju --classic
juju bootstrap localhost osm-lxd
Install MicroK8s
sudo snap install microk8s --channel 1.14/stable --classic
sudo usermod -a -G microk8s $USER
newgrp microk8s
microk8s.status --wait-ready
microk8s.enable storage dns
sudo snap alias microk8s.kubectl kubectl
Install osmclient snap
sudo snap install osmclient --edge
sudo snap alias osmclient.osm osm
sudo snap connect osmclient:juju-client-observe
osmclient.overlay
Deployment
juju bootstrap microk8s osm-on-k8s
juju add-model osm
juju deploy osm --overlay vca-overlay.yaml
Install Microstack
sudo snap install microstack --classic --channel=edge/rocky
sudo microstack.init --auto
Add Ubuntu image
wget https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img
microstack.openstack image create \
--public \
--disk-format qcow2 \
--container-format bare \
--file ubuntu-16.04-server-cloudimg-amd64-disk1.img \
ubuntu1604
Add Keypair
ssh-keygen -t rsa -N "" -f ~/.ssh/microstack
microstack.openstack keypair create --public-key ~/.ssh/microstack.pub microstack
Check installation
$ juju status
Model Controller Cloud/Region Version SLA Timestamp
osm osm-on-k8s microk8s/localhost 2.6.8 unsupported 13:34:27Z
App Version Status Scale Charm Store Rev OS Address Notes
grafana-k8s active 1 grafana-k8s jujucharms 21 kubernetes 10.152.183.158
kafka-k8s active 1 kafka-k8s jujucharms 9 kubernetes 10.152.183.74
lcm-k8s active 1 lcm-k8s jujucharms 25 kubernetes 10.152.183.234
mariadb-k8s active 1 mariadb-k8s jujucharms 21 kubernetes 10.152.183.236
mon-k8s active 1 mon-k8s jujucharms 20 kubernetes 10.152.183.220
mongodb-k8s active 1 mongodb-k8s jujucharms 19 kubernetes 10.152.183.184
nbi-k8s active 1 nbi-k8s jujucharms 28 kubernetes 10.152.183.164
pol-k8s active 1 pol-k8s jujucharms 20 kubernetes 10.152.183.77
prometheus-k8s active 1 prometheus-k8s jujucharms 20 kubernetes 10.152.183.6
ro-k8s active 1 ro-k8s jujucharms 25 kubernetes 10.152.183.111
ui-k8s active 1 ui-k8s jujucharms 33 kubernetes 10.152.183.129
zookeeper-k8s active 1 zookeeper-k8s jujucharms 28 kubernetes 10.152.183.23
Unit Workload Agent Address Ports Message
grafana-k8s/0* active idle 10.1.1.45 3000/TCP ready
kafka-k8s/0* active idle 10.1.1.46 9092/TCP ready
lcm-k8s/0* active idle 10.1.1.51 9999/TCP ready
mariadb-k8s/0* active idle 10.1.1.38 3306/TCP ready
mon-k8s/0* active idle 10.1.1.50 8000/TCP ready
mongodb-k8s/0* active idle 10.1.1.41 27017/TCP ready
nbi-k8s/0* active idle 10.1.1.49 9999/TCP ready
pol-k8s/0* active idle 10.1.1.48 80/TCP ready
prometheus-k8s/0* active idle 10.1.1.43 9090/TCP ready
ro-k8s/0* active idle 10.1.1.47 9090/TCP ready
ui-k8s/0* active idle 10.1.1.52 80/TCP ready
zookeeper-k8s/0* active idle 10.1.1.44 2181/TCP,2888/TCP,3888/TCP ready
Continue to the following steps only when every component is ready. Export the OSM_HOSTNAME
variable and confirm that the platform is operational:
$ export OSM_HOSTNAME=10.152.183.164
Add microstack as a VIM
osm vim-create --name microstack-site \
--user admin \
--password keystone \
--auth_url http://10.20.20.1:5000/v3 \
--tenant admin \
--account_type openstack \
--config='{security_groups: default,
keypair: microstack,
project_name: admin,
user_domain_name: default,
region_name: microstack,
insecure: True,
availability_zone: nova,
version: 3}'
osm vim-list # Check if the VIM has been successfully added
Example: Basic Network Service
Download packages
wget http://osm-download.etsi.org/ftp/osm-5.0-five/6th-hackfest/packages/hackfest_basic_vnf.tar.gz
wget http://osm-download.etsi.org/ftp/osm-5.0-five/6th-hackfest/packages/hackfest_basic_ns.tar.gz
Upload packages
osm upload-package hackfest_basic_vnf.tar.gz
osm upload-package hackfest_basic_ns.tar.gz
Create a basic Network Service
osm ns-create --ns_name hackfest_basic_ns \
--nsd_name hackfest_basic-ns \
--vim_account microstack-site
Checking the status of a Network Service
$ osm ns-list
+-------------------+--------------------------------------+--------------------+---------------+-----------------+
| ns instance name | id | operational status | config status | detailed status |
+-------------------+--------------------------------------+--------------------+---------------+-----------------+
| hackfest_basic_ns | 0133e3fe-e648-4b3d-8cf6-d55fed8b458d | running | configured | done |
+-------------------+--------------------------------------+--------------------+---------------+-----------------+
$ microstack.openstack server list
+--------------------------------------+-----------------------------------------+--------+---------------------------------+------------+-----------------------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+-----------------------------------------+--------+---------------------------------+------------+-----------------------+
| 13707a28-9644-4148-aadd-46707fbf40a5 | hackfest_basic_ns-1-hackfest_basic-VM-1 | ACTIVE | mgmtnet=192.168.1.12 | ubuntu1604 | hackfest_basic-VM-flv |
+--------------------------------------+-----------------------------------------+--------+---------------------------------+------------+-----------------------+