Tag Archives: python

Microk8s and Wagtail Bakery

Playing around with Kubernetes? Just found the easy way to test it using Microk8s.io MicroK8s make you focus on building and testing your application to run on K8s. It’s best tool to test microservices locally.

To start running a Wagtail CMS a Python CMS, we selected the bakery demo.

Here we have documented how to run the demo using Microk8s.
Assuming you have run microk8s on you local machine, start creating the Docker image. Another great tool to convert docker-compose file to kubernetes is to use the kompose.io.

$ docker build . -t bakery_app2:local
$ docker save bakery_app2 > bakeryapp.tar

$ microk8s.ctr  -n k8s.io image import bakeryapp.tar
$ microk8s.ctr -n k8s.io images list | grep bakery

See the deployment/app-deployment.yaml it is using the local image bakerydemo_app:latest Then start deploying the yaml files using microk8s.kubectl apply -f command.

Sample *.yaml files are inside directory deployment or generate it using the command below:

$ cd deployment
$ kompose convert -f ../docker-compose.yml 

Here is Wagtails Demo running inside microk8s screenshots.

Making it easier to migrate to use K8 can be on Google or AWS.

LXD Web Interface

Been playing and revisiting with LXD and finally looking for an interface for it. Found LXDUI. Although you can manage it in command prompt, too using lxc commands, sometimes its best to get a friendly interface for it.

Here is a screenshot of the UI for LXD:

Created a small fix for it for the Clone and Move Container buttons to work. 😀 See pull request #289

Reference:
https://github.com/AdaptiveScale/lxduihttps://linuxcontainers.org/lxd/introduction/