Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epic (Devops): Deploy develop Branch to Staging Environment in AWS #585

Open
9 tasks
LoTerence opened this issue Sep 26, 2024 · 3 comments
Open
9 tasks
Assignees
Labels
feature: Architecture Pertains to project architecture and settings P2: Med-high Medium-high priority PBV: dev all issues for engineering roles (devops, backend, frontend, db) role: devops Pertains to cd/ci tasks size: 13pt+ Must be broken down into smaller issues
Milestone

Comments

@LoTerence
Copy link
Member

LoTerence commented Sep 26, 2024

Overview

Epic summary: As a development team, we want to deploy the develop branch to a staging environment in AWS to test the latest changes in an environment that closely mirrors production.

Acceptance Criteria:

  • Ensure a fully automated deployment pipeline is configured for a staging environment in AWS.
  • The pipeline should handle source control, continuous integration, environment provisioning, deployment, and monitoring.
  • The pipeline is documented so that any new team members can easily read docs and look at a chart to understand the flow.
  • A staging environment is deployed to AWS via Hack for LA's incubator account, following their required processes and procedures
Details

The develop branch will be used to test new code changes before merging to the main branch, which should deploy to a production environment.

For now, this epic will focus on the staging deployment only. The next step after this for devops is to deploy the main branch to production, then set it up so that whenever changes are made to the main branch, it is automatically deployed through terraform/github actions/AWS.

This epic is an overview of what generally needs to be done to achieve our goal. A devops engineer that works on this will need to break it down into more specific stories and action items, define their own tasks as well as track their own progress. It will require an ability to work independently and make sound decisons on behalf of the team.

Action Items

User Story 1: Create Staging Environment Infrastructure in AWS
  • As a DevOps engineer, I want to define and provision a staging environment in AWS using infrastructure-as-code (IAC) so that deployments are consistent and replicable.

Acceptance Criteria:

  • Use Terraform (and/or other IAC tools if necessary) to define staging infrastructure.
  • Provision an isolated VPC, EC2 instances, or Lambda functions, depending on the application's architecture.
  • Ensure environment mirrors the production environment as closely as possible.

Tasks

  • Write Terraform/CloudFormation templates to define AWS resources (e.g., VPC, ECS, RDS, S3, etc.).
  • Ensure security groups, IAM roles, and permissions are correctly set.
  • Verify successful provisioning and connectivity between components.
User Story 2: Configure Deployment Pipeline to Staging

As a DevOps engineer, I want to automate the deployment process to AWS when the develop branch is merged into or updated, so that the application is consistently deployed to the staging environment.

Acceptance Criteria:

  • Configure deployment triggers via GitHub Actions.
  • Deploy the application to AWS ECS, EKS, or EC2 as per the infrastructure setup.
  • Ensure rollback functionality is available in case of deployment failure.

Tasks:

  • Set up the CI/CD pipeline to deploy artifacts from the build phase to the AWS staging environment.
  • Define environment variables and secrets using AWS Systems Manager or Secrets Manager.
  • Implement rollback strategy (e.g., using AWS CodeDeploy or Terraform).
User Story 3: Document devops Process

As a developer, I should be able to read documentation about the devops and deployments process so that I can have an understanding of how it works.

Acceptance Criteria:

  • Our project's mkdocs should have a page about how AWS/incubator deployments are set up
  • Mkdocs should have a page about our github actions related to the deployment pipelines
  • There should be a diagram to easily visualize how the different AWS services are structured together

Tasks:

  • Write documentation about the AWS deployments
  • Write documentation about the github actions used for deployment
  • Create an AWS service diagram

Resources/Instructions

@LoTerence LoTerence added size: 13pt+ Must be broken down into smaller issues feature: Architecture Pertains to project architecture and settings role: devops Pertains to cd/ci tasks P2: Med-high Medium-high priority PBV: dev all issues for engineering roles (devops, backend, frontend, db) labels Sep 26, 2024
@LoTerence LoTerence added this to the 07 - MVP 1 milestone Sep 26, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New Issue Approval in P: CTJ: Project Board Sep 26, 2024
@LoTerence
Copy link
Member Author

LoTerence commented Sep 27, 2024

We have this up: https://stage.civictechjobs.org/
But no one has any information about it

Update 10/07/2024:

  • seems there is a CTJ stage deployment up on HfLA's incubator AWS account
  • There are AWS files located in ./aws/ in the codebase, and some github action workflows

Related issues that need to be processed:

@nooriaali9
Copy link
Member

@LoTerence Issue looks good, Moving it to prioritized backlog - until someone is ready to pick it up.

@nooriaali9 nooriaali9 moved this from 🆕 New Issue Approval to 📋 Prioritized Backlog in P: CTJ: Project Board Oct 4, 2024
@LoTerence
Copy link
Member Author

Hey @RSkuma - adding you here for visibility. Lets use this issue to keep track of updates regarding deployment to Incubator. Feel free to own this issue and remove/change anything in the description you feel is necessary. I wrote it using ChatGPT so its not 1-to-1 exactly what we need to do 😅 Thanks!!

Updates:

  • Successfully deployed a staging environment to our personal AWS accounts
  • AWS incubator deployment blocked by devops support - they are prioritizing VRMS because it's a live application. Should hopefully be free by mid-January.
  • Ryan writing Terraform scripts in progress

@RSkuma RSkuma moved this from 📋 Prioritized Backlog to 🏗 In progress in P: CTJ: Project Board Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: Architecture Pertains to project architecture and settings P2: Med-high Medium-high priority PBV: dev all issues for engineering roles (devops, backend, frontend, db) role: devops Pertains to cd/ci tasks size: 13pt+ Must be broken down into smaller issues
Projects
Status: 🏗 In progress
Development

No branches or pull requests

3 participants