Change-Id: I40daa85f7e26b498049ea4befc3e9b3bd779d607
2.6 KiB
How-To deploy sunbeam charms
Sunbeam charms requires juju environment with a registered kubernetes cloud.
Below are the steps to deploy sunbeam charms on juju with microk8s cloud on a single node.
Install microk8s
Install microk8s snap
Run below commands to install microk8s snap
sudo snap install microk8s --classic
sudo usermod -a -G microk8s $USER
sudo chown -f -R $USER ~/.kube
su - $USER
microk8s status --wait-ready
If required, set proxy variables
Change the proxy values as per the environment.
echo "HTTPS_PROXY=http://squid.internal:3128" >> /var/snap/microk8s/current/args/containerd-env
echo "NO_PROXY=10.0.0.0/8,192.168.0.0/16,127.0.0.0/8,172.16.0.0/16" >> /var/snap/microk8s/current/args/containerd-env
sudo systemctl restart snap.microk8s.daemon-containerd.service
Enable add-ons
In the below commands, change the following
10.245.160.2
to point to DNS server10.5.100.100-10.5.100.110
to IP range allocations for loadbalancers
microk8s enable dns:10.245.160.2
microk8s enable hostpath-storage
microk8s enable metallb:10.5.100.100-10.5.100.110
Install juju
Run below commands to install juju controller on microk8s
sudo snap install juju --classic
juju bootstrap --config controller-service-type=loadbalancer microk8s micro
Deploy Sunbeam charms
See ./reference-bundles.rst for information about example bundles available here.
To use locally built charms, update the following in the bundle
charm:
to point to locally built charm filechannel:
should be commented
Run below commands to deploy the bundle
juju add-model sunbeam
juju deploy ./doc/bundles/full.yaml --trust
Check juju status
and wait for all units to be
active.
Testing OpenStack Control plane
- Install openstackclients snap
sudo snap install openstackclients --channel xena/stable
- Generate and source the openrc file. (This example requires
jq
to be installed.)
juju run-action --wait keystone/leader get-admin-account --format json | jq -r '.[].results.openrc' > openrc
source ./openrc
- Run some openstack commands
openstack endpoint list
At this point launching a VM does not work as nova-compute charm does not support bringing up ovn-controller.