Skip to content

Commit

Permalink
Cleanup of k8petstore json formatting flaw, and parameterization of k…
Browse files Browse the repository at this point in the history
…ubectl.
  • Loading branch information
jayunit100 committed Mar 26, 2015
1 parent 8183a48 commit 1e3eb6a
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions examples/k8petstore/k8petstore.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
echo "WRITING KUBE FILES , will overwrite the jsons, then testing pods. is kube clean ready to go?"

#for dev/test you can use:
#kubectl=$GOPATH/src/github.com/GoogleCloudPlatform/kubernetes/cluster/kubectl.sh"
kubectl="kubectl"
VERSION="r.2.8.19"
PUBLIC_IP="127.0.0.1" # ip which we use to access the Web server.
SECONDS=1000 # number of seconds to measure throughput.
Expand All @@ -24,8 +27,8 @@ cat << EOF > fe-rc.json
"id": "frontendCcontroller",
"containers": [{
"name": "frontend-go-restapi",
"image": "jayunit100/k8-petstore-web-server:$VERSION",
}]
"image": "jayunit100/k8-petstore-web-server:$VERSION"
}]
}
},
"labels": {
Expand Down Expand Up @@ -169,15 +172,15 @@ cat << EOF > slave-rc.json
"labels": {"name": "redisslave"}
}
EOF
kubectl create -f rm.json --api-version=v1beta1
kubectl create -f rm-s.json --api-version=v1beta1
$kubectl create -f rm.json --api-version=v1beta1
$kubectl create -f rm-s.json --api-version=v1beta1
sleep 3 # precaution to prevent fe from spinning up too soon.
kubectl create -f slave-rc.json --api-version=v1beta1
kubectl create -f rs-s.json --api-version=v1beta1
$kubectl create -f slave-rc.json --api-version=v1beta1
$kubectl create -f rs-s.json --api-version=v1beta1
sleep 3 # see above comment.
kubectl create -f fe-rc.json --api-version=v1beta1
kubectl create -f fe-s.json --api-version=v1beta1
kubectl create -f bps-load-gen-rc.json --api-version=v1beta1
$kubectl create -f fe-rc.json --api-version=v1beta1
$kubectl create -f fe-s.json --api-version=v1beta1
$kubectl create -f bps-load-gen-rc.json --api-version=v1beta1
}

function test {
Expand Down

0 comments on commit 1e3eb6a

Please sign in to comment.