Lightweight OCI compatible images for OpenStack Projects
Go to file
Sam Yaple e85357a522 Remove GENERIC flag
Change-Id: I7015bc885b449a0ecbea66e456db1847ea756470
2017-10-03 15:08:53 -04:00
dockerfiles Adjust the generic dockerfiles base for new gate 2017-10-01 01:02:32 -04:00
playbooks Publish images to DockerHub 2017-10-02 22:26:42 -04:00
plugins/qemu-utils Add initial generic plugin and framework: qemu-utils 2017-08-22 21:35:37 -05:00
scripts Remove GENERIC flag 2017-10-03 15:08:53 -04:00
.gitreview Added .gitreview 2017-03-27 08:33:46 +00:00
.zuul.yaml Publish images to DockerHub 2017-10-02 22:26:42 -04:00
Dockerfile Remove GENERIC flag 2017-10-03 15:08:53 -04:00
README.md Add a note about building behind proxies 2017-08-11 11:43:17 +01:00
bindep.txt Move to single dockerfile 2017-09-30 22:48:56 -04:00

README.md

OpenStack LOCI

OpenStack LOCI is a project designed to quickly build Lightweight OCI compatible images of OpenStack services.

Currently we build images for the following OpenStack projects:

Images are built in the Docker Hub automatically on each commit to LOCI and also on every commit to the service itself. Using Keystone as an example, if openstack/keystone or openstack/loci-keystone merges a commit then a new image is built to provide a continuously updated set of images based on a number of distributions. Additionally, individual repos may be used to build images for development purposes or as part of a CI/CD workflow.

The instructions below can be used for any OpenStack service currently targeted by LOCI. For simplicity, we will continue to use Keystone as an example.

Keystone Image Layer Info

Building locally

It's really easy to build images locally for the distro of your choice. To build an image you only need to run:

$ docker build https://git.openstack.org/openstack/loci-keystone.git#:debian --tag keystone:debian

If building behind a proxy, remember to use build arguments to pass these through to the build:

$ docker build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy \
    --build-arg no_proxy=$no_proxy https://git.openstack.org/openstack/loci-keystone.git#:debian \
    --tag keystone:debian

You can, of course, substitute debian with your distro of choice.

For more advanced building you can use docker build arguments to define:

  • The git repo containing the OpenStack project the container should contain, PROJECT_REPO
  • The git ref or branch the container should fetch for the project, PROJECT_REF
  • The git repo containing the common install scripts, SCRIPTS_REPO
  • The git ref or branch the container should fetch for the scripts, SCRIPTS_REF
  • To inject anything into the image before hand (sources.list, keys, etc), create a tarball and reference its location, OVERRIDE
  • The location of the wheels tarball. This accepts a url to a tarball or a Docker image name in the form of [myregistry/]mydockernamespace/requirements:debian, WHEELS

This makes it really easy to integrate LOCI images into your development or CI/CD workflow, for example, if you wanted to build an image from this PS you could run:

$ docker build https://git.openstack.org/openstack/loci-keystone.git#:debian \
    --tag mydockernamespace/keystone-testing:418167-1 \
    --build-arg PROJECT_REF=refs/changes/67/418167/1

To build with the wheels from a private Docker registry rather than DockerHub run:

$ docker build https://git.openstack.org/openstack/loci-keystone.git#:debian \
    --build-arg WHEELS=172.17.0.1:5000/mydockernamespace/keystone:debian

Customizing

The images should contain all the required assets for running the service. But if you wish or need to customize the openstackloci/keystone image that's great! We hope to have built the images to make this as easy and flexible as possible. To do this we recommend that you perform any required customisation in a child image using a pattern similar to:

FROM openstackloci/keystone:debian
MAINTAINER you@example.com

RUN set -x \
    && apt-get update \
    && apt-get install -y --no-install-recommends your-awesome-binary-package \
    && rm -rf /var/lib/apt/lists/*