Description: This document describes the high-level view of the OSM Charms and interfaces. An important note is that these charms Kubernetes Charms, so they must be deployed on top of a Kubernetes Cloud using Juju.
In the current directory, there is one folder "interfaces" that has all the interfaces of the OSM components, which are basically two: osm-nbi, and osm-ro.
Additionally, we can see six folders that contain each OSM core components: lcm-k8s, mon-k8s, nbi-k8s, pol-k8s, ro-k8s, and ui-k8s.
Then, we can see a folder "bundle" which has the templates for the OSM bundles in single instance and HA.
The "layers" folder include one common layer for all the osm charms (osm-common)
├── bundles │ ├── osm │ └── osm-ha ├── interfaces │ ├── osm-nbi │ └── osm-ro ├── layers │ └── osm-common ├── lcm-k8s ├── mon-k8s ├── nbi-k8s ├── pol-k8s ├── ro-k8s └── ui-k8s
All the charms have a very similar structure. This subsection explains the purpose of each file inside the charms, as well as basic steps to get started.
The folder structure for each charm looks like this:
<charm>-k8s/ ├── config.yaml ├── icon.svg ├── layer.yaml ├── metadata.yaml ├── reactive │ ├── <charm>.py │ └── spec_template.yaml ├── README.md ├── .gitignore ├── .yamllint.yaml └── tox.ini
Purpose of each file:
Each interface needs at least three files:
Additionally, there are also files for copyright and a README that explains how to use the interface.
sudo apt install tox -y
./lint.sh
./build.sh
# Generate bundle from built charms python3 generate_bundle.py --local --destination osm.yaml # Help python3 generate_bundle.py --help
sudo snap install juju --classic juju bootstrap localhost osm-lxd
NOTE: This will be removed once the installer is merged.
sudo snap install osmclient sudo snap alias osmclient.osm osm sudo snap connect osmclient:juju-client-observe sudo snap connect osmclient:ssh-public-keys sudo snap connect osmclient:network-control osmclient.overlay # Execute the commands printed by this command to enable native charms
sudo snap install microk8s --classic sudo usermod -a -G microk8s ubuntu sudo chown -f -R ubuntu ~/.kube newgrp microk8s microk8s.status --wait-ready microk8s.enable storage dns # (metallb) is optional juju bootstrap microk8s osm-k8s
juju add-model osm juju deploy ./osm.yaml --overlay vca-overlay.yaml
watch -c juju status --color # Wait until every application is in active state export OSM_HOSTNAME=<ip-nbi> osm ns-list # ...