Skip to content

Commit

Permalink
infra
Browse files Browse the repository at this point in the history
  • Loading branch information
Thyagarajanc77 committed Oct 23, 2024
1 parent 40eadb8 commit be55ba7
Show file tree
Hide file tree
Showing 26 changed files with 143 additions and 176 deletions.
120 changes: 60 additions & 60 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
name: code
# name: code

on:
push:
paths:
- ".github/workflows/code.yml"
- "**"
# on:
# push:
# paths:
# - ".github/workflows/code.yml"
# - "**"

concurrency: code
# concurrency: code

jobs:
# gp-nonprod - 1
build-push-gp-nonprod:
runs-on: ubuntu-latest
environment:
name: gp-nonprod
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Global Build Push
id: build_push
uses: CondeNast/[email protected]
with:
ecr_repository_url: 166755036155.dkr.ecr.us-east-1.amazonaws.com/engagement-permify
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
context: .
target: production
push: true
build_args: |
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
outputs:
tag: ${{ steps.build_push.outputs.tag }}
image: ${{ steps.build_push.outputs.image }}
# jobs:
# # gp-nonprod - 1
# build-push-gp-nonprod:
# runs-on: ubuntu-latest
# environment:
# name: gp-nonprod
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Global Build Push
# id: build_push
# uses: CondeNast/[email protected]
# with:
# ecr_repository_url: 166755036155.dkr.ecr.us-east-1.amazonaws.com/engagement-permify
# aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# context: .
# target: production
# push: true
# build_args: |
# NPM_TOKEN=${{ secrets.NPM_TOKEN }}
# outputs:
# tag: ${{ steps.build_push.outputs.tag }}
# image: ${{ steps.build_push.outputs.image }}

deploy-gp-nonprod-eu-0:
needs: build-push-gp-nonprod
if: ${{ github.ref_name == 'main' || github.ref_name == 'staging'}}
runs-on: ubuntu-latest
environment:
name: gp-nonprod-protected
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Deploy
id: deploy
uses: CondeNast/[email protected]
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: eu-central-1
eks_cluster_name: gp-nonprod-eu-0
eks_namespace: engagement
helm_release_name: permify
helm_chart_name: gp-app
helm_chart_version: 9.x
helm_values_inline: |
deployment.app.image="166755036155.dkr.ecr.eu-central-1.amazonaws.com/engagement-permify:${{ needs.build-push-gp-nonprod.outputs.tag }}"
serviceAccount.roleArn="arn:aws:iam::166755036155:role/kubernetes/engagement/engagement-gp-nonprod-eu-0-permify"
readinessProbe.httpGet.path="/ping"
livenessProbe.httpGet.path="/ping"
helm_description: "tag:${{ needs.build-push-gp-nonprod.outputs.tag }}"
helm_values_file: ./kubernetes/gp-nonprod-eu-0.yml
deploy: true
# deploy-gp-nonprod-eu-0:
# needs: build-push-gp-nonprod
# if: ${{ github.ref_name == 'main' || github.ref_name == 'staging'}}
# runs-on: ubuntu-latest
# environment:
# name: gp-nonprod-protected
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Deploy
# id: deploy
# uses: CondeNast/[email protected]
# with:
# aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# aws_region: eu-central-1
# eks_cluster_name: gp-nonprod-eu-0
# eks_namespace: engagement
# helm_release_name: permify
# helm_chart_name: gp-app
# helm_chart_version: 9.x
# helm_values_inline: |
# deployment.app.image="166755036155.dkr.ecr.eu-central-1.amazonaws.com/engagement-permify:${{ needs.build-push-gp-nonprod.outputs.tag }}"
# serviceAccount.roleArn="arn:aws:iam::166755036155:role/kubernetes/engagement/engagement-gp-nonprod-eu-0-permify"
# readinessProbe.httpGet.path="/ping"
# livenessProbe.httpGet.path="/ping"
# helm_description: "tag:${{ needs.build-push-gp-nonprod.outputs.tag }}"
# helm_values_file: ./kubernetes/gp-nonprod-eu-0.yml
# deploy: true
166 changes: 83 additions & 83 deletions .github/workflows/eks-tenant-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ concurrency: eks-tenant-infra

jobs:
# gp-nonprod -
gp-nonprod-ap-northeast-1:
uses: CondeNast/global-workflows/.github/workflows/[email protected]
with:
version: 1-1.2.6
environment_plan: gp-nonprod-readonly
environment_apply: gp-nonprod-protected
infra_dir: gp-nonprod/ap-northeast-1
working_dir: infra
aws_default_region: ap-northeast-1
main_branch: main
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ecr_aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
ecr_aws_secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
terraform_modules_deploy_key: ${{ secrets.GLOBAL_TERRAFORM_MODULES_DEPLOY_KEY }}
# gp-nonprod-ap-northeast-1:
# uses: CondeNast/global-workflows/.github/workflows/[email protected]
# with:
# version: 1-1.2.6
# environment_plan: gp-nonprod-readonly
# environment_apply: gp-nonprod-protected
# infra_dir: gp-nonprod/ap-northeast-1
# working_dir: infra
# aws_default_region: ap-northeast-1
# main_branch: main
# secrets:
# aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# ecr_aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
# ecr_aws_secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
# terraform_modules_deploy_key: ${{ secrets.GLOBAL_TERRAFORM_MODULES_DEPLOY_KEY }}
gp-nonprod-eu-central-1:
uses: CondeNast/global-workflows/.github/workflows/[email protected]
with:
Expand All @@ -42,71 +42,71 @@ jobs:
ecr_aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
ecr_aws_secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
terraform_modules_deploy_key: ${{ secrets.GLOBAL_TERRAFORM_MODULES_DEPLOY_KEY }}
gp-nonprod-us-east-1:
uses: CondeNast/global-workflows/.github/workflows/[email protected]
with:
version: 1-1.2.6
environment_plan: gp-nonprod-readonly
environment_apply: gp-nonprod-protected
infra_dir: gp-nonprod/us-east-1
working_dir: infra
aws_default_region: us-east-1
main_branch: main
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ecr_aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
ecr_aws_secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
terraform_modules_deploy_key: ${{ secrets.GLOBAL_TERRAFORM_MODULES_DEPLOY_KEY }}
# gp-nonprod-us-east-1:
# uses: CondeNast/global-workflows/.github/workflows/[email protected]
# with:
# version: 1-1.2.6
# environment_plan: gp-nonprod-readonly
# environment_apply: gp-nonprod-protected
# infra_dir: gp-nonprod/us-east-1
# working_dir: infra
# aws_default_region: us-east-1
# main_branch: main
# secrets:
# aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# ecr_aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
# ecr_aws_secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
# terraform_modules_deploy_key: ${{ secrets.GLOBAL_TERRAFORM_MODULES_DEPLOY_KEY }}
# gp-prod
gp-prod-ap-northeast-1:
needs: gp-nonprod-ap-northeast-1
uses: CondeNast/global-workflows/.github/workflows/[email protected]
with:
version: 1-1.2.6
environment_plan: gp-prod-readonly
environment_apply: gp-prod-protected
infra_dir: gp-prod/ap-northeast-1
working_dir: infra
aws_default_region: ap-northeast-1
main_branch: main
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ecr_aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
ecr_aws_secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
terraform_modules_deploy_key: ${{ secrets.GLOBAL_TERRAFORM_MODULES_DEPLOY_KEY }}
gp-prod-eu-central-1:
needs: gp-nonprod-eu-central-1
uses: CondeNast/global-workflows/.github/workflows/[email protected]
with:
version: 1-1.2.6
environment_plan: gp-prod-readonly
environment_apply: gp-prod-protected
infra_dir: gp-prod/eu-central-1
working_dir: infra
aws_default_region: eu-central-1
main_branch: main
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ecr_aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
ecr_aws_secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
terraform_modules_deploy_key: ${{ secrets.GLOBAL_TERRAFORM_MODULES_DEPLOY_KEY }}
gp-prod-us-east-1:
needs: gp-nonprod-us-east-1
uses: CondeNast/global-workflows/.github/workflows/[email protected]
with:
version: 1-1.2.6
environment_plan: gp-prod-readonly
environment_apply: gp-prod-protected
infra_dir: gp-prod/us-east-1
working_dir: infra
aws_default_region: us-east-1
main_branch: main
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ecr_aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
ecr_aws_secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
terraform_modules_deploy_key: ${{ secrets.GLOBAL_TERRAFORM_MODULES_DEPLOY_KEY }}
# gp-prod-ap-northeast-1:
# needs: gp-nonprod-ap-northeast-1
# uses: CondeNast/global-workflows/.github/workflows/[email protected]
# with:
# version: 1-1.2.6
# environment_plan: gp-prod-readonly
# environment_apply: gp-prod-protected
# infra_dir: gp-prod/ap-northeast-1
# working_dir: infra
# aws_default_region: ap-northeast-1
# main_branch: main
# secrets:
# aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# ecr_aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
# ecr_aws_secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
# terraform_modules_deploy_key: ${{ secrets.GLOBAL_TERRAFORM_MODULES_DEPLOY_KEY }}
# gp-prod-eu-central-1:
# needs: gp-nonprod-eu-central-1
# uses: CondeNast/global-workflows/.github/workflows/[email protected]
# with:
# version: 1-1.2.6
# environment_plan: gp-prod-readonly
# environment_apply: gp-prod-protected
# infra_dir: gp-prod/eu-central-1
# working_dir: infra
# aws_default_region: eu-central-1
# main_branch: main
# secrets:
# aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# ecr_aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
# ecr_aws_secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
# terraform_modules_deploy_key: ${{ secrets.GLOBAL_TERRAFORM_MODULES_DEPLOY_KEY }}
# gp-prod-us-east-1:
# needs: gp-nonprod-us-east-1
# uses: CondeNast/global-workflows/.github/workflows/[email protected]
# with:
# version: 1-1.2.6
# environment_plan: gp-prod-readonly
# environment_apply: gp-prod-protected
# infra_dir: gp-prod/us-east-1
# working_dir: infra
# aws_default_region: us-east-1
# main_branch: main
# secrets:
# aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# ecr_aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }}
# ecr_aws_secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }}
# terraform_modules_deploy_key: ${{ secrets.GLOBAL_TERRAFORM_MODULES_DEPLOY_KEY }}
4 changes: 0 additions & 4 deletions infra/gp-nonprod/ap-northeast-1/ecr/backend.tfvars

This file was deleted.

2 changes: 0 additions & 2 deletions infra/gp-nonprod/ap-northeast-1/ecr/terraform.tfvars

This file was deleted.

4 changes: 0 additions & 4 deletions infra/gp-nonprod/ap-northeast-1/eks-role/backend.tfvars

This file was deleted.

3 changes: 0 additions & 3 deletions infra/gp-nonprod/ap-northeast-1/eks-role/terraform.tfvars

This file was deleted.

4 changes: 0 additions & 4 deletions infra/gp-nonprod/us-east-1/ecr/backend.tfvars

This file was deleted.

2 changes: 0 additions & 2 deletions infra/gp-nonprod/us-east-1/ecr/terraform.tfvars

This file was deleted.

4 changes: 0 additions & 4 deletions infra/gp-nonprod/us-east-1/eks-role/backend.tfvars

This file was deleted.

3 changes: 0 additions & 3 deletions infra/gp-nonprod/us-east-1/eks-role/terraform.tfvars

This file was deleted.

4 changes: 0 additions & 4 deletions infra/gp-nonprod/us-east-1/secret/backend.tfvars

This file was deleted.

3 changes: 0 additions & 3 deletions infra/gp-nonprod/us-east-1/secret/terraform.tfvars

This file was deleted.

File renamed without changes.

0 comments on commit be55ba7

Please sign in to comment.