Opslag

Making the Canonical distribution of Kubernetes, deployed using juju, work with the vsphere cloud provider

Billede
DISCLAIMER: As per the 1.9.4 update setting UUID in the configuration file is no longer supported, which renders this guide obsolete Lately I have been working with setting up a production ready kubernetes cluster. We are hosted in a vsphere private cloud. I came accross juju and the Canonical Distribution of Kubernetes (https://jujucharms.com/canonical-kubernetes/) which gives you a really smart and easy way to handle your cluster. Unfortunately CDK does not support vsphere storage provisioning out of the box even though it's supported natively in Kubernetes (it does require some setup). I know that Canonical are working on adding vsphere support but until then, here's how to achieve it. This post covers Kubernetes 1.9+ because setting up the vsphere cloud provider for kubernetes was simplified a lot with this release. Official VMware docs:  https://vmware.github.io/vsphere-storage-for-kubernetes/documentation/existing.html  Note that they differ from the current k

Localization of graphic resources for a Python Flask website

Over at Hungry.dk we are working hard on getting an Irish version of our site ready. In Ireland the company will be named Marvin.ie , and though it will have the same look and feel, there are of course graphic resources, that needs to be localized, such as logo's, graphics containing text, available payment types etc. So we needed to come up with a strategy for localizing these resources. We are already using the excellent Flask-Babel extension to handle string/text localization, so an easy approach would be to simply use it for the resource reference as well. However I really prefer to keep these things out of the translation files, as it quickly becomes tedious and boring work to maintain it there. Basically what I wanted was for both (and any future) sites to use the same set of resources, with the possibility to override any resource on a per locale basis. I wanted to control which resources to have localized versions for usng the filesystem only. Example: The resourc