Skip to content

Instantly share code, notes, and snippets.

@bjartek
Last active September 1, 2016 18:18
Show Gist options
  • Save bjartek/875c6fbf65afb8021982b3fa71c7339c to your computer and use it in GitHub Desktop.
Save bjartek/875c6fbf65afb8021982b3fa71c7339c to your computer and use it in GitHub Desktop.

What we would like to have

  • A way to tag in the imagestream GUI.
  • A way to import the imaggestream in the GUI
  • Filter the tags in the imagestream. Lets say filter all tags that are aliases, all tags that are scheduled.

Why do we want it

Lets say we have an group in our organization that is called workflow. They have an application called ticket that they want to deploy into several environemnts for different kinds of testing. These environments are called st and at.

When we build ticket (with a CustomBuilder) as a docker container we tag it with lots of meta tags. If we build the lastest stable version with the version number of 1.2.3 the pushed tags are

  • latest
  • 1
  • 1.2
  • 1.2.3

In the Openshift cluster we will have the following projects

  • workflow, holds the imagestreams that represents the different applications. In this case ticket
  • workflow-st has a DC for the ticket app that fetches docker images from workflow/ticket:st
  • workflow-at has a DC for the ticket app that fetches docker images from workflot/ticket:at

In order to deploy a version to ST we need to create the yet unknown tag in workflow/ticket

oc tag workflow/ticket:1 workflow/ticket:st --alias=true

Then we also have to schedule the 1 tag to be updated.

oc tag --source=docker private.docker.registry/workflow/ticket:1 workflow/ticket:1 --scheduled=true

Now when we build the next version 1.2.4 the application will automatically be rolled out in ST.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment