Deploy your application using Kubernetes
release
)release-candidate
)release
and once for release-candidate
. Each will use different settings.
The ultimate aim is to establish a fully automated CI/CD pipeline leveraging GitHub Actions.
This pipeline will automatically build, test, and deploy the GoFast application based on the type of GitHub Release created:
v1.0.0
) in the GitHub repository triggers a deployment to the release
(production) environment.v1.0.0-rc.1
) triggers a deployment to the release-candidate
(staging) environment.kube
directory.
12.34.56.78
)user.gofast.live
)admin.gofast.live
)client.gofast.live
)grafana.gofast.live
).env
file with your secrets.release
for production environmentrelease-candidate
for staging environmentKUBE_CONFIG
secret.
DB_NAME
, DB_USER
, DB_PASSWORD
PRIVATE_KEY_PEM
and PUBLIC_KEY_PEM
(generated using scripts/keys.sh
).github/workflows/release.yml
to match your environments and services.
kube/setup.sh
match those defined in the .github/workflows/release.yml
file.
IAM & Admin > Service Accounts
, and create a service account with the Cloud SQL Client
role.kube/gcp-sa-key.json
. Add the key to your GitHub repository secrets as GCP_SA_KEY
.Cloud SQL Admin API
.Cloud SQL > Instances
, create a new instance, and select PostgreSQL
as the database type.DB_NAME
, DB_USER
, and DB_PASSWORD
respectively.project-id:region:instance-name
) as CLOUD_SQL_CONNECTION_NAME
.kube/setup.sh
- Uncomment the Google Cloud SQL secrets and comment the CloudNativePG secrets.kube/config/service-user.yaml
- Uncomment the Google SQL Proxy configuration..github/workflows/migration.yml
- Uncomment the Google Cloud SQL section and comment the CloudNativePG section.