Keyboard Time: 20 mins, Automation Wait Time: 5 mins
Scenarios: Instructor-Led, Self-Paced
In this Lab you will update the background color of the application and track the progress of the automation through both repositories and both environments.
Observe an end-to-end application change:
Update the background color of the application
Track the progress of the automation through the Application Build project and
Through both environments of the Environment Deployment project using the background page color.
Open ‘yourpersonalgroup/hello-world’
In the left navigation, Click Repository => Files
On the upper right of the Project page, Click Web IDE
Navigate to the file src/microwebserver.py
Around line 11, locate the text <BODY style="background:lightsalmon">
Change the color after the word background:
to lightgreen
Result: <BODY style="background:lightgreen">
If you need a different color, other available color values are listed here
Click Create commit…
Select Commit to main branch (not selected by default)
Click Commit
In the very bottom left, immediately after the text ‘Pipeline’ Click [the pipeline number which is preceeded with a #]
[Automation wait: ~2 min] Wait for the pipeline to complete.
Click Packages & Registries => Container Registry
Click [the line ending in ‘/main’]
Scan for the latest-prod tag
It should have been built moments ago. There should also be a new version tag with the same value for ‘Digest’
Open ‘yourpersonalgroup/world-greetings-env-1’ project.
Click CI/CD => Schedules
On the right side of schedule called ‘CheckForNewContainerVersion’, Click [the play button]
If the schedule is missing, simply Click CI/CD => Pipelines => Run Pipeline = and then => Run Pipeline
On the left navigation, Click CI/CD => Pipelines
Open the most recent non-skipped pipeline by clicking [the pipeline Status badge] or [the pipeline #]
Expand the Downstream pipeline - next to the deploy job, Click [the small right arrow]
[Automation wait: ~3 min] Wait for the ‘update-staging-manifests’ job to complete successfully.
In the pipeline, Click update-staging-manifests
Search the job log (manually or with your brower’s ‘in page search’ feature) for the text “Changes to be committed” (near the bottom)
In the left navigation, Click Repository => Files
In the main page body, in the files and directories list, Click manifests
Click hello-world.staging.yaml
Find - image:
Note the version number at the very end of the image string should match the image registry version you just saw. Keep this version in mind so you can compare to production in the next steps .
Click [the browers back button]
Click hello-world.production.yaml
Find - image:
Click Deployments => Environments
[Automation wait: ~3 min] Keep refreshing until staging deployment activities complete.
If you are in an instructor-led workshop, the instructor may need to access the cluster for you. If you were to run into unusual deployment problems, you would need to login to the Kubernetes Cluster and run the below command. To do this, login to the EKS Bastion host the same was as was done in “Prep Lab 2.3: Use GitLab K8s Agent to Integrate The Cluster with GitLab” to install the GitLab Agent. Then run this command kubectl logs -f -l=app=gitlab-agent -n gitlab-agent
For common errors and more troubleshooting information visit Troubleshooting the GitLab agent for Kubernetes
On the ‘staging’ line, to the right, Click Open
You should see that the staging environment is now the new color.
To approve the production deployment, in the left navigation, Click CI/CD => Pipelines
Open the most recent non-skipped pipeline by clicking [the pipeline Status badge] or [the pipeline #]
Next to the deploy job, Click [the small right arrow]
Locate the update-production-manifests job
You may have to horizontally scroll right to see this final job.
Click [the play button in a circle]
[Automation wait: ~3 min] Keep refreshing until production deployment activities complete.
Click Deployments => Environments
[Automation wait: ~3 min] Keep refreshing until staging deployment activities complete.
On the ‘production’’ line, to the right, Click Open
Update the background color of the application
Track the progress of the automation through the Application Build project and
Through both environments of the Environment Deployment project using the background page color.