Skip to content

Commit 90e4a47

Browse files
authored
Merge pull request #768 from PureStorage-OpenConnect/dudeaccelerate
Dudeaccelerate
2 parents 468c3ca + 5fd1387 commit 90e4a47

File tree

20 files changed

+246
-76
lines changed

20 files changed

+246
-76
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ This example is a mixture of both methods. The template is applied, then the com
211211
```
212212
$ cat ~/.px-deploy/scripts/petclinic
213213
# Install petclinic on each cluster
214-
kubectl apply -f /assets/petclinic.yml
214+
kubectl apply -f /assets/petclinic.yaml
215215
```
216216

217217
These variables are passed to the script:

RELEASE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
##Improvements
2+
* Refactor PX-Backup scripts
3+
* Refactor dude scripts
4+
15
# 6.6.1
26
##Fixes
37
* fix vSphere issue when one or more nodes is slow to provision

assets/dude/async-dr.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ spec:
1919
startApplications: false
2020
namespaces:
2121
- petclinic
22+
excludeResourceTypes:
23+
- TargetGroupBinding
2224
schedulePolicyName: drpolicy

assets/dude/bashrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
alias k=kubectl
22
complete -F __start_kubectl k
3-
PS1='\e[0;33m[\u@px-training \W]\$ \e[m'
3+
PS1='\[\e[0;33m\][\u@px-training \W]\$ \[\e[m\]'

assets/dude/petclinic.yaml

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,215 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: petclinic
5+
---
6+
kind: StorageClass
7+
apiVersion: storage.k8s.io/v1
8+
metadata:
9+
name: px-repl2-sc
10+
provisioner: pxd.portworx.com
11+
parameters:
12+
#openstorage.io/auth-secret-name: px-user-token
13+
#openstorage.io/auth-secret-namespace: portworx
14+
repl: "2"
15+
io_profile: "db_remote"
16+
---
17+
kind: PersistentVolumeClaim
18+
apiVersion: v1
19+
metadata:
20+
namespace: petclinic
21+
name: petclinic-db-mysql
22+
spec:
23+
storageClassName: px-repl2-sc
24+
accessModes:
25+
- ReadWriteOnce
26+
resources:
27+
requests:
28+
storage: 8Gi
29+
---
30+
apiVersion: v1
31+
kind: Service
32+
metadata:
33+
namespace: petclinic
34+
creationTimestamp: null
35+
labels:
36+
app: petclinic-db-mysql
37+
name: petclinic-db-mysql
38+
selfLink: /api/v1/namespaces/default/services/petclinic-db-mysql
39+
spec:
40+
ports:
41+
- name: mysql
42+
port: 3306
43+
protocol: TCP
44+
targetPort: mysql
45+
selector:
46+
app: petclinic-db-mysql
47+
sessionAffinity: None
48+
type: ClusterIP
49+
---
50+
kind: Service
51+
apiVersion: v1
52+
metadata:
53+
name: petclinic
54+
namespace: petclinic
55+
annotations:
56+
service.beta.kubernetes.io/aws-load-balancer-type: "external"
57+
labels:
58+
app: petclinic
59+
spec:
60+
type: LoadBalancer
61+
ports:
62+
- name: http
63+
protocol: TCP
64+
port: 80
65+
targetPort: 8080
66+
nodePort: 30333
67+
selector:
68+
app: petclinic
69+
---
70+
apiVersion: apps/v1
71+
kind: Deployment
72+
metadata:
73+
name: petclinic
74+
namespace: petclinic
75+
labels:
76+
app: petclinic
77+
spec:
78+
replicas: 1
79+
selector:
80+
matchLabels:
81+
app: petclinic
82+
template:
83+
metadata:
84+
labels:
85+
app: petclinic
86+
spec:
87+
schedulerName: stork
88+
containers:
89+
- name: petclinic
90+
image: springdeveloper/spring-petclinic:2.0.0.BUILD-SNAPSHOT
91+
imagePullPolicy: IfNotPresent
92+
ports:
93+
- containerPort: 80
94+
livenessProbe:
95+
httpGet:
96+
path: /manage/health
97+
port: 8080
98+
initialDelaySeconds: 60
99+
periodSeconds: 5
100+
readinessProbe:
101+
httpGet:
102+
path: /manage/health
103+
port: 8080
104+
initialDelaySeconds: 15
105+
periodSeconds: 5
106+
env:
107+
- name: SPRING_PROFILES_ACTIVE
108+
value: 'production,kubernetes'
109+
- name: MYSQL_HOST
110+
value: petclinic-db-mysql
111+
- name: MYSQL_USERNAME
112+
value: root
113+
- name: MYSQL_PASSWORD
114+
value: supermysql
115+
---
116+
apiVersion: apps/v1
117+
kind: Deployment
118+
metadata:
119+
namespace: petclinic
120+
annotations:
121+
deployment.kubernetes.io/revision: "1"
122+
creationTimestamp: null
123+
generation: 1
124+
labels:
125+
app: petclinic-db-mysql
126+
name: petclinic-db-mysql
127+
spec:
128+
replicas: 1
129+
selector:
130+
matchLabels:
131+
app: petclinic-db-mysql
132+
strategy:
133+
rollingUpdate:
134+
maxSurge: 1
135+
maxUnavailable: 1
136+
type: RollingUpdate
137+
template:
138+
metadata:
139+
creationTimestamp: null
140+
labels:
141+
app: petclinic-db-mysql
142+
spec:
143+
schedulerName: stork
144+
containers:
145+
- env:
146+
- name: MYSQL_ROOT_PASSWORD
147+
value: supermysql
148+
- name: MYSQL_PASSWORD
149+
value: supermysql
150+
- name: MYSQL_USER
151+
- name: MYSQL_DATABASE
152+
value: petclinic
153+
image: mysql:5.7.33
154+
imagePullPolicy: IfNotPresent
155+
livenessProbe:
156+
exec:
157+
command:
158+
- sh
159+
- -c
160+
- mysqladmin ping -u root -p${MYSQL_ROOT_PASSWORD}
161+
failureThreshold: 3
162+
initialDelaySeconds: 30
163+
periodSeconds: 10
164+
successThreshold: 1
165+
timeoutSeconds: 5
166+
name: petclinic-db-mysql
167+
ports:
168+
- containerPort: 3306
169+
name: mysql
170+
protocol: TCP
171+
readinessProbe:
172+
exec:
173+
command:
174+
- sh
175+
- -c
176+
- mysqladmin ping -u root -p${MYSQL_ROOT_PASSWORD}
177+
failureThreshold: 3
178+
initialDelaySeconds: 5
179+
periodSeconds: 10
180+
successThreshold: 1
181+
timeoutSeconds: 1
182+
resources:
183+
requests:
184+
cpu: 100m
185+
memory: 256Mi
186+
terminationMessagePath: /dev/termination-log
187+
terminationMessagePolicy: File
188+
volumeMounts:
189+
- mountPath: /var/lib/mysql
190+
name: data
191+
dnsPolicy: ClusterFirst
192+
initContainers:
193+
- command:
194+
- rm
195+
- -fr
196+
- /var/lib/mysql/lost+found
197+
image: busybox:1.29.3
198+
imagePullPolicy: IfNotPresent
199+
name: remove-lost-found
200+
resources:
201+
requests:
202+
cpu: 10m
203+
memory: 10Mi
204+
terminationMessagePath: /dev/termination-log
205+
terminationMessagePolicy: File
206+
volumeMounts:
207+
- mountPath: /var/lib/mysql
208+
name: data
209+
restartPolicy: Always
210+
securityContext: {}
211+
terminationGracePeriodSeconds: 30
212+
volumes:
213+
- name: data
214+
persistentVolumeClaim:
215+
claimName: petclinic-db-mysql

docs/templates/async-dr/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ kubectl get ns
113113
9. In cluster 1, provision the Petclinic app:
114114

115115
```
116-
kubectl apply -f /assets/petclinic/petclinic.yml
116+
kubectl apply -f /assets/petclinic/petclinic.yaml
117117
```
118118

119119
Talk about how it is a stateless Java app backed by a MySQL data, which itself is backed by a Portworx volume:

docs/templates/migration/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ kubectl get ns
8787
8. In cluster 1, provision the Petclinic app:
8888

8989
```
90-
kubectl apply -f /assets/petclinic/petclinic.yml
90+
kubectl apply -f /assets/petclinic/petclinic.yaml
9191
```
9292

9393
Talk about how it is a stateless Java app backed by a MySQL data, which itself is backed by a Portworx volume:

docs/templates/pds-petclinic/README.md

Lines changed: 0 additions & 56 deletions
This file was deleted.
-25.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)