tmcgilchrist / ocurrent-deployer

A pipeline that deploys unikernels and other services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deployer

This repository contains an OCurrent pipeline for deploying the various other pipelines we use. When a new commit is pushed to the live branch of a source repository, it builds a new Docker image for the project and upgrades the service to that version.

The main configuration is in pipeline.ml. For example, one entry is:

ocurrent, "docker-base-images", [
  docker "Dockerfile"     ["live", "ocurrent/base-images:live", [`Toxis, "base-images_builder"]];
];

This says that for the https://github.com/ocurrent/docker-base-images repository:

  • We should use Docker to build the project's Dockerfile (and report the status on GitHub for each branch and PR).
  • For the live branch, we should also publish the image on Docker Hub as ocurrent/base-images:live and deploy it as the image for the base-images_builder Docker service on toxis.

The pipeline also deploys some MirageOS unikernels, e.g.

mirage, "mirage-www", [
  unikernel "Dockerfile" ~target:"hvt" ["EXTRA_FLAGS=--tls=true"] ["master", "www"];
  unikernel "Dockerfile" ~target:"xen" ["EXTRA_FLAGS=--tls=true"] [];     (* (no deployments) *)
];

This builds each branch and PR of https://github.com/mirage/mirage-www for both hvt and xen targets. For the master branch, the hvt unikernel is deployed as the www Albatross service.

See VM-host.md for instructions about setting up a host for unikernels.

Suggested workflows

To update a deployment that is managed by ocurrent-deployer (which could be ocurrent-deployer itself):

  1. Make a PR on that project's repository targetting its master branch as usual.
  2. Once it has passed CI/review, a project admin will git push origin HEAD:live to deploy it.
  3. If it works, the PR can be merged to master.

To add new services:

  1. Deploy the service(s) manually using docker stack deploy first.
  2. Once that's working, make a PR against the ocurrent-deployer repository adding a rule to keep the services up-to-date.

About

A pipeline that deploys unikernels and other services


Languages

Language:OCaml 90.0%Language:Dockerfile 9.3%Language:Makefile 0.6%