← BIT 401 Cloud Computing and DevOps
Containers and CI/CD Pipelines
Notes
Containers and reproducible environments
A container packages an application with its libraries while sharing the host operating system kernel. An image is the versioned template used to create running containers. Unlike a virtual machine, a container usually does not include a separate guest kernel, so it starts quickly and uses fewer resources. Teams should build small images, pin dependency versions and keep passwords outside image layers. A registry stores images for distribution. Persistent business records belong in managed databases or durable volumes rather than temporary container storage that disappears when an instance is replaced.
Automating delivery safely
Continuous integration means merging small code changes frequently and automatically checking them through builds and tests. Continuous delivery prepares verified changes for release, while continuous deployment releases every qualifying change automatically. A pipeline should run unit tests, dependency checks, image scanning and integration tests before deployment. The same immutable image should move through staging and production to reduce environmental differences. Approvals, separate deployment permissions and rollback procedures control operational risk. Monitoring after release is essential because passing tests cannot establish that every real user workflow will succeed.
Practical example
A Mombasa e-commerce startup makes ten releases each month. Manual packaging and deployment take 90 minutes per release, giving 10 × 90 = 900 minutes. An automated pipeline requires 15 minutes of staff attention per release, or 150 minutes monthly. The saving is 750 minutes, equivalent to 12.5 hours. At KES 800 per hour, released staff capacity is worth KES 10,000 monthly before pipeline costs. The team deploys one image digest to staging and production, checks payment callbacks, and retains the previous image so failed orders can trigger a controlled rollback.
Quiz
1. Why should the same image be promoted between environments?
2. Where should persistent order records normally be stored?
3. What monthly staff time is saved in the example?
Sign in to submit and securely grade your quiz.