diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index b6b21fc9..11ae6ba7 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -119,6 +119,30 @@ jobs: environment: ${{ matrix.environment }} azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} + deploy_v2_production: + name: Deploy to production_aks environment + runs-on: ubuntu-latest + continue-on-error: true + if: github.ref == 'refs/heads/main' && github.event_name == 'push' + environment: + name: production_aks + url: ${{ steps.deploy_v2.outputs.environment_url }} + concurrency: deploy_production_aks + needs: [docker, deploy_v2_nonprod] + + outputs: + environment_url: ${{ steps.deploy_v2.outputs.environment_url }} + + steps: + - uses: actions/checkout@v3 + - uses: ./.github/workflows/actions/deploy_v2 + id: deploy_v2 + with: + environment: production_aks + docker_image: ${{ needs.docker.outputs.docker_image }} + azure-credentials: ${{ secrets.AZURE_CREDENTIALS }} + arm-access-key: ${{ secrets.ARM_ACCESS_KEY }} + deploy_nonprod: name: Deploy to ${{ matrix.environment }} environment runs-on: ubuntu-latest diff --git a/.github/workflows/database-copy.yml b/.github/workflows/database-copy.yml index f5c0eea9..09918f13 100644 --- a/.github/workflows/database-copy.yml +++ b/.github/workflows/database-copy.yml @@ -10,7 +10,7 @@ jobs: name: Restore DB strategy: matrix: - environment: [dev, test, preprod] + environment: [dev, test, preprod, production] max-parallel: 1 uses: ./.github/workflows/restore-paas-db-to-aks.yml with: diff --git a/.github/workflows/restore-paas-db-to-aks.yml b/.github/workflows/restore-paas-db-to-aks.yml index 3a69c2a1..74bcda40 100644 --- a/.github/workflows/restore-paas-db-to-aks.yml +++ b/.github/workflows/restore-paas-db-to-aks.yml @@ -13,6 +13,7 @@ on: - dev - test - preprod + - production env: BACKUP_ARTIFACT_NAME: ${{ inputs.environment }}-backup @@ -86,6 +87,9 @@ jobs: preprod) echo "ENVIRONMENT_AKS=preproduction_aks" >> $GITHUB_OUTPUT ;; + production) + echo "ENVIRONMENT_AKS=production_aks" >> $GITHUB_OUTPUT + ;; *) echo "unknown cluster" ;; @@ -133,6 +137,11 @@ jobs: echo "cluster_name=$test_cluster_name" >> $GITHUB_ENV echo "app_name=find-a-lost-trn-preproduction" >> $GITHUB_ENV ;; + production_aks) + echo "cluster_rg=$production_cluster_rg" >> $GITHUB_ENV + echo "cluster_name=$production_cluster_name" >> $GITHUB_ENV + echo "app_name=find-a-lost-trn-production" >> $GITHUB_ENV + ;; *) echo "unknown cluster" ;; diff --git a/terraform/aks/workspace_variables/production_aks.tfvars.json b/terraform/aks/workspace_variables/production_aks.tfvars.json index 9e0c6a86..c55ae080 100644 --- a/terraform/aks/workspace_variables/production_aks.tfvars.json +++ b/terraform/aks/workspace_variables/production_aks.tfvars.json @@ -1,10 +1,12 @@ { "app_environment": "production", "cluster": "production", + "file_environment": "prod", "enable_monitoring": false, "namespace": "tra-production", "azure_resource_prefix": "s189p01", "config_short": "pd", "service_short": "faltrn", - "app_key_vault": "s189p01-faltrn-pp-app-kv" + "app_key_vault": "s189p01-faltrn-pd-app-kv", + "worker_replicas": 0 }