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

Add deployment pipeline #551

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

coyote-tango
Copy link

This change introduces a GitHub Action workflow that enables continuous deployment of a Node.js app to GKE using Terraform and Helm. The workflow is triggered by pushes to the main branch and performs the following steps:

  • Checkout the code from the repository
  • Setup the gcloud CLI and authenticate using a service account key stored as a GitHub secret
  • Setup Terraform and apply the the main.tfonfiguration located in terraform/dev. This provisions the necessary resources for the application deployment pipeline, such as a GKE cluster, an Artifact Registry repo and a GCS bucket for TF state management.
  • Authenticate Docker to use the gcloud CLI as a credential helper
  • Get the credentials for the GKE cluster.
  • Build a Docker image for the application and tag it with the commit SHA.
  • Push the Docker image to the GCP Artifact Registry.
  • Setup Helm and package the Helm chart located in k8s/ using the commit SHA as the chart version.
  • Publish the chart to GCP Artifact Registry(Used as chart repo as well).
  • Deploy the chart to the GKE cluster using Helm, specifying the image tag and namespace.

This workflow allows for automated and reliable deployment of the infrastructure and application on GKE, and can be easily adapted for use in other environments/clouds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant