Assignment 3: Deployment¶
Possible Points | Due Date |
---|---|
50 pts | Monday September 30th - 11:59pm |
Overview¶
During this assingnment, students will:
-
Understand the fundamental steps involved in deployment
-
Learn about CI/CD and the basics of how to set it up in a Github repo
-
Get hands on experience deploying with a cloud provider - Render
Definitions¶
Before we begin, we have to understand our goals with CI/CD. It is a software development approach that utilizes frequent, automated testing and deployment to ensure that changes to the codebase can be rapidly and safely incorporated into the production environment.
Continuous Integration (CI) refers to the practice of automatically building and testing the codebase whenever new changes are introduced. This involves integrating code changes from multiple developers into a shared repository and running automated tests to ensure that the changes do not break the existing functionality.
Continuous Deployment/Delivery (CD) refers to the practice of automatically deploying code changes to the production environment after they have been tested and approved. Continuous Deployment involves automatically deploying changes to the production environment as soon as they pass automated tests, while Continuous Delivery involves deploying changes to a staging environment for further testing and approval before being deployed to production.
Together, CI/CD enables software teams to rapidly and safely develop, test, and deploy changes to the codebase, improving the speed and quality of software delivery while reducing the risk of errors and downtime.
There's quite a lot to learn about CI/CD. If you're interested in learning more, click here!
Task 0: Setting up your repository¶
For this assignment, we'll be working with a basic web app built with Express that responds to HTTP requests.
Please follow our Tutorial for getting started with the Assignment on GitHub Classroom.
Task 1: Continuous Deployment¶
Please follow our Tutorial for Deploying a Web App using GitHub and Render.
Task 2: Implement a Joke Generator Endpoint!¶
To test that the continuous deployments are working as expected, and familiarize yourself with the basic web app codebase, let's implement support for an endpoint that generates a Joke(s)!
- Add two express endpoints named "joke1" and "joke2", that when visited, display the setup for a joke of your choosing.
- Add two additional express endpoints named "punchline1" and "punchline2" that display both the joke setup and joke punchline.
- Add two new Jest tests that test whether one joke and one punchline endpoint are functioning properly.
Extra Credit (5 points)¶
You can earn extra credit on this assignment if you create a single joke endpoint that returns a random joke + punchline when visited. This endpoint should be simply called "joke" and must return a random joke + punchline from a pool of at least 5 joke + punchline pairs to receive the extra credit.
Turning in the Assignment & Grading Rubric¶
Turn in Assignment 3 on Webcourses by providing a link to your Render Deployment and by committing your changes implementing the Joke features to your GitHub repository. You do not need to submit a link to the GitHub repository as we will be able to access it through GitHub classroom.
The grading for this project will be broken down as follows:
- Part One: Deploying to Render - (20 points total)
- Part Two: Implementing the Joke Endpoint - (30 points total)
- Extra Credit: Random Joke Endpoint - (5 points total)