Skip to content

Latest commit

 

History

History
81 lines (40 loc) · 3.73 KB

part-5.md

File metadata and controls

81 lines (40 loc) · 3.73 KB

Part 5 - Put Everything Together

Watch a video to explain what we are going to do in part 5:

Workshop Part 5

1. Modify source code

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.

  1. Login into your GitHub account. Navigate to your spring-petclinic repository.

  2. In the code section, locate below file:

src > main > resources > templates > welcome.html

Rancher UI

  1. Modify welcome.html file content. Line 10 contain greeting text Hi SUSE Rancher friends!. You can change the greeting message to your desired one.

  2. Click Commit Changes button to save your changes.

3. Observe the new pipeline being built

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.

Rancher UI

b) Below screenshot indicates it's in container creation stage.

Rancher UI

c) Anchore has completed container image scanning phase and post that we get to the Approval junction.

Rancher UI

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.

Harbor UI

Rancher UI

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)

Rancher UI

Rancher UI

e) Check Git Repo status in Rancher UI and the status would be in active state,

Rancher UI > Global Apps > Continous Delivery > Git Repo

Rancher UI

f) In Rancher UI > Global Apps > Cluster Explorer Cluster2 > Service Discovery > Services

Rancher UI

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