Homework 08
Due Date: Tuesday, March 31 by 11:00am CDT
Unit 9 The DevOps of Research Computing
This homework is based off of the material worked in Unit 09, focusing on setting up the automation, continuous integration, and continuous deployment elements that speed up our development process.
Part 1: Demo Dashboard
Following the exercises from Unit 09, assemble the files needed for a small, demonstration dashboard. A simple Dash app that displays ‘Hello, World!’ would be sufficient for this. The homework should also demonstrate staging vs. production deployments, and it should demonstrate automation with a Makefile. Specifically we will be looking for:
app.py- A minimal Dash apprequirements.txt- Listed any Python dependenciesDockerfile- Containerizes the app and dependencies, uses requirements.txtdocker-compose.yml- For simpler container orchestration (Hint: you might need two of these)Makefile- To automate development, targets should support building / starting / stopping containers in both staging / production environmentstest_app.py- A minimal integration test, compatible with pytest
Part 2: CI/CD
Write two GitHub Actions workflows for:
Automatically running the simple integration test on every push to the repository
Automatically building and pushing a container image to the GitHub Container Registry every time a new tag is added to the repository
Please note that these two workflows should not be in the homework08/ folder - rather they should
be in the standard place that those workflow files go - .github/workflows/ (from the root directory).
We will be checking for the files, and we will be checking for successful executions of the workflows
in the ‘Actions’ tab of your repository. (If running the workflows fails with errors, try to debug
the errors and keep triggering the workflows until they are successful).
What to Turn In
Create a
homework08/directory in your homework repositoryAssemble all the files above in an organized way into that folder
NOTE: Add the two GitHub Action workflow files to a
.github/workflows/folder at the root of the repositoryAdd a
README.mdinhomework08/that:Generally describes the purpose of the homework project
Describes how to start and stop the dashboard using targets in the Makefile
Describes the difference between staging and production deployments, and how they should be used
Describes the purpose of the two GitHub Actions workflows
Includes a section on AI usage (if applicable — see note below)
Expected directory layout:
my-mbs337-repo/
├── .github/
│ └── workflows/
│ ├── integration-test.yml
│ └── push-to-registry.yml
└── homework08/
├── Dockerfile
├── Makefile
├── app.py
├── docker-compose-staging.yml
├── docker-compose.yml
├── requirements.txt
└── test
└── test_app.py
Note on Using AI
The use of AI to complete this assignment is not recommended, but it is permitted with the following restrictions:
The use of LLMs (like ChatGPT, Copilot, etc) or any other AI must be rigorously cited. Any code blocks or text that are generated by an AI model should be clearly marked as such with in-code comments describing what was generated, how it was generated, and why you chose to use AI in that instance. The homework README must also contain a section that summarizes where AI was used in the assignment.
Additional Resources
Please find us in the class Slack channel if you have any questions!