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

[P1] Automate deployments with Github Actions #76

Closed
willroberts opened this issue Oct 2, 2022 · 2 comments
Closed

[P1] Automate deployments with Github Actions #76

willroberts opened this issue Oct 2, 2022 · 2 comments
Assignees
Labels
blocked Depends on another issue enhancement New feature or request infrastructure Related to infrastructure / deployments

Comments

@willroberts
Copy link
Collaborator

Pulling this work out of #69 and #3 to reduce their scope.

We should automate the process of deploying OpenDuelyst when a new release is published on Github.

This can be done by creating an Actions workflow for the release event, and having that action publish container to ECR. If ECS is using the latest version of the container, I believe it will be able to pull it down automatically. If not, it will still be doable with a small amount of work.

@willroberts willroberts added enhancement New feature or request infrastructure Related to infrastructure / deployments labels Oct 2, 2022
@willroberts
Copy link
Collaborator Author

willroberts commented Oct 5, 2022

Deployment currently involves the following:

Git steps:

  • Updating the version number in package.json and version.json
  • Updating the deployed_version in terraform/staging/ecs.tf (should we use latest instead?)
  • Merging a PR for the above, tagging the merge commit, and creating a new release

Steps which can be automated:

  • Building new images with scripts/build_container.sh <service> <version>
  • Publishing new images with scripts/publish_container.sh <service> <version> <aws ecr registry id>
  • Using terraform apply to update the ECS deployed_version (and sometimes manually kicking the cluster if it doesn't have capacity to deploy automatically)
  • Building the app for staging (NODE_ENV=staging, ALL_CARDS_AVAILABLE=true, FIREBASE_URL=foo, and API_URL-foo set)
  • Uploading the new build to S3
  • Creating a CloudFront invalidation for the new build's files, e.g. /staging/duelyst.js

@willroberts willroberts self-assigned this Oct 13, 2022
@willroberts willroberts added the P1 label Oct 13, 2022
@willroberts willroberts changed the title [CI/CD] Automated deployments with Github Actions [P1] Automate deployments with Github Actions Oct 13, 2022
@willroberts willroberts added blocked Depends on another issue and removed P1 labels Oct 13, 2022
@willroberts
Copy link
Collaborator Author

This is now better-documented here: https://github.com/open-duelyst/duelyst/blob/main/docs/DEPLOYING.md

This automation work can begin once we have permissions to access (read and write) Github Secrets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Depends on another issue enhancement New feature or request infrastructure Related to infrastructure / deployments
Projects
None yet
Development

No branches or pull requests

1 participant