问题
I am new to openshift and need to know if it is possible to make all containers in openshift origin persistent after restarting the oc cluster or rebooting the server.
The tutorial i followed requires one do the following in order to create a cluster
oc cluster up
The problem i am running into now is that login into my openshift application after, doing an oc cluster down && oc cluser up
doesn't show any of my running containers.
I tried restarting all of them by doing a docker start $(docker ps -qa)
but the containers still aren't showing up in the openshift origin application.
Any advice on how to resolve this will be much appreciated.
回答1:
You need to tell it to persist the etcd and configuration data across restarts. See:
- https://github.com/openshift/origin/blob/master/docs/cluster_up_down.md#configuration
- https://github.com/openshift/origin/blob/master/docs/cluster_up_down.md#etcd-data
Where you tell it to save data may depend on whether you are using the local Docker service directly or docker-machine.
来源:https://stackoverflow.com/questions/41539780/making-openshift-origin-docker-containers-persistent-after-reboot