Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If docker image already available in nexus repository then it can be used in openshift ECPaaS environment  by creating image stream. Below are the steps to create image stream in openshift.

a. login to openshift with CLI ( Download openshift client(oc) from Download link and install) 

Code Block
oc login ecpass-dev.cdc.gov


b. Switch to your openshift project 

Code Block
oc project your_project_name


c. Create secret in openshift for docker registry

Code Block
oc create secret docker-registry imagehub --docker-username=nexus_username --docker-password=nuxus_password --docker-server=imagehub.cdc.gov:5989 --docker-email=emailid@cdc.gov


d. Link the above secret to default, deployer and builder service accounts 

Code Block
oc secret link default imagehub --for=pull
oc secret link deployer imagehub --for=pull
oc secret link builder imagehub --for=pull


e. Import image  by running command: 

Code Block
oc import-image helloworld --from=imagehub.cdc.gov:5989 --confirm


f. After importing image it can be deployed with openshift UI.