Skip to content

Commit 936b448

Browse files
authored
Update step4.md
Adjust the new scenario.
1 parent 56d9630 commit 936b448

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

operator-image/step4.md

+15-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
## Edit the source of the webapp
22
<https://github.com/jfclere/demo-webapp/blob/master/src/main/java/org/example/tomcat/cloud/TestServlet.java>
33

4-
## Remove what was deployed
4+
## Update the war
5+
56
`cd /root/demo-webapp`{{execute}}
67

7-
`kubectl delete -f ./custom_resource.yaml`{{execute}}
8+
`git pull`{{execute}}
89

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}}
1118

12-
`kubectl apply -f ./custom_resource.yaml`{{execute}}
19+
`docker build -t docker.io/jfclere/tomcat-demo .`{{execute}}
1320

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}}
1622

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.
1825

1926
## the tomcat pods started
2027
`kubectl get pods`{{execute}}

0 commit comments

Comments
 (0)