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

Replicate production env to AKS #920

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
johnake marked this conversation as resolved.
Show resolved Hide resolved
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_name: 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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/database-copy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/restore-paas-db-to-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- dev
- test
- preprod
- production

env:
BACKUP_ARTIFACT_NAME: ${{ inputs.environment }}-backup
Expand Down Expand Up @@ -86,6 +87,9 @@ jobs:
preprod)
echo "ENVIRONMENT_AKS=preproduction_aks" >> $GITHUB_OUTPUT
;;
production)
echo "ENVIRONMENT_AKS=production_aks" >> $GITHUB_OUTPUT
;;
*)
echo "unknown cluster"
;;
Expand Down Expand Up @@ -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"
;;
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
Loading