Beta - Install Fleio with juju

Prerequisites

The beta Fleio installation currently works only on juju microk8s clusters. Follow instructions on the https://juju.is/docs/olm/microk8s page to set up juju with microk8s (follow the guide up until deploying a kubernetes charm).

After installing and configuring microk8s and juju, you should have: - a controller - a cloud - a juju model (called testing in the Juju documentation)

You also need to enable dns, storage and ingress addons on microk8s:

microk8s enable dns storage ingress

On some edge clusters (microk8s, k0s, k3s, minikube …) you may need to install nfs-common on the host machine.

apt install nfs-common

Installing a database charm

Fleio needs a mariadb database. On juju installation you will need to install a charm that provides a mysql relation and add a relation between that charm and fleio.

We recommend using charmed-osm-mariadb-k8s charm - https://charmhub.io/charmed-osm-mariadb-k8s

Install the charm using the following command

juju deploy charmed-osm-mariadb-k8s

Installing Fleio with juju

First you need to create a yaml file named fleio-main-image.yaml with the following contents (replace <license id> and <license key>):

registrypath: hub.fleio.com/fleio_main-2022-04:0
username: <license id>
password: <license key>

The next step is to download the charm, which is available at https://fleio.com/fleio-k8s_ubuntu-20.04-amd64.charm

wget https://fleio.com/fleio-k8s_ubuntu-20.04-amd64.charm

Before moving to the final step, run microk8s status --wait-ready and check the following:

  • microk8s is running

  • dns, ingress and storage addons are enabled (here you might have a slight delay and you will need to wait for these to be enabled).

If everything looks fine, run the following commands after replacing <> placeholders with correct values to deploy Fleio using juju:

Note

The domain you are using should not have the http:// or https:// protocol (e.g. the –config domain=<your-domain> should be –config domain=fleio.com). If you have DNS configured and you want a letsencrypt SSL certificate issued on install, please check Enable letsencrypt SSL certificate.

juju deploy ./fleio-k8s_ubuntu-20.04-amd64.charm --resource fleio-main-image=<fleio_main_image_yaml_path> \
--config releaseSuffix="-2022-04:0" \
--config registry=hub.fleio.com \
--config licenseUUID=<license id> \
--config licenseKey=<license key> \
--config registryUser=<license id> \
--config registryPass=<license key> \
--config admin_user=<super admin username> \
--config admin_pass=<super admin pass> \
--config admin_email=<super admin email> \
--config admin_firstName=<super admin first name> \
--config admin_lastName=<super admin last name> \
--config domain=<your-domain>

juju add relation fleio-k8s mariadb-k8s

Executing juju actions

You can retrieve a list of supported actions using the following command:

juju actions fleio-k8s

You can execute an action using juju run-action command. Example

juju run-action fleio-k8s/leader install-status --wait

Enable letsencrypt SSL certificate

You can have Fleio generate a letsencrypt SSL certificate directly on install by using the tls_email and tls_enableLetsEncrypt config options in the juju deploy command:

juju deploy ./fleio-k8s_ubuntu-20.04-amd64.charm --resource fleio-main-image=<fleio_main_image_yaml_path> \
--config releaseSuffix="-2022-04:0" \
--config registry=hub.fleio.com \
--config licenseUUID=<license id> \
--config licenseKey=<license key> \
--config registryUser=<license id> \
--config registryPass=<license key> \
--config admin_user=<super admin username> \
--config admin_pass=<super admin pass> \
--config admin_email=<super admin email> \
--config admin_firstName=<super admin first name> \
--config admin_lastName=<super admin last name> \
--config tls_email=<your email address> \
--config tls_enableLetsEncrypt=yes \
--config domain=<your-domain>

If you’ve already deployed Fleio with Juju, but without adding those config options then you can enable letsencrypt by accessing the fleio-utils container and run fleiok8s enable-letsencrypt command:

microk8s.kubectl exec -it deploy/fleio-utils -n testing  -- bash
fleiok8s enable-letsencrypt

Known issues

While having multiple replicas for fleio-operations deployment, OpenStack resources (e.g. instances, volumes) that are created via operations sometimes might get duplicated.