Skip to content

Commit 503a607

Browse files
author
Aditya Shrivastava
committed
adds recitation 4 and hw5 changes
1 parent 7085208 commit 503a607

File tree

3 files changed

+97
-10
lines changed

3 files changed

+97
-10
lines changed

docs/_data/schedule.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
link: ''
282282
name: ''
283283
recitation:
284-
handout: ''
284+
handout: 'recitations/reci4-github'
285285
name: 'GitHub'
286286
quiz: ''
287287
slides: ''

docs/assignments/hw5-25.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@
1010
You and your team have modified and tested a basic calculator app. Now, you're going to deploy that app so that anyone can access it.
1111

1212
**This is a group project**. You will work in groups to understand AWS and Github documentation, and use your understanding to set up a deployment workflow that deploys the calculator app on every push to main. This assignment is intentionally less prescriptive than prior assignments;
13-
*a large component of the work is reading and understanding documentation.*
13+
*a large component of the work is reading and understanding documentation.*
1414

1515

1616
## Assignment instructions
1717

1818
In this assignment, you will use AWS to deploy your webapp. Specifically, you'll use:
1919
- AWS lambda to run your backend code.
2020
- API Gateway to expose your calculator API to the web.
21-
- S3 to host your frontend code.
21+
- S3 to host your frontend code.
2222
- Github actions to automatically deploy updated frontend/backend code to S3/lambda.
2323

24-
We'll describe each of these components in more detail next.
24+
We'll describe each of these components in more detail next.
2525

2626
### Deliverables
2727

2828
For this assignment, each group will turn in:
29-
- One paragraph on your division of responsibilities (see immediately next).
29+
- One paragraph on your division of responsibilities (see immediately next).
3030
- A link to the production deployment of your calculator app.
3131
- A link/links to your Github deployment workflows.
3232
- A link to the most recent commit to main, showing that your deployment workflow has run successfully.
@@ -78,23 +78,32 @@ You are going to create a [REST API](https://www.redhat.com/en/topics/api/what-i
7878
This API will expose the `calculate` function.
7979

8080
Start from [this tutorial](https://docs.aws.amazon.com/lambda/latest/dg/services-apigateway-tutorial.html#services-apigateway-tutorial-api) or the AWS docs above to create a REST API that exposes `calculate`.
81-
Then, coordinate with your team to make sure that invocations of `calculate` call the calculator's backend lambda code.
81+
Then, coordinate with your team to make sure that invocations of `calculate` call the calculator's backend lambda code.
8282

83-
### 3. Use S3 to host your frontend code
83+
### 3. Use S3 and Amplify to host your frontend code
8484

8585
[S3](https://aws.amazon.com/s3/) is cloud storage for basically anything.
86-
You'll be using it to host your calculator frontend code.
86+
You'll be using it to host your calculator frontend code. With this you will be able to store the files that govern the frontend logic of your code. To deploy and expose these files at a publicly available URL endpoint, you will have to integrate this to AWS Amplify.
8787

88-
TODO: J+A, describe amplify and how this works, the interactions between FE and API
88+
[AWS Amplify](https://aws.amazon.com/amplify/) is a cloud-based development platform that simplifies frontend and full-stack web application deployment. In this assignment, you will use Amplify to manage deployment of the frontend of your calculator application.
89+
90+
Amplify integrates with [Amazon S3](https://docs.aws.amazon.com/amplify/latest/userguide/hosting.html) to store and serve static assets like HTML, CSS, and JavaScript files. It provides an automated deployment pipeline that syncs with your GitHub repository and updates the frontend whenever changes are pushed to the main branch.
91+
92+
To complete this part of the assignment, refer to the following AWS documentation:
93+
- [Getting started with Amplify hosting with S3](https://docs.aws.amazon.com/amplify/latest/userguide/deploy-website-from-s3.html)
94+
- [Using Amplify With Github](https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html)
95+
96+
Your task is to set up Amplify to host the frontend of your application, ensuring that updates are deployed automatically on each commit to the main branch.
8997

9098
### 4. Use Github actions to automatically deploy on each push to main
9199

92100
Finally, you will use a Github action to automatically:
93101
1. Deploy your packaged backend lambda code.
94102
2. Deploy your frontend code to S3.
103+
3. Deploy the updates made on S3 to Amplify endpoint.
95104

96105
In order to do this, you will need to allow Github to authenticate to AWS.
97-
Follow the [Github documentation](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions) to safely use your AWS secrets in CD. [This AWS blog post](https://aws.amazon.com/blogs/compute/using-github-actions-to-deploy-serverless-applications/) describes some (basic) best practices for generating and handling AWS authentication secrets in CI; navigate to the "Configuring AWS credentials in GitHub" section of the tutorial.
106+
Follow the [Github documentation](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions) to safely use your AWS secrets in CD. [This AWS blog post](https://aws.amazon.com/blogs/compute/using-github-actions-to-deploy-serverless-applications/) describes some (basic) best practices for generating and handling AWS authentication secrets in CI; navigate to the "Configuring AWS credentials in GitHub" section of the tutorial.
98107

99108
#### Deploying backend code
100109

docs/recitations/reci4-github.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Recitation #4 – GitHub Basics
2+
3+
## What is GitHub?
4+
GitHub is a **web-based version control platform** that uses Git, a popular version control system. It is widely used by **individuals, teams, and organizations** to manage software development projects. GitHub also hosts many **open-source projects and enterprise solutions**.
5+
6+
### Why Use GitHub?
7+
- **Collaboration** – Multiple developers can work on the same project seamlessly.
8+
- **Version Control** – Allows easy rollback and tracking of changes.
9+
- **Automated Deployment** – Supports seamless automated solution deployment.
10+
11+
## Understanding Commits
12+
### What is a commit?
13+
A commit is a **snapshot of changes** in a codebase.
14+
15+
### Best Practices for Commits
16+
- **Write meaningful commit messages** – Clearly describe the change.
17+
- **Use atomic commits** – Keep changes small and focused.
18+
19+
## Pull Requests
20+
### What is a Pull Request (PR)?
21+
A pull request is a **code difference analysis tool** that enables reviewing and merging changes into the main codebase.
22+
23+
### Review Process
24+
- **Code approvals** – Ensure quality and correctness.
25+
- **Comments for feedback** – Encourage discussion and improvements.
26+
27+
## Linking Issues to Pull Requests
28+
### What is an issue?
29+
An issue is a log of **tasks, bug reports, and feature requests** used to track development progress.
30+
31+
### Linking Issues to PRs
32+
- Use **keywords** like `Fixes #21` or `Closes #42` in PR descriptions.
33+
- Improves **traceability** and **automates issue closure** upon merging.
34+
35+
## Managing Releases
36+
### What is a release?
37+
A **versioned snapshot** of the code after key milestones.
38+
39+
### Key Aspects of Releases
40+
- **Tagging versions** – Use versioning strategies like **Semantic Versioning** (`v1.0.0`).
41+
- **Drafting release notes** – Document key changes and improvements.
42+
- **Attaching binaries** – Include compiled files if necessary.
43+
44+
## Good Coding Practices
45+
### Branching Strategies
46+
- **Git Flow** – Main branch with feature and hotfix branches.
47+
- **Feature Branching** – Separate branches for new features.
48+
- **Hotfixes** – Patches for critical issues.
49+
50+
### Commit and PR Guidelines
51+
- **Clear, concise commit messages**
52+
- **Descriptive PRs** with context and explanation
53+
54+
### Code Review Etiquette
55+
- **Provide constructive feedback**
56+
- **Encourage respectful discussions**
57+
58+
## Introduction to GitHub Actions
59+
GitHub Actions is an **automation tool** for CI/CD workflows.
60+
61+
### Triggers for Workflows
62+
- **Push and Pull Requests** – Automate actions based on repository events.
63+
- **Jobs and Steps** – Define a sequence of automated actions.
64+
65+
### Common Use Cases
66+
- **Automated Testing** – Run unit tests on new commits.
67+
- **Automated Deployment** – Deploy code to production or staging environments.
68+
- **Code Linting** – Enforce coding standards automatically.
69+
70+
## Practice
71+
To apply these concepts, follow the steps below:
72+
73+
1. **Fork** the repository: [simple-calculator](https://github.com/Jacqueline-Tsai/simple-calculator)
74+
2. **Set up** the application locally.
75+
3. **Create an issue** (e.g., "Developer Log") to track your changes.
76+
4. **Create a Pull Request (PR)** that adds a `console.log` whenever a calculation takes place.
77+
5. **Link the issue to the PR** using GitHub keywords.
78+
6. **Merge the PR** once approved.

0 commit comments

Comments
 (0)