João Brito @juniorjbn
Conceitos
Criando uma aplicação de teste
Hacking
S2i + OC =
➔Assenble
➔Run
BuildConfig
➔Build Binário
➔Build Incremental
$ oc describe bc/site
1. Name: site
2. Namespace: workshop
3. Created: 4 days ago
4. Labels: app=site
i. template=site
5. Annotations: openshift.io/generated-by=GetupCloudWebConsole
6. Latest Version: 6
7. Strategy: Source
8. URL: git@bitbucket.org:juniorjbn/php-test.git
9. Ref: master
10. ContextDir: /
11. From Image: ImageStreamTag openshift/php:5.6
12. Output to: ImageStreamTag site:latest
13. Build Run Policy: Serial
14. Triggered by: ImageChange, Config
15. Webhook Generic:
a. URL:
https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/42be0bdf5222c84b50854
e98/generic
16. Webhook GitHub:
a. URL:
https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/9ac2640292ebe215c9b6f
120/github
17. Build Status Duration Creation Time
18. site-3 complete 1m34s 2016-12-08 20:37:39 -0200 BRST
$ oc describe bc/site
1. Name: site
2. Namespace: workshop
3. Created: 4 days ago
4. Labels: app=site
i. template=site
5. Annotations: openshift.io/generated-by=GetupCloudWebConsole
6. Latest Version: 6
7. Strategy: Source
8. URL: git@bitbucket.org:juniorjbn/php-test.git
9. Ref: master
10. ContextDir: /
11. From Image: ImageStreamTag openshift/php:5.6
12. Output to: ImageStreamTag site:latest
13. Build Run Policy: Serial
14. Triggered by: ImageChange, Config
15. Webhook Generic:
a. URL:
https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/42be0bdf5222c84b50854
e98/generic
16. Webhook GitHub:
a. URL:
https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/9ac2640292ebe215c9b6f
120/github
17. Build Status Duration Creation Time
18. site-3 complete 1m34s 2016-12-08 20:37:39 -0200 BRST
$ oc describe bc/site
1. Name: site
2. Namespace: workshop
3. Created: 4 days ago
4. Labels: app=site
i. template=site
5. Annotations: openshift.io/generated-by=GetupCloudWebConsole
6. Latest Version: 6
7. Strategy: Source
8. URL: git@bitbucket.org:juniorjbn/php-test.git
9. Ref: master
10. ContextDir: /
11. From Image: ImageStreamTag openshift/php:5.6
12. Output to: ImageStreamTag site:latest
13. Build Run Policy: Serial
14. Triggered by: ImageChange, Config
15. Webhook Generic:
a. URL:
https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/42be0bdf5222c84b50854
e98/generic
16. Webhook GitHub:
a. URL:
https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/9ac2640292ebe215c9b6f
120/github
17. Build Status Duration Creation Time
18. site-3 complete 1m34s 2016-12-08 20:37:39 -0200 BRST
$ oc describe bc/site
1. Name: site
2. Namespace: workshop
3. Created: 4 days ago
4. Labels: app=site
i. template=site
5. Annotations: openshift.io/generated-by=GetupCloudWebConsole
6. Latest Version: 6
7. Strategy: Source
8. URL: git@bitbucket.org:juniorjbn/php-test.git
9. Ref: master
10. ContextDir: /
11. From Image: ImageStreamTag openshift/php:5.6
12. Output to: ImageStreamTag site:latest
13. Build Run Policy: Serial
14. Triggered by: ImageChange, Config
15. Webhook Generic:
a. URL:
https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/42be0bdf5222c84b508
54e98/generic
16. Webhook GitHub:
a. URL:
https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/9ac2640292ebe215c9b
6f120/github
17. Build Status Duration Creation Time
18. site-3 complete 1m34s 2016-12-08 20:37:39 -0200 BRST
Build Binário
$ oc edit bc/app
spec.source:
type: Binary
Agora posso usar o cod local
$ oc start-build site --from-dir=.
$ oc describe bc/site
1. Name: site
2. Namespace: workshop
3. Created: 4 days ago
4. Labels: app=site
i. template=site
5. Annotations: openshift.io/generated-by=GetupCloudWebConsole
6. Latest Version: 6
7. Strategy: Source
8. URL: git@bitbucket.org:juniorjbn/php-test.git
9. Ref: master
10. ContextDir: /
11. From Image: ImageStreamTag openshift/php:5.6
12. Output to: ImageStreamTag site:latest
13. Build Run Policy: Serial
14. Triggered by: ImageChange, Config
15. Webhook Generic:
a. URL:
https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/42be0bdf5222c84b50854
e98/generic
16. Webhook GitHub:
a. URL:
https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/9ac2640292ebe215c9b6f
120/github
17. Build Status Duration Creation Time
18. site-3 complete 1m34s 2016-12-08 20:37:39 -0200 BRST
$ oc describe bc/site
1. Name: site
2. Namespace: workshop
3. Created: 6 days ago
4. Labels: app=site
5. template=site
6. Annotations: openshift.io/generated-by=GetupCloudWebConsole
7. Latest Version: 8
8. Strategy: Source
9. Binary: provided on build
10. From Image: ImageStreamTag openshift/php:5.6
11. Output to: ImageStreamTag site:latest
12. Build Run Policy: Serial
13. Triggered by: ImageChange, Config
14. Webhook Generic:
15. URL:
https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/42be0bdf5222c84b50854e98/generic
16. AllowEnv: false
17. Webhook GitHub:
18. URL:
https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/9ac2640292ebe215c9b6f120/github
19. Build Status Duration Creation Time
20. site-8 failed 3s 2016-12-13 10:37:47 -0200 BRST
Build Binário
$ oc edit bc/app
spec.source:
type: Binary
Agora posso usar o cod local
$ oc start-build site --from-dir=.
Build Incremental
.s2i/bin/save-artifacts
#!/bin/bash
# tar cf - .composer composer.lock vendor
$ oc edit bc/site
#spec:
# strategy:
# sourceStrategy:
# incremental: true
.s2i/bin/assemble
#!/bin/bash
# if [ -d /tmp/artifacts/ ]; then
# echo "---> Restoring build artifacts from
/tmp/artifacts..."
# shopt -s dotglob
# mv -v /tmp/artifacts/* ./
# shopt -u dotglob
# fi
Build Incremental
.s2i/bin/save-artifacts
#!/bin/bash
# tar cf - .composer composer.lock vendor
$ oc edit bc/site
#spec:
# strategy:
# sourceStrategy:
# incremental: true
.s2i/bin/assemble
#!/bin/bash
# if [ -d /tmp/artifacts/ ]; then
# echo "---> Restoring build artifacts from
/tmp/artifacts..."
# shopt -s dotglob
# mv -v /tmp/artifacts/* ./
# shopt -u dotglob
# fi
Build Incremental
.s2i/bin/save-artifacts
#!/bin/bash
# tar cf - .composer composer.lock vendor
$ oc edit bc/site
#spec:
# strategy:
# sourceStrategy:
# incremental: true
.s2i/bin/assemble
#!/bin/bash
# if [ -d /tmp/artifacts/ ]; then
# echo "---> Restoring build artifacts from
/tmp/artifacts..."
# shopt -s dotglob
# mv -v /tmp/artifacts/* ./
# shopt -u dotglob
# fi
Build Incremental
.s2i/bin/save-artifacts
#!/bin/bash
# tar cf - .composer composer.lock vendor
$ oc edit bc/site
#spec:
# strategy:
# sourceStrategy:
# incremental: true
.s2i/bin/assemble
#!/bin/bash
# if [ -d /tmp/artifacts/ ]; then
# echo "---> Restoring build artifacts from
/tmp/artifacts..."
# shopt -s dotglob
# mv -v /tmp/artifacts/* ./
# shopt -u dotglob
# fi
DeploymentConfig
➔Recreate
➔Rolling
➔Blue/Green
➔A/B
$ oc describe dc/site
1. Name: site
2. Namespace: workshop
3. Created: 6 days ago
4. Labels: app=site
i. template=site
5. Annotations: iconClass=icon-php
i. openshift.io/generated-by=GetupCloudWebConsole
6. Latest Version: 6
7. Selector: deploymentconfig=site
8. Replicas: 1
9. Triggers: Image(site@latest, auto=true), Config
10.Strategy: Recreate
11.Template:
12. Labels: app=site
i. deploymentconfig=site
1. Containers:
2. php:
3. Image:
172.30.34.145:5000/workshop/site@sha256:84f1195cb9fb30ae5bdd8eba5c27f2f2db0da60b26b92838417659130e
aa
4. Port: 8080/TCP
5. Limits:
6. cpu: 366m
7. memory: 512Mi
8. Requests:
9. cpu: 10m
10. memory: 128Mi
11. Volume Mounts: <none>
12. Environment Variables:
13. PATH: /opt/app-root/src/bin:/opt/app-
root/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/sbin:/bin:/opt/rh/rh-php56/root/usr/bin
14. STI_SCRIPTS_URL: image:///usr/libexec/s2i
15. STI_SCRIPTS_PATH: /usr/libexec/s2i
16. HOME: /opt/app-root/src
17. BASH_ENV: /opt/app-root/etc/scl_enable
18. ENV: /opt/app-root/etc/scl_enable
19. PROMPT_COMMAND: . /opt/app-root/etc/scl_enable
20. PHP_VERSION: 5.6
21. No volumes.
DeploymentConfig
➔Recreate
➔Rolling
➔Blue/Green
➔A/B
1. type: Recreate
2. recreateParams:
3. mid:
4. execNewPod:
5. command:
6. - ./migrate-db
7. containerName: php
8. env:
9. - name: DATABASE_SERVICE_NAME
10. value: mysql
11. - name: DATABASE_NAME
12. value: site
13. - name: DATABASE_USER
14. value: admin
15. - name: DATABASE_PASSWORD
16. value: password
17. failurePolicy: Abort
DeploymentConfig
➔Recreate
➔Rolling
➔Blue/Green
➔A/B
1. strategy:
2. type: Rolling
3. resources: {}
4. rollingParams:
5. intervalSeconds: 1
6. maxSurge: 25%
7. maxUnavailable: 25%
8. timeoutSeconds: 600
9. updatePeriodSeconds: 1
DeploymentConfig
➔Recreate
➔Rolling
➔Blue/Green
➔A/B
1. kind: Route
2. metadata:
3. annotations:
4. haproxy.router.openshift.io/balance: roundrobin
5. openshift.io/generated-by: GetupCloudWebConsole
6. labels:
7. app: site
8. getup.io/component-name: site
9. name: siteab-workshop-getup-io
10. namespace: workshop
11.spec:
12. alternateBackends:
13. - kind: Service
14. name: siteb
15. weight: 30
16. host: siteab-workshop.getup.io
17. to:
18. kind: Service
19. name: site
20. weight: 70
21.status:
22. host: siteab-workshop.getup.io
23. routerName: router
1. kind: Route
2. metadata:
3. annotations:
4. haproxy.router.openshift.io/balance: roundrobin
5. openshift.io/generated-by: GetupCloudWebConsole
6. labels:
7. app: site
8. getup.io/component-name: site
9. name: siteab-workshop-getup-io
10. namespace: workshop
11.spec:
12. alternateBackends:
13. - kind: Service
14. name: siteb
15. weight: 30
16. host: siteab-workshop.getup.io
17. to:
18. kind: Service
19. name: site
20. weight: 70
21.status:
22. host: siteab-workshop.getup.io
23. routerName: router
DeploymentConfig
➔Recreate
➔Rolling
➔Blue/Green
➔A/B
1. spec:
2. host: site-workshop.getup.io
3. port:
4. targetPort: 8080-tcp
5. tls:
6. insecureEdgeTerminationPolicy: Allow
7. termination: edge
8. to:
9. kind: Service
10. name: siteb
11. weight: 100
12.status:
13. ingress:
14. - conditions:
15. - lastTransitionTime: 2016-12-08T21:44:51Z
16. status: "True"
17. type: Admitted
18. host: site-workshop.getup.io
19. routerName: router
Scaling
VS
Scaling
VS
Scaling
VS
Application Healing
Application Healing
- Readiness
- Liveness
Workshop-Build e deploy avançado com Openshift e Kubernetes
Workshop-Build e deploy avançado com Openshift e Kubernetes

Workshop-Build e deploy avançado com Openshift e Kubernetes

  • 1.
  • 3.
  • 5.
  • 6.
  • 8.
    S2i + OC= ➔Assenble ➔Run
  • 9.
  • 10.
    $ oc describebc/site 1. Name: site 2. Namespace: workshop 3. Created: 4 days ago 4. Labels: app=site i. template=site 5. Annotations: openshift.io/generated-by=GetupCloudWebConsole 6. Latest Version: 6 7. Strategy: Source 8. URL: git@bitbucket.org:juniorjbn/php-test.git 9. Ref: master 10. ContextDir: / 11. From Image: ImageStreamTag openshift/php:5.6 12. Output to: ImageStreamTag site:latest 13. Build Run Policy: Serial 14. Triggered by: ImageChange, Config 15. Webhook Generic: a. URL: https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/42be0bdf5222c84b50854 e98/generic 16. Webhook GitHub: a. URL: https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/9ac2640292ebe215c9b6f 120/github 17. Build Status Duration Creation Time 18. site-3 complete 1m34s 2016-12-08 20:37:39 -0200 BRST
  • 11.
    $ oc describebc/site 1. Name: site 2. Namespace: workshop 3. Created: 4 days ago 4. Labels: app=site i. template=site 5. Annotations: openshift.io/generated-by=GetupCloudWebConsole 6. Latest Version: 6 7. Strategy: Source 8. URL: git@bitbucket.org:juniorjbn/php-test.git 9. Ref: master 10. ContextDir: / 11. From Image: ImageStreamTag openshift/php:5.6 12. Output to: ImageStreamTag site:latest 13. Build Run Policy: Serial 14. Triggered by: ImageChange, Config 15. Webhook Generic: a. URL: https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/42be0bdf5222c84b50854 e98/generic 16. Webhook GitHub: a. URL: https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/9ac2640292ebe215c9b6f 120/github 17. Build Status Duration Creation Time 18. site-3 complete 1m34s 2016-12-08 20:37:39 -0200 BRST
  • 12.
    $ oc describebc/site 1. Name: site 2. Namespace: workshop 3. Created: 4 days ago 4. Labels: app=site i. template=site 5. Annotations: openshift.io/generated-by=GetupCloudWebConsole 6. Latest Version: 6 7. Strategy: Source 8. URL: git@bitbucket.org:juniorjbn/php-test.git 9. Ref: master 10. ContextDir: / 11. From Image: ImageStreamTag openshift/php:5.6 12. Output to: ImageStreamTag site:latest 13. Build Run Policy: Serial 14. Triggered by: ImageChange, Config 15. Webhook Generic: a. URL: https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/42be0bdf5222c84b50854 e98/generic 16. Webhook GitHub: a. URL: https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/9ac2640292ebe215c9b6f 120/github 17. Build Status Duration Creation Time 18. site-3 complete 1m34s 2016-12-08 20:37:39 -0200 BRST
  • 13.
    $ oc describebc/site 1. Name: site 2. Namespace: workshop 3. Created: 4 days ago 4. Labels: app=site i. template=site 5. Annotations: openshift.io/generated-by=GetupCloudWebConsole 6. Latest Version: 6 7. Strategy: Source 8. URL: git@bitbucket.org:juniorjbn/php-test.git 9. Ref: master 10. ContextDir: / 11. From Image: ImageStreamTag openshift/php:5.6 12. Output to: ImageStreamTag site:latest 13. Build Run Policy: Serial 14. Triggered by: ImageChange, Config 15. Webhook Generic: a. URL: https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/42be0bdf5222c84b508 54e98/generic 16. Webhook GitHub: a. URL: https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/9ac2640292ebe215c9b 6f120/github 17. Build Status Duration Creation Time 18. site-3 complete 1m34s 2016-12-08 20:37:39 -0200 BRST
  • 14.
    Build Binário $ ocedit bc/app spec.source: type: Binary Agora posso usar o cod local $ oc start-build site --from-dir=.
  • 15.
    $ oc describebc/site 1. Name: site 2. Namespace: workshop 3. Created: 4 days ago 4. Labels: app=site i. template=site 5. Annotations: openshift.io/generated-by=GetupCloudWebConsole 6. Latest Version: 6 7. Strategy: Source 8. URL: git@bitbucket.org:juniorjbn/php-test.git 9. Ref: master 10. ContextDir: / 11. From Image: ImageStreamTag openshift/php:5.6 12. Output to: ImageStreamTag site:latest 13. Build Run Policy: Serial 14. Triggered by: ImageChange, Config 15. Webhook Generic: a. URL: https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/42be0bdf5222c84b50854 e98/generic 16. Webhook GitHub: a. URL: https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/9ac2640292ebe215c9b6f 120/github 17. Build Status Duration Creation Time 18. site-3 complete 1m34s 2016-12-08 20:37:39 -0200 BRST
  • 16.
    $ oc describebc/site 1. Name: site 2. Namespace: workshop 3. Created: 6 days ago 4. Labels: app=site 5. template=site 6. Annotations: openshift.io/generated-by=GetupCloudWebConsole 7. Latest Version: 8 8. Strategy: Source 9. Binary: provided on build 10. From Image: ImageStreamTag openshift/php:5.6 11. Output to: ImageStreamTag site:latest 12. Build Run Policy: Serial 13. Triggered by: ImageChange, Config 14. Webhook Generic: 15. URL: https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/42be0bdf5222c84b50854e98/generic 16. AllowEnv: false 17. Webhook GitHub: 18. URL: https://api.getupcloud.com:443/oapi/v1/namespaces/workshop/buildconfigs/site/webhooks/9ac2640292ebe215c9b6f120/github 19. Build Status Duration Creation Time 20. site-8 failed 3s 2016-12-13 10:37:47 -0200 BRST
  • 17.
    Build Binário $ ocedit bc/app spec.source: type: Binary Agora posso usar o cod local $ oc start-build site --from-dir=.
  • 18.
    Build Incremental .s2i/bin/save-artifacts #!/bin/bash # tarcf - .composer composer.lock vendor $ oc edit bc/site #spec: # strategy: # sourceStrategy: # incremental: true .s2i/bin/assemble #!/bin/bash # if [ -d /tmp/artifacts/ ]; then # echo "---> Restoring build artifacts from /tmp/artifacts..." # shopt -s dotglob # mv -v /tmp/artifacts/* ./ # shopt -u dotglob # fi
  • 19.
    Build Incremental .s2i/bin/save-artifacts #!/bin/bash # tarcf - .composer composer.lock vendor $ oc edit bc/site #spec: # strategy: # sourceStrategy: # incremental: true .s2i/bin/assemble #!/bin/bash # if [ -d /tmp/artifacts/ ]; then # echo "---> Restoring build artifacts from /tmp/artifacts..." # shopt -s dotglob # mv -v /tmp/artifacts/* ./ # shopt -u dotglob # fi
  • 20.
    Build Incremental .s2i/bin/save-artifacts #!/bin/bash # tarcf - .composer composer.lock vendor $ oc edit bc/site #spec: # strategy: # sourceStrategy: # incremental: true .s2i/bin/assemble #!/bin/bash # if [ -d /tmp/artifacts/ ]; then # echo "---> Restoring build artifacts from /tmp/artifacts..." # shopt -s dotglob # mv -v /tmp/artifacts/* ./ # shopt -u dotglob # fi
  • 21.
    Build Incremental .s2i/bin/save-artifacts #!/bin/bash # tarcf - .composer composer.lock vendor $ oc edit bc/site #spec: # strategy: # sourceStrategy: # incremental: true .s2i/bin/assemble #!/bin/bash # if [ -d /tmp/artifacts/ ]; then # echo "---> Restoring build artifacts from /tmp/artifacts..." # shopt -s dotglob # mv -v /tmp/artifacts/* ./ # shopt -u dotglob # fi
  • 22.
  • 23.
    $ oc describedc/site 1. Name: site 2. Namespace: workshop 3. Created: 6 days ago 4. Labels: app=site i. template=site 5. Annotations: iconClass=icon-php i. openshift.io/generated-by=GetupCloudWebConsole 6. Latest Version: 6 7. Selector: deploymentconfig=site 8. Replicas: 1 9. Triggers: Image(site@latest, auto=true), Config 10.Strategy: Recreate 11.Template: 12. Labels: app=site i. deploymentconfig=site
  • 24.
    1. Containers: 2. php: 3.Image: 172.30.34.145:5000/workshop/site@sha256:84f1195cb9fb30ae5bdd8eba5c27f2f2db0da60b26b92838417659130e aa 4. Port: 8080/TCP 5. Limits: 6. cpu: 366m 7. memory: 512Mi 8. Requests: 9. cpu: 10m 10. memory: 128Mi 11. Volume Mounts: <none> 12. Environment Variables: 13. PATH: /opt/app-root/src/bin:/opt/app- root/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/sbin:/bin:/opt/rh/rh-php56/root/usr/bin 14. STI_SCRIPTS_URL: image:///usr/libexec/s2i 15. STI_SCRIPTS_PATH: /usr/libexec/s2i 16. HOME: /opt/app-root/src 17. BASH_ENV: /opt/app-root/etc/scl_enable 18. ENV: /opt/app-root/etc/scl_enable 19. PROMPT_COMMAND: . /opt/app-root/etc/scl_enable 20. PHP_VERSION: 5.6 21. No volumes.
  • 25.
  • 26.
    1. type: Recreate 2.recreateParams: 3. mid: 4. execNewPod: 5. command: 6. - ./migrate-db 7. containerName: php 8. env: 9. - name: DATABASE_SERVICE_NAME 10. value: mysql 11. - name: DATABASE_NAME 12. value: site 13. - name: DATABASE_USER 14. value: admin 15. - name: DATABASE_PASSWORD 16. value: password 17. failurePolicy: Abort
  • 27.
  • 28.
    1. strategy: 2. type:Rolling 3. resources: {} 4. rollingParams: 5. intervalSeconds: 1 6. maxSurge: 25% 7. maxUnavailable: 25% 8. timeoutSeconds: 600 9. updatePeriodSeconds: 1
  • 29.
  • 30.
    1. kind: Route 2.metadata: 3. annotations: 4. haproxy.router.openshift.io/balance: roundrobin 5. openshift.io/generated-by: GetupCloudWebConsole 6. labels: 7. app: site 8. getup.io/component-name: site 9. name: siteab-workshop-getup-io 10. namespace: workshop 11.spec: 12. alternateBackends: 13. - kind: Service 14. name: siteb 15. weight: 30 16. host: siteab-workshop.getup.io 17. to: 18. kind: Service 19. name: site 20. weight: 70 21.status: 22. host: siteab-workshop.getup.io 23. routerName: router
  • 31.
    1. kind: Route 2.metadata: 3. annotations: 4. haproxy.router.openshift.io/balance: roundrobin 5. openshift.io/generated-by: GetupCloudWebConsole 6. labels: 7. app: site 8. getup.io/component-name: site 9. name: siteab-workshop-getup-io 10. namespace: workshop 11.spec: 12. alternateBackends: 13. - kind: Service 14. name: siteb 15. weight: 30 16. host: siteab-workshop.getup.io 17. to: 18. kind: Service 19. name: site 20. weight: 70 21.status: 22. host: siteab-workshop.getup.io 23. routerName: router
  • 32.
  • 33.
    1. spec: 2. host:site-workshop.getup.io 3. port: 4. targetPort: 8080-tcp 5. tls: 6. insecureEdgeTerminationPolicy: Allow 7. termination: edge 8. to: 9. kind: Service 10. name: siteb 11. weight: 100 12.status: 13. ingress: 14. - conditions: 15. - lastTransitionTime: 2016-12-08T21:44:51Z 16. status: "True" 17. type: Admitted 18. host: site-workshop.getup.io 19. routerName: router
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.