Skip to content

Commit

Permalink
add mainnet env
Browse files Browse the repository at this point in the history
  • Loading branch information
duje-begonja-rdx committed Sep 13, 2023
1 parent 1a8e3bf commit efd3806
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,50 @@ jobs:
INGRESS_DOMAIN: ${{ secrets.INGRESS_DOMAIN }}
HELM_GH_USER: ${{ secrets.HELM_GH_USER }}
HELM_GH_PASS: ${{ secrets.HELM_GH_PASS }}

deploy-mainnet:
if: github.event_name == 'release' && !github.event.release.prerelease
runs-on: ubuntu-latest
needs:
- push-docker-image
permissions:
id-token: write
contents: read
pull-requests: read
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: unfor19/install-aws-cli-action@457b7980b125044247e455d87b9a26fc2299b787
with:
version: 2
- name: Setup helmfile and helm
uses: mamezou-tech/setup-helmfile@55ae2a66c5af4883148b7a50cc6ddc9b61042184
with:
helm-diff-plugin-version: 'v3.1.3'
helmfile-version: 'v0.144.0'
helm-version: 'v3.11.0'
install-kubectl: no
- name: Install kubectl
uses: azure/setup-kubectl@901a10e89ea615cf61f57ac05cecdf23e7de06d8 #v3.2
with:
version: 'v1.25.6'
- name: Configure AWS credentials for deployment
uses: aws-actions/configure-aws-credentials@bab55d3830fe69833c9fecaa51fe2c829a7508f3
with:
role-to-assume: ${{ secrets.DEPLOY_MAINNET_IAM_ROLE }}
aws-region: eu-west-2
- name: Deploy application
working-directory: deploy/helm
run: |
aws eks update-kubeconfig --name ${{ secrets.MAINNET_CLUSTER_NAME }} \
--alias ${{ secrets.MAINNET_CLUSTER_NAME }} \
--region eu-west-2
helmfile --environment mainnet --namespace radix-dapp-toolkit-mainnet \
--state-values-set "ci.tag=${{ env.CI_TAG }}" \
--state-values-set "ci.ingressDomain=${{ env.MAINNET_INGRESS_DOMAIN }}" \
apply
env:
CI_TAG: ${{ fromJSON(needs.push-docker-image.outputs.json).labels['org.opencontainers.image.version'] }}
INGRESS_DOMAIN: ${{ secrets.MAINNET_INGRESS_DOMAIN }}
HELM_GH_USER: ${{ secrets.HELM_GH_USER }}
HELM_GH_PASS: ${{ secrets.HELM_GH_PASS }}
17 changes: 17 additions & 0 deletions deploy/helm/environments/mainnet/values.yaml.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ingress:
enabled: true
hosts:
- host: {{ .StateValues.ci.ingressDomain }}
paths:
- path: /
pathType: Prefix

alertmanager:
env: "mainnet"
nameOverride: "radix-dapp-toolkit-amcfg"
slackConfig:
channel: "feed--alerts-dapps-mainnet"
secrets:
region: eu-west-2
name: "rtlj-prod/eks/dapps/mainnet/alertmanager-integration-keys"
enable_pagerduty_notifications: true
8 changes: 8 additions & 0 deletions deploy/helm/helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ repositories:
environments:
dev: {}
pr: {}
mainnet: {}
releases:
- name: radix-dapp-toolkit
chart: ./radix-dapp-toolkit
Expand All @@ -26,3 +27,10 @@ releases:
values:
- environments/common/values.yaml.gotmpl
- environments/{{ .Environment.Name }}/values.yaml.gotmpl

- name: alertmanager
chart: rdx-works/alertmanager-configs
version: 1.1.0
installed: {{ eq .Environment.Name "mainnet" }}
values:
- environments/{{ .Environment.Name }}/values.yaml.gotmpl

0 comments on commit efd3806

Please sign in to comment.