Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

Early access first run documentation #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions image-pull.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
# temporarily using docker due to podman bugs

export OPENWHISK_VERSION=rhdemo-9717f07a
export PROJECTODD_VERSION=8ee5579
export STRIMZI_VERSION="0.3.1"
export ALARMPROVIDER_VERSION="1.9.0"
export NGINX_VERSION="42330f7f29ba1ad67819f4ff3ae2472f62de13a827a74736a5098728462212e7"
for image in \
action-nodejs-6 \
action-nodejs-8 \
action-java-8 \
action-python-3 \
action-python-2 \
action-php-7 \
dockerskeleton \
whisk_couchdb \
whisk_alarms \
whisk_catalog
do
docker pull docker.io/projectodd/$image:$PROJECTODD_VERSION
docker save -o projectodd-$image.tar docker.io/projectodd/$image:$PROJECTODD_VERSION
done
for image in \
controller \
invoker
do
docker pull docker.io/projectodd/$image:$OPENWHISK_VERSION
docker save -o projectodd-$image.tar docker.io/projectodd/$image:$OPENWHISK_VERSION
done
docker pull docker.io/strimzi/cluster-controller:$STRIMZI_VERSION
docker save -o projectodd-strimzi.tar docker.io/strimzi/cluster-controller:$STRIMZI_VERSION
docker pull docker.io/openwhisk/alarmprovider:$ALARMPROVIDER_VERSION
docker save -o projectodd-alarm.tar docker.io/openwhisk/alarmprovider:$ALARMPROVIDER_VERSION
docker pull docker.io/centos/nginx-112-centos7@sha256:$NGINX_VERSION
docker save -o projectodd-nginx.tar docker.io/centos/nginx-112-centos7@sha256:$NGINX_VERSION
docker pull docker.io/busybox
docker save -o projectodd-busybox.tar docker.io/busybox:latest
59 changes: 59 additions & 0 deletions image-push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash
# using docker due to podman bugs

export OPENWHISK_VERSION=rhdemo-9717f07a
export PROJECTODD_VERSION=8ee5579
export STRIMZI_VERSION="0.3.1"
export ALARMPROVIDER_VERSION="1.9.0"
export NGINX_VERSION="42330f7f29ba1ad67819f4ff3ae2472f62de13a827a74736a5098728462212e7"
export REGISTRY="172.30.1.1:5000"

# create the `ocf-infra` project
oc new-project ocf-infra

# login to the registry with its builder account
docker login -u serviceaccount -p `oc sa get-token builder -n ocf-infra` $REGISTRY

# load all the tarballs into the local docker image store
for tarball in `ls projectodd*`
do
docker load -i $tarball
done

# retag images with `whisky` tag
for image in \
action-nodejs-6 \
action-nodejs-8 \
action-java-8 \
action-python-3 \
action-python-2 \
action-php-7 \
dockerskeleton
do
docker tag docker.io/projectodd/$image:$PROJECTODD_VERSION $REGISTRY/ocf-infra/$image:whisky
done
for image in \
controller \
invoker
do
docker tag docker.io/projectodd/$image:$OPENWHISK_VERSION $REGISTRY/ocf-infra/$image:whisky
done
docker tag docker.io/strimzi/cluster-controller:$STRIMZI_VERSION $REGISTRY/ocf-infra/cluster-controller:whisky
docker tag docker.io/openwhisk/alarmprovider:$ALARMPROVIDER_VERSION $REGISTRY/ocf-infra/alarmprovider:whisky
docker tag docker.io/centos/nginx-112-centos7@sha256:$NGINX_VERSION $REGISTRY/ocf-infra/nginx:whisky
docker tag docker.io/busybox:latest $REGISTRY/ocf-infra/busybox:whisky
docker tag docker.io/projectodd/whisk_couchdb:$PROJECTODD_VERSION $REGISTRY/ocf-infra/couchdb:whisky
docker tag docker.io/projectodd/whisk_alarms:$PROJECTODD_VERSION $REGISTRY/ocf-infra/alarms:whisky
docker tag docker.io/projectodd/whisk_catalog:$PROJECTODD_VERSION $REGISTRY/ocf-infra/catalog:whisky

# find all the images we re-tagged and then push them into the registry
for image in $(docker images | grep 172 | awk '{print $1":"$2}')
do
docker push $image
done

# patch the imagestreams to change the lookup policy
for stream in $(oc get is -o name)
do
oc patch $stream -p '{"spec":{"lookupPolicy":{"local":true}}}'
done
Loading