Installing a Docker Swarm cluster inside VirtualBox with Docker Machine

I’ve documented the process of installing a Docker Swarm cluster inside VirtualBox with Docker Machine. This allows experimenting with Docker Swarm, the simple docker container orchestrator, over VirtualBox.

This allows you to play with orchestration scenarii without having to install docker on real machines.

Also, such an environment may be handy for teaching if you don’t want to install docker on the lab’s host. Installing the docker engine on Linux hosts for unprivileged users requires some care (refer to docs about securing Docker), as the default configuration may allow learners to easily gain root privileges (which may or not be desired).

See more at http://www-public.telecom-sudparis.eu/~berger_o/docker/install-docker-machine-virtualbox.html

Making Debian stable/jessie images for OpenStack with bootstrap-vz and cloud-init

I’m investigating the creation of VM images for different virtualisation solutions.

Among the target platforms is a destop as a service platform based on an OpenStack public cloud.

We’ve been working with bootstrap-vz for creating VMs for Vagrant+VirtualBox so I wanted to test its use for OpenStack.

There are already pre-made images available, including official Debian ones, but I like to be able to re-create things instead of depending on some external magic (which also means to be able to optimize, customize and avoid potential MitM, of course).

It appears that bootstrap-vz can be used with cloud-init provided that some bits of config are specified.

In particular the cloud_init plugin of bootstrap-vz requires a metadata_source set to “NoCloud, ConfigDrive, OpenStack, Ec2“. Note we explicitely spell it ‘OpenStack‘ and not ‘Openstack‘ as was mistakenly done in the default Debian cloud images (see https://bugs.debian.org/854482).

The following snippet of manifest provides the necessary bits :

---
name: debian-{system.release}-{system.architecture}-{%Y}{%m}{%d}
provider:
  name: kvm
  virtio_modules:
  - virtio_pci
  - virtio_blk
bootstrapper:
  workspace: /target
  # create or reuse a tarball of packages
  tarball: true
system:
  release: jessie
  architecture: amd64
  bootloader: grub
  charmap: UTF-8
  locale: en_US
  timezone: UTC
volume:
  backing: raw
  partitions:
    #type: gpt
    type: msdos
    root:
      filesystem: ext4
      size: 4GiB
    swap:
      size: 512MiB
packages:
  # change if another mirror is closer
  mirror: http://ftp.fr.debian.org/debian/
plugins:
  root_password:
    password: whatever
  cloud_init:
    username: debian
    # Note we explicitely spell it 'OpenStack' and not 'Openstack' as done in the default Debian cloud images (see https://bugs.debian.org/854482)
    metadata_sources: NoCloud, ConfigDrive, OpenStack, Ec2
  # admin_user:
  #   username: Administrator
  #   password: Whatever
  minimize_size:
    # reduce the size by around 250 Mb
    zerofree: true

I’ve tested this with the bootstrap-vz version in stretch/testing (0.9.10+20170110git-1) for creating jessie/stable image, which were booted on the OVH OpenStack public cloud. YMMV.

Hope this helps

Using org-mode and org-reveal for teaching material

I’ve finally put together in a single example repo an example of the way I manage teaching material with org-mode.

It needs more docs and work, but should be usable. Docs and demo at http://www-public.tem-tsp.eu/~berger_o/org-teaching/ and the Gitlab repo at https://gitlab.com/olberger/org-teaching for those curious.

It doesn’t intend to be a full-fleshed product (also the name is just a codename), but release early, release often, they said 😉

Of course, teaching requires much more stuff than slides and handbooks, but eh, that’s my contribution for the moment.

Update 2017/05/18: I’ve updated the docs and repo to include generation of a “printed slides deck” in PDF, using DeckTape.

Long time no see … been teaching Web architecture and apps

I’ve been away for long from my blog, quite busy teaching and coordinating the CSC4101 course on Web architectures and applications for the engineering school.

The course is almost over and it’ll be time for documenting some of the things I’ve played with. Mainly the org-mode based system I’ve used to manage a single source file for multiple documents used for teaching (slides, handbook, etc.).

Expect a bit more life here in the coming days, hopefully.

Deploying parallel Eclipse installations for teaching labs

I’ve worked on documenting and automating the deployment of Eclipse installations for several teaching labs of Telecom SudParis.

The recently introduced Eclipse Installer (Oomph) allows to install several parallel Eclipse installations containing diverse versions of Eclipse and bundles, so that each specific installation only contains a limited set of features, and that common plugins are pooled in a shared space.

This allows to deploy different Eclipse installations for different course labs, containing only the needed features, and minimizing the disk space needed for the whole.
Previously, we installed pretty much everything in a single place (yum install eclipse*), which lead to providing students with all possible languages support and features, on every machines, by default.
One of the main expected benefits of the new approach is to minimize Eclipse startup times, but this should also help avoid conflicting plugins.
If the experiment proves useful, we’ll then have one Eclipse installation for each needing computer science lab, all under different subdirs of /opt/eclipse/. For instance students registered in CSC4101 will start Eclipse by executing /opt/eclipse/CSC4101/eclipse/eclipse, giving them features for PHP and Symfony development (resp /opt/eclipse/CSC4102/eclipse/eclipse for CSC4102, for Java + Maven, etc.).

I’ve made available a document which explains the process, which was originally documented using org-mode’s babel feature which allows to write “litterate devops” documents containing executable instructions. I’ve used a Vagrant + Virtualbox setup to create the installation inside a Fedora VM, which mimics the target system for our lab machines.

The git repo of the corresponding project should be accessible for anyone interested.