This document assumes/follow common patterns of the current process and serves as a basic guide to to deploy microservices using github actions. Please update this document regularly.
Step 1. Upload codes to the mono repo
source: https://github.com/SafiBank/SaFiMono/tree/main/services
Most backend microservices are stored under SaFIMono/services folder, still will depend on what type of application you are trying to build.
Step 2. Prepare secrets and infra
source: https://github.com/SafiBank/SaFiMono/blob/main/devops/terraform/_files/microservices.yaml
microservices: my_awesome_app: create_postgres: true inject_secrets: #LEGACY, NO EFFECT - kafka - temporal #create_postgres(bool) true or false #https://github.com/SafiBank/SaFiMono/blob/main/devops/terraform/tf-environments/apps_sql.tf Creates postgreql resources user, pass, database and store these info to hc-vault #inject_secrets(list) LEGACY, don't use, can be deleted with caution
List your app under microservices, follow the format of other applications, this will create secrets and infra needed for you application and will trigger the following TF pipelines. If no errors from plan, apply accordingly.
https://app.terraform.io/app/safi/workspaces/safi-repos (creates github secrets)
https://app.terraform.io/app/safi/workspaces/safi-env-dev (creates GCP SA’s, bindings and hc-vault secrets)
https://app.terraform.io/app/safi/workspaces/safi-dns-safibankonline (creates dns entry in all env)
Step 3. Create github actions file
After pushing your changes, it’s time to create your actions yaml files.
source:https://github.com/SafiBank/SaFiMono/tree/main/.github/workflows .
app-my-awesome-app.yml
app-my-awesome-app-{env}.yml
app-my-awesome-app-validate.yml
Step 4. Create Deployment files
Step 5. Run/Test the build
Step 6. Update this document
If there are new process or changes to this document, please do your share and have this updated
Attachments:
Screen Shot 2022-10-06 at 1.32.59 PM.png (image/png)