OpenShift Commons


Image Builders

Special Interest Group


Wednesday, May 4th, 2016

bit.ly/IB-SIG-kickoff

# Welcome!

Purpose: Discuss, develop and disseminate best practices for building and maintaining redistributable Images for use in OpenShift and Kubernetes environments

Agenda

  1. Welcome
  2. Existing Best Practices
  3. Source to Image (s2i)
  4. Runtime Standardization using Builder Images
  5. NodeJS Builder Demos
  6. Follow up / Get involved!
### Existing # Best Practices

Project Atomic Guidelines

Current content: Guidance for Docker Image Authors

New content: Container Best Practices

OpenShift Guidelines

OpenShift Guidelines for Image Authors

Existing content is written for...

Operators / Administrators / People who have Root

#### Image Standardization ## As a Service > "if only there were a way to codify these requirements and ensure that they can be consistently applied throughout my environments..."

Source

to

Image

Combines source repos and operationally-maintained builder images to produce application images

Available as a standalone project, for use with Jenkins or other external build processes: github.com/openshift/source-to-image

Building

Builders

OpenShift S2I Guidelines: docs.openshift.org/latest/creating_images/s2i.html

## Standardize with # S2I Offer easy development workflows that automatically codify your operational standards with no added hastle for devs Blog Post: [How to Create an S2I Builder Image](https://blog.openshift.com/create-s2i-builder-image/)

My image standardization use-case:

New NodeJS Runtimes

Extend the existing openshift/base-centos7 image, adding node runtimes from nodejs.org:

github.com/ryanj/origin-s2i-nodejs

Attempt to maintain established conventions from the official SCL-based image builder sources:

github.com/openshift/s2i-nodejs

# Demos
# S2I Usage [This example](https://github.com/ryanj/origin-s2i-nodejs#builds) will produce a new docker image named `pillarjs`: s2i build https://github.com/ryanj/pillar-base ryanj/centos7-s2i-nodejs:current pillarjs

oc new-app

Developers can use "oc new-app" to combine NodeJS repo sources with operationally-maintained base images:

oc new-app ryanj/centos7-s2i-nodejs~https://github.com/ryanj/http-base

The oc command line tool is available on github

You can follow along with the OpenShift Origin Dev VM

OpenShift Templates

Install a template into the current project, making these images (and all relevant tags) easier to reuse:

oc create -f https://raw.githubusercontent.com/ryanj/origin-s2i-nodejs/master/image-streams.json

Administrators can make these images available system-wide by adding them to the openshift namespace:

oc create -n openshift -f https://raw.githubusercontent.com/ryanj/origin-s2i-nodejs/master/image-streams.json

You can help:

  • Promote best practices for image production and distribution
  • Standardize workflows for dev and ops
  • Improve container security
  • Grow the container ecosystem
# Questions?

Get Involved!

Join us on May 18th for the next Image Builder SIG meeting,
where Cristian Roldan from Produban will be presenting on:
CI/CD Workflows for Image Building

Runs on Kubernetes Presented by: @ryanj