Watch a video to explain what we are going to do in part 5:
In part 4, you successfully build our containerized application and it's running.
In this step, you will modify the source code for spring-petclinic
application.
-
Login into your GitHub account. Navigate to your
spring-petclinic
repository. -
In the code section, locate below file:
src > main > resources > templates > welcome.html
-
Modify
welcome.html
file content. Line 10 contain greeting textHi SUSE Rancher friends!
. You can change the greeting message to your desired one. -
Click
Commit Changes
button to save your changes.
Please open and login to the following system with your favourtie browser open to view the progress.
Login to your Jenkins, Jenkin UI > Job
> Status
> Console Output
Login to Rancher, Rancher UI > Explorer
> devsecops
> Workload
> Pods
> Namespace
> Jenkins
In a new window, Rancher UI > Global Apps
> Continous Delivery
> Git Repo
a) In the above step, you have modified your source code. This will trigger a new pipeline job in Jenkins.
b) Below screenshot indicates it's in container creation stage.
c) Anchore has completed container image scanning phase and post that we get to the Approval junction.
d) Once the changes are accepted by clicking on Yes
GitHub would be updated with new container image version and then the new image will be pushed to Harbor. You can login into Harbor to verify the same. You should see v1.0.2 as the lastest container image for the application. Same time the previous build container will terminate.
You will see Build1 (v1.0.1) containaer is up and running (1/1), however build2 container (v1.0.2) is been coming up (0/1)
e) Check Git Repo status in Rancher UI and the status would be in active
state,
Rancher UI > Global Apps
> Continous Delivery
> Git Repo
f) In Rancher UI > Global Apps
> Cluster Explorer
Cluster2
> Service Discovery
> Services
We expect to see application version 1.0.2
and updated welcome message Hi SUSE Rancher Parnter Community! Welcome aboard on this DevSecOps workshop!
and sure we do see...
You have successfully made changes to our code in GitHub, Git remain single source of truth.
Congratulation! you have sucessfully build our CI/CD pipeline with SUSE Rancher for continuous development and delviery. We hope you have enjoyed exploring a little of what Rancher can do to your kubenetes development, deplyment, and management.
When you have finished playing with your lab environment go to Part 6 - Cleaning up the lab environment