Assignment 2
Use actionhub to generate your repo for this assignment. The repo is called "Assignment 2 - Deploy scalable software" in actionhub. The repo will then be generated for you in your private group in this course.
You submit Assignment 2 by a merge request (MR).
What the assignment is about
You build and deploy Cloudbook, a guestbook for cloud reports. Visitors say what cloud they see right now, the reports are stored in MongoDB, and Redis counts them. The app itself is small on purpose. The point of the assignment is everything around it: how software gets from your computer to a running, scalable system in the cloud.
You start with a single static page and end with an Express app, a database and a counter, running on a Kubernetes cluster of three servers in the university cloud, released by pushing a Git tag.
How it is organised
The work is split into six weeks, and each week has its own page with a plan, slide decks and reading material. Start with Week 1.
- Issues. The tasks are issues in your project, labelled with the week and as Mandatory or Optional. Work through them in order, because each one builds on the one before. Every issue says what to do, why, and how to check that it works.
- Repository. Your project is the one place for code, infrastructure files, pipeline and manifests. The
docs/folder in it has reference material per tool, anddocs/TROUBLESHOOTING.mdlists common symptoms. - Weekly reports. After each week you fill in
report/week-N.md: what you did, what you learned, and a few questions to answer in your own words. The six reports are part of your submission.
What you need
- Access to the university's OpenStack cloud (see Infrastructure). Each server needs 2 GB of memory, and your project has room for three servers.
- Node.js 24 or later, Git, and Docker with Docker Compose on your own computer.
What you build, week by week
| Week | You end up with |
|---|---|
| 1 | A server created by code, a pipeline that deploys on a tag, and HTTPS |
| 2 | An Express app in a Docker image, built and run by the pipeline |
| 3 | MongoDB and Redis, started locally with Docker Compose |
| 4 | The whole app in a local Kubernetes cluster (minikube) |
| 5 | A real k3s cluster with three nodes, storage and health checks |
| 6 | Releases from the pipeline without downtime, and a tear-down of the cluster |
In weeks 3 and 4 you work locally and do not deploy. The server has no databases until the cluster exists.
Submit by an MR
When you are all done, create an MR for your project.
- Navigate to your project.
- Click
Code -> Merge requests. - Click
New merge request. - Choose
mainas source branch andlnu/submitas target branch. - Click
Compare branches and continue.
Then set up the MR with details.
- Set title to
SUBMIT: Assignment 2. - In description, fill in the details in the MR template.
- Select the milestone you are submitting to, make sure it is related to Assignment 2.
- Select the label
Submitted, orRe-submittedif this is a new submission after feedback. - Leave all else as their default values.
Watch the pipeline of the MR, it should go green, otherwise inspect and fix it. The MR is made from main, so pushing a fix to main starts a new pipeline.
Deadlines (Milestones)
You can see the deadlines for submissions on GitLab, they are documented as milestones.