Continuing the topic of handling deployments on day #21.
Previously we had a look at deploying new version of application: OpenShift Morsels: rolling out new version of application. Today the continuation of oc rollout subcommands.
Displaying history refers to the previous deployments through Replication Controllers. They are the history of your deployments. After deleting the Replication Controller number 1, it is no longer visible in history and you can’t deploy it anymore. You can see the output of all 3 commands below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$ oc rollout history dc node42 deploymentconfigs "node42" REVISION STATUS CAUSE 1 Complete image change 2 Complete config change 3 Complete manual change 4 Failed cancelled by the user 5 Complete manual change $ oc delete rc node42-1 replicationcontroller "node42-1" deleted $ oc rollout history dc node42 deploymentconfigs "node42" REVISION STATUS CAUSE 2 Complete config change 3 Complete manual change 4 Failed cancelled by the user 5 Complete manual change |
As for the other subcommands, status displays information about latest deploy state. It waits for updates from all started replicas and afterwards reports just final status.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
$ oc rollout latest node42 deploymentconfig "node42" rolled out $ oc rollout status dc node42 Waiting for rollout to finish: 0 out of 4 new replicas have been updated... Waiting for rollout to finish: 0 out of 4 new replicas have been updated... Waiting for rollout to finish: 1 out of 4 new replicas have been updated... Waiting for rollout to finish: 1 out of 4 new replicas have been updated... Waiting for rollout to finish: 1 out of 4 new replicas have been updated... Waiting for rollout to finish: 1 of 4 updated replicas are available... replication controller "node42-8" successfully rolled out $ oc rollout status dc node42 replication controller "node42-8" successfully rolled out |
Environment
The commands were executed using minishift and the following client/server versions of OpenShift.
Client:
Server:
Newsletter
Thanks for reading the OpenShift morsels. To get updates about new articles, you can sign up to the newsletter below.
As a thank you message, you will also get access to OpenShift CLI CheatSheet listing most commonly used commands together with a short explanation.