-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo
57 lines (41 loc) · 1.76 KB
/
demo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#scp /home/bparees/git/gocode/src/github.com/openshift/origin/_output/go/bin/openshift [email protected]:/tmp
sudo bash
#mkdir demo
cd demo
#mv /tmp/openshift .
#git clone https://github.com/bparees/sprint50_demo.git
#setenforce 0
./openshift start --listenAddr="0.0.0.0:8080"
#on laptop:
cd ~/demofiles
export K8S=ec2-54-81-17-156.compute-1.amazonaws.com
unproxy
# Convert template to config
curl -ld @template/template.json http://$K8S:8080/osapi/v1beta1/templateConfigs | json > processed/template.processed.json
# Deploy the config
/home/bparees/git/gocode/src/github.com/openshift/origin/_output/go/bin/openshift kube -h http://$K8S:8080 apply -c ~/demofiles/processed/template.processed.json
# show app running (ec2)
curl localhost:5432
# show build cfgs
curl http://$K8S:8080/osapi/v1beta1/buildConfigs | json
# define a build cfg
curl -H "Content-Type:application/json" -d @buildcfg/buildcfg.json http://$K8S:8080/osapi/v1beta1/buildConfigs | json
# show build cfgs
curl http://$K8S:8080/osapi/v1beta1/buildConfigs | json
#show no build running
curl http://$K8S:8080/osapi/v1beta1/builds | json
#run build
#curl -v -A "GitHub-Hookshot/github" -H "Content-Type:application/json" -H "X-Github-Event:ping" -d @buildinvoke/pingevent.json http://$K8S:8080/osapi/v1beta1/buildConfigHooks/build100/secret101/github
cd ~/demofiles/app
edit app.rb
git commit -am . ; git push origin master
#show build running
#curl http://$K8S:8080/osapi/v1beta1/builds | json
watch "curl http://$K8S:8080/osapi/v1beta1/builds | python -mjson.tool | grep status"
#push build (ec2)
docker push bparees/sprint50
#kill docker container (ec2)
docker kill <container>
#show updated container running (ec2)
curl localhost:5432