From Dev to Prod — Image promotion made easy
Promoting an Application From Dev to Production Using Tag on OpenShift
A fast and secure way to promote an Application from Dev to Production on OpenShift is using tag. That not only assures that the application will run as suppose to, but also save a lot of time.
Done with introductions — hand’s-on, Just do it! (A Lot of print’s).
Let’s start creating a new project: https://portal.getupcloud.com/projects
Then, you create the DEV application:
Start by selecting the programming language (1), the size and number of containers (2), then proceed to the next step:
Name the development app (1), supply a git repo for the source code (2) and create it (3)
If everything goes fine, go to the project main page (1)
Access your application. Then in the overview section click on Build & Deploy to see the details. There you'll find the address that we'll use to create our PROD application:
Ok, the first step is done. Now we’ll create the PROD application from the DEV.
The next steps will require “oc” (Openshift CLI).
You’ll use the image ID from web console (the step 2 in the image above)
#Tag the image (we'll use the tag "prodready")
$ oc tag <image> <project>/<app>:<tag>
$ oc tag 172.30.34.145:5000/example/test@sha256:cb266fcd65ccae62a1a2eaebf14fdc45e1b43b1f7f14d6547405a1d2bf80a7e1 example/dev:prodready --insecure#Now we can create a new PROD app directly from the tagged image
$ oc new-app <project>/<app>:<tag> --name=<new-name>
$ oc new-app example/dev:prodready --name=prod
Now every time you tag the image from the DEV app, the “PROD” application will be updated!
That’s all folks.