Skip to content

Instantly share code, notes, and snippets.

@tnozicka
Last active April 13, 2016 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tnozicka/e280bf0f4f0d6314c45977f9290a7073 to your computer and use it in GitHub Desktop.
Save tnozicka/e280bf0f4f0d6314c45977f9290a7073 to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
set -x -e
oc new-project helloworld-msa
oc project helloworld-msa
oc create -f https://raw.githubusercontent.com/jboss-openshift/application-templates/ose-v1.3.0-1/jboss-image-streams.json
sleep 30
oc new-app --name hello jboss-eap70-openshift:1.3-Beta~https://github.com/redhat-helloworld-msa/hello -l hystrix.enabled=true
oc expose service hello
oc logs -f bc/hello
oc create -f https://raw.githubusercontent.com/wildfly-swarm/sti-wildflyswarm/master/1.0/test/imagestream.json
oc create -f https://raw.githubusercontent.com/wildfly-swarm/sti-wildflyswarm/master/1.0/test/build-config.json
oc start-build wildflyswarm-10-centos7-build --follow
oc new-app --name hola wildflyswarm-10-centos7~https://github.com/redhat-helloworld-msa/hola -l hystrix.enabled=true
oc expose service hola
oc logs -f bc/hola
oc create -f https://raw.githubusercontent.com/vert-x3/vertx-openshift-s2i/initial-work/vertx-s2i-all.json
sleep 10
oc logs -f bc/vertx-s2i
oc new-app --name aloha vertx-s2i~https://github.com/redhat-helloworld-msa/aloha -l hystrix.enabled=true
oc delete service aloha; oc expose dc aloha --port=8080
oc expose service aloha
oc logs -f bc/aloha
for repository in {ola,namaste,bonjour,api-gateway}; do
oc new-app --name ${repository} jboss-eap70-openshift~https://github.com/redhat-helloworld-msa/${repository} -l hystrix.enabled=true
oc expose dc ${repository} --port=8080
oc expose service ${repository}
oc logs -f bc/${repository}
done
oc create -f http://central.maven.org/maven2/io/fabric8/kubeflix/packages/kubeflix/1.0.15/kubeflix-1.0.15-kubernetes.yml
oc new-app kubeflix
oc expose service hystrix-dashboard
oc policy add-role-to-user admin system:serviceaccount:helloworld-msa:turbine
oc new-app --name frontend nodejs~https://github.com/redhat-helloworld-msa/frontend
oc expose service frontend
oc logs -f bc/frontend
set +x
echo "
http://hello-helloworld-msa.rhel-cdk.10.1.2.2.xip.io/api/hello
http://hola-helloworld-msa.rhel-cdk.10.1.2.2.xip.io/api/hola
http://aloha-helloworld-msa.rhel-cdk.10.1.2.2.xip.io/api/aloha
http://ola-helloworld-msa.rhel-cdk.10.1.2.2.xip.io/api/ola
http://namaste-helloworld-msa.rhel-cdk.10.1.2.2.xip.io/api/namaste
http://bonjour-helloworld-msa.rhel-cdk.10.1.2.2.xip.io/api/bonjour
http://api-gateway-helloworld-msa.rhel-cdk.10.1.2.2.xip.io/api
http://hystrix-dashboard-helloworld-msa.rhel-cdk.10.1.2.2.xip.io/
http://frontend-helloworld-msa.rhel-cdk.10.1.2.2.xip.io/
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment