Last active
January 16, 2017 20:26
-
-
Save crobby/acba41a1524f970bb15cb10d5326fc9f to your computer and use it in GitHub Desktop.
Fast way to get oshinko up and running on a basic openshift single node cluster
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start up an OpenShift Origin cluster locally | |
oc cluster up | |
# Authorize Oshinko service account to write to the OpenShift API | |
oc create sa oshinko | |
oc policy add-role-to-user edit -z oshinko | |
# Launch Oshinko in the current project | |
oc new-app -f ui-template-no-route.yaml | |
# Wait for your app to come up, then find the pod name where oshinko-webui is running | |
# then execute oc port-forward <pod name> <local port>:8080 | |
# to forward all traffic on localhost:<local port> to the webui | |
WEBPOD="" | |
while [ "$WEBPOD" == "" ] | |
do | |
sleep 2 | |
STATUS=$(oc get pods -o jsonpath --selector='name=oshinko-web' --no-headers --template='{.items[*].status.phase}') | |
if [ "$STATUS" == "Running" ]; then | |
WEBPOD=$(oc get pods -o jsonpath --selector='name=oshinko-web' --no-headers --template='{.items[*].metadata.name}') | |
fi | |
done | |
echo "Forwarding localhost 8080 to the oshinko-webui pod: http://localhost:8080" | |
oc port-forward $WEBPOD 8080:8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment