Getting Started with microk8s – using Activiti Cloud

This blog post builds on:

https://activiti.gitbook.io/activiti-7-developers-guide/getting-started/getting-started-activiti-cloud

There’s also more, if slightly outdated, here:

https://community.alfresco.com/community/bpm/blog/2018/12/10/getting-started-with-activiti-7-beta

The main focus of this post is more about making it work with https://github.com/ubuntu/microk8s work than it is to do with Activiti

This is based on Ubuntu 18.04

Before starting it’s a good idea to configure your firewall – see https://github.com/ubuntu/microk8s/issues/67 for more details

sudo ufw allow in on cbr0 && sudo ufw allow out on cbr0
sudo ufw default allow routed

First install microk8s:

sudo snap install microk8s --classic

If you’re using kubectl in other contexts then you may want to configure it – being careful not to overwrite an existing file.
This allows you to use kubectl rather than microk8s.kubectl if you want to

test -f ${HOME}/.kube/config || microk8s.kubectl config view --raw > $HOME/.kube/config

If you want details about your cluster

microk8s.inspect
microk8s.kubectl config get-contexts
microk8s.kubectl config use-context microk8s

There are various plugins that you will want or need so install these:

microk8s.enable dns dashboard storage ingress

Wait for everything to be ready

microk8s.status --wait-ready

You’ll need some storage:
Create a file pvc.yaml which allocates some storage and apply it


kind: PersistentVolume
apiVersion: v1
metadata:
  name: task-pv-volume
  labels:
    type: local
spec:
  storageClassName: manual
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/data/microk8s"
microk8s.kubectl apply -f pvc.yaml

Have a look at your storage:

microk8s.kubectl get pv

Set up helm – you might need to install it first which you can do with snap.

helm init

and wait for everything to settle down

watch microk8s.kubectl get all --all-namespaces

Add the activiti charts

helm repo add activiti-cloud-charts https://activiti.github.io/activiti-cloud-charts/
helm repo update

You need an IP address to pass to the helm install so it’s a good idea to create a new, non-routeable, one against your existing interface so that if the IP address changes e.g. different DHCP lease then it will still work.

ip addr show dynamic
sudo ip address add 192.168.99.99/32 dev enxc8f750d9c720
microk8s.kubectl create namespace activiti7

Now you can just install as per the getting started guide

helm install --name example activiti-cloud-charts/activiti-cloud-full-example --set global.gateway.domain=192.168.99.99.nip.io --namespace=activiti7
Activiti Keycloak : http://activiti-cloud-gateway.activiti7.192.168.99.99.nip.io/auth
Activiti Gateway : http://activiti-cloud-gateway.activiti7.192.168.99.99.nip.io/
Activiti Modeler : http://activiti-cloud-gateway.activiti7.192.168.99.99.nip.io/activiti-cloud-modeling
Activiti GraphiQL : http://activiti-cloud-gateway.activiti7.192.168.99.99.nip.io/notifications/graphiql

and wait for everything to settle down

watch microk8s.kubectl get all --all-namespaces

Accessing the k8s dashboard

Get the IP via:

kubectl get svc -n kube-system

then get the token using:

kubectl describe secret kubernetes-dashboard --namespace=kube-system

Leave a Reply

Your email address will not be published. Required fields are marked *