Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 2.06 KB

maintenance.adoc

File metadata and controls

40 lines (29 loc) · 2.06 KB

Maintenance (Only for redhatmsa admins)

Deploy the microservices images to Docker Hub

To deploy the microservices images you have to run the following commands from inside the vagrant box (vagrant ssh):

# vagrant ssh


# due to a new docker.io registry, you will need to specify the v1 version

# vi ~/.docker/config.json
# replace "docker.io"
# by "https://index.docker.io/v1/"

$ oc login  -u admin -p admin localhost --insecure-skip-tls-verify=true
$ oc project default

#### use the email and password of redhatmsa ####
$ docker login  #login with user redhatmsa

$ registry=`oc get service docker-registry --template '{{.spec.portalIP}}'`; declare -a arr=("bonjour" "frontend"); for i in "${arr[@]}"; do image=`docker images $registry:5000/helloworld-msa/$i|awk 'NR==2'`; echo "Taging $image"; id=$(echo $image|awk '{print $3}'); docker tag -f $id docker.io/redhatmsa/$i; echo "Pushing $id from $image"; docker push -f docker.io/redhatmsa/$i; done; declare -a arr2=("hello" "hola" "aloha" "ola" "namaste" "api-gateway"); for i in "${arr2[@]}"; do image=`docker images redhatmsa/$i|awk 'NR==2'`; echo "Taging $image"; id=$(echo $image|awk '{print $3}'); docker tag -f $id docker.io/redhatmsa/$i:latest; echo "Pushing $id from $image"; docker push -f docker.io/redhatmsa/$i:latest; done