Commit 936b448 1 parent 56d9630 commit 936b448 Copy full SHA for 936b448
File tree 1 file changed +15
-8
lines changed
1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change 1
1
## Edit the source of the webapp
2
2
< https://github.com/jfclere/demo-webapp/blob/master/src/main/java/org/example/tomcat/cloud/TestServlet.java >
3
3
4
- ## Remove what was deployed
4
+ ## Update the war
5
+
5
6
` cd /root/demo-webapp ` {{execute}}
6
7
7
- ` kubectl delete -f ./custom_resource.yaml ` {{execute}}
8
+ ` git pull ` {{execute}}
8
9
9
- ## Use the custom resource for the NEW demo-webapp
10
- ` cd /root/demo-webapp ` {{execute}}
10
+ ` mvn install ` {{execute}}
11
+
12
+ ## Update the image
13
+ ` cd /root/tomcat-openshift ` {{execute}}
14
+
15
+ ` cp /root/demo-webapp/target/demo-1.0.war sample.war ` {{execute}}
16
+
17
+ ` mvn install ` {{execute}}
11
18
12
- ` kubectl apply -f ./custom_resource.yaml ` {{execute}}
19
+ ` docker build -t docker.io/jfclere/tomcat-demo . ` {{execute}}
13
20
14
- ## Set how it is done
15
- It uses the maven builder from the image: maven:3.8.1-openjdk-8
21
+ ` docker push jfclere/tomcat-demo ` {{execute}}
16
22
17
- The operator mount /mnt in webapp and start the tomcat image.
23
+ ## What the operator is doing
24
+ The push in the docker repo triggers a deployment of the new image.
18
25
19
26
## the tomcat pods started
20
27
` kubectl get pods ` {{execute}}
You can’t perform that action at this time.
0 commit comments