-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdemo.sh
executable file
·76 lines (53 loc) · 2.15 KB
/
demo.sh
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
58
59
60
61
62
63
64
65
66
67
#! /usr/bin/env bash
source ./demo-magic.sh
# How to reset
# Delete MySQL with Helm and spring-petclinic with kapp
# Delete the PVC in spring-petclinic
# Delete the spring-petclinic namespace from TMC UI
# Reset TBS back to 19
# Delete all the MySQL and common Helm charts
#1 - secure image pipeline for existing software
#2 - platform operators providing databases and K8s access to development teams with TAC and TMC
#3 - low-K8s "easy mode"
#4 - microservices architecture
#5 - constant backdrop of observability
clear
p 'Welcome. Lets get started by showing an existing pipeline being triggered by a code change'
pe 'kp build logs product-api -n images'
p 'Lets take a look at the image YAML'
pe 'bat images/product-api.yml'
p 'But what about keeping the images up-to-date?'
pe 'tbs/tbs-update-stack-100.0.30.sh'
pe 'kp build logs product-api -n images'
p 'Lets add a new Spring Boot application to our environment. The app is called spring-petclinic'
p 'First we need a database'
p 'Next step is to put the MySQL chart into Harbor'
cd tac
pe './sync.sh'
cd ..
p 'Lets take a look at Harbor Helm repo and our image replication'
p 'Helm repo is ready. We need to provision a new namespace for our application. Lets use Tanzu Mission Control'
p 'Lets login as our spring-petclinic developer and begin deploying'
pe 'tkgi get-kubeconfig cluster2 --username spring-petclinic-dev --password spring-petclinic-dev --api https://tkgi.lab.home'
p 'We havent been assigned any permissions yet. Lets confirm'
pe 'kubectl get pods -n product-api'
pe 'kubectl get pods -n spring-petclinic'
cd apps/spring-petclinic/mysql
pe './install.sh'
cd ../../..
p 'It seems we lack permissons. Lets fix that in Tanzu Mission Control'
pe 'kubectl get pods -n product-api'
pe 'kubectl get pods -n spring-petclinic'
p 'Lets try our install again'
cd apps/spring-petclinic/mysql
pe './install.sh'
p 'And now we can install our app'
cd ..
pe './install.sh'
cd ../..
p 'Lets consider a more managed app experience'
cmd
cmd
pe 'cf push test-app -p apps/test-app/test-app'
p 'Lets talk microservices and service mesh'
p 'And last but not least, Tanzu Observability is receiving metrics from all of our sources'