Skip to content

Commit

Permalink
Btc integration env variable (#35)
Browse files Browse the repository at this point in the history
* added envs and image visibility

* added envs and image visibility

* added image visibility
  • Loading branch information
eedygreen authored Jun 11, 2024
1 parent 607e6ee commit 943608e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy_ecs_STAGE_EXT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
TAG: "Demo"
AWS_TESTNET: '${{ secrets.AWS_ARN }}'
AWS_ROLE: '${{ secrets.AWS_ROLE_NAME }}'
IMAGE_VERSION: ''

jobs:
deploy:
Expand Down Expand Up @@ -44,7 +45,7 @@ jobs:
awsRegion=${{ env.AWS_REGION }}
relayerName=${{ env.PROJECT_NAME }}
appTag=${{ env.TAG }}
env=STAGE
imageTag=${{ env.IMAGE_VERSION }}
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
26 changes: 15 additions & 11 deletions ecs/task_definition_PARTNERS.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"containerDefinitions": [
{
"name": "{{ relayerName }}-{{ relayerId }}-container-{{ appTag }}",
"image": "ghcr.io/sygmaprotocol/sygma-relayer:stable",
"image": "ghcr.io/sygmaprotocol/sygma-relayer:{{ set Sygma release version }}",
"portMappings": [
{
"containerPort": 9000,
Expand Down Expand Up @@ -45,6 +45,18 @@
{
"name": "SYG_RELAYER_ENV",
"value": {{ env }}
},
{
"name": "SYG_RELAYER_MPCCONFIG_KEYSHAREPATH",
"value": "/mount/r{{ relayerId }}.keyshare"
},
{
"name": "SYG_RELAYER_MPCCONFIG_TOPOLOGYCONFIGURATION_PATH",
"value": "/mount/r{{ relayerId }}-top.json"
},
{
"name": "SYG_RELAYER_MPCCONFIG_FROSTKEYSHAREPATH",
"value": "/mount/r{{ relayerId }}-frost.keyshare"
}
],
"mountPoints": [
Expand All @@ -59,18 +71,10 @@
"name": "SYG_RELAYER_MPCCONFIG_KEY",
"valueFrom": "arn:aws:ssm:{{ awsRegion }}:{{ awsAccountId }}:parameter/chainbridge/relayers/relayer-{{ relayerId }}/SYG_RELAYER_MPCCONFIG_KEY"
},
{
"name": "SYG_RELAYER_MPCCONFIG_KEYSHAREPATH",
"valueFrom": "arn:aws:ssm:{{ awsRegion }}:{{ awsAccountId }}:parameter/chainbridge/relayers/relayer-{{ relayerId }}/SYG_RELAYER_MPCCONFIG_KEYSHAREPATH"
},
{
"name": "SYG_RELAYER_MPCCONFIG_TOPOLOGYCONFIGURATION_ENCRYPTIONKEY",
"valueFrom": "arn:aws:ssm:{{ awsRegion }}:{{ awsAccountId }}:parameter/chainbridge/relayers/relayer/SYG_RELAYER_MPCCONFIG_TOPOLOGYCONFIGURATION_ENCRYPTIONKEY"
},
{
"name": "SYG_RELAYER_MPCCONFIG_TOPOLOGYCONFIGURATION_PATH",
"valueFrom": "arn:aws:ssm:{{ awsRegion }}:{{ awsAccountId }}:parameter/chainbridge/relayers/relayer-{{ relayerId }}/SYG_RELAYER_MPCCONFIG_TOPOLOGYCONFIGURATION_PATH"
},
{
"name": "SYG_RELAYER_MPCCONFIG_TOPOLOGYCONFIGURATION_URL",
"valueFrom": "arn:aws:ssm:{{ awsRegion }}:{{ awsAccountId }}:parameter/chainbridge/relayers/relayer/SYG_RELAYER_MPCCONFIG_TOPOLOGYCONFIGURATION_URL"
Expand All @@ -85,7 +89,7 @@
"options": {
"provider": "ecs",
"dd_service": "{{ env }}-relayers-{{ relayerId }}",
"dd_tags": "env:{{ env }},project:chainbridge,relayerid:{{ relayerId }}",
"dd_tags": "env:{{ env }},project:chainbridge,relayerid:{{ relayerId }},image:{{ set Sygma release version }}",
"dd_message_key": "log",
"Host": "http-intake.logs.datadoghq.com",
"TLS": "on",
Expand Down Expand Up @@ -224,7 +228,7 @@
{
"name": "efs",
"efsVolumeConfiguration": {
"fileSystemId": "fs-0d2124b8842c39434",
"fileSystemId": "{{ set your fileSystemId here }}",
"rootDirectory": "/",
"transitEncryption": "ENABLED"
}
Expand Down
24 changes: 14 additions & 10 deletions ecs/task_definition_STAGE_EXT.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"containerDefinitions": [
{
"name": "{{ relayerName }}-{{ relayerId }}-container-{{ appTag }}",
"image": "ghcr.io/sygmaprotocol/sygma-relayer:latest",
"image": "ghcr.io/sygmaprotocol/sygma-relayer:{{ imageTag }}",
"portMappings": [
{
"containerPort": 9000,
Expand Down Expand Up @@ -45,6 +45,18 @@
{
"name": "SYG_RELAYER_ENV",
"value": {{ env }}
},
{
"name": "SYG_RELAYER_MPCCONFIG_KEYSHAREPATH",
"value": "/mount/r{{ relayerId }}.keyshare"
},
{
"name": "SYG_RELAYER_MPCCONFIG_TOPOLOGYCONFIGURATION_PATH",
"value": "/mount/r{{ relayerId }}-top.json"
},
{
"name": "SYG_RELAYER_MPCCONFIG_FROSTKEYSHAREPATH",
"value": "/mount/r{{ relayerId }}-frost.keyshare"
}
],
"mountPoints": [
Expand All @@ -59,18 +71,10 @@
"name": "SYG_RELAYER_MPCCONFIG_KEY",
"valueFrom": "arn:aws:ssm:{{ awsRegion }}:{{ awsAccountId }}:parameter/chainbridge/relayers/relayer-{{ relayerId }}/SYG_RELAYER_MPCCONFIG_KEY"
},
{
"name": "SYG_RELAYER_MPCCONFIG_KEYSHAREPATH",
"valueFrom": "arn:aws:ssm:{{ awsRegion }}:{{ awsAccountId }}:parameter/chainbridge/relayers/relayer-{{ relayerId }}/SYG_RELAYER_MPCCONFIG_KEYSHAREPATH"
},
{
"name": "SYG_RELAYER_MPCCONFIG_TOPOLOGYCONFIGURATION_ENCRYPTIONKEY",
"valueFrom": "arn:aws:ssm:{{ awsRegion }}:{{ awsAccountId }}:parameter/chainbridge/relayers/relayer/SYG_RELAYER_MPCCONFIG_TOPOLOGYCONFIGURATION_ENCRYPTIONKEY"
},
{
"name": "SYG_RELAYER_MPCCONFIG_TOPOLOGYCONFIGURATION_PATH",
"valueFrom": "arn:aws:ssm:{{ awsRegion }}:{{ awsAccountId }}:parameter/chainbridge/relayers/relayer-{{ relayerId }}/SYG_RELAYER_MPCCONFIG_TOPOLOGYCONFIGURATION_PATH"
},
{
"name": "SYG_RELAYER_MPCCONFIG_TOPOLOGYCONFIGURATION_URL",
"valueFrom": "arn:aws:ssm:{{ awsRegion }}:{{ awsAccountId }}:parameter/chainbridge/relayers/relayer/SYG_RELAYER_MPCCONFIG_TOPOLOGYCONFIGURATION_URL"
Expand All @@ -85,7 +89,7 @@
"options": {
"provider": "ecs",
"dd_service": "DEVNET-relayers-{{ relayerId }}",
"dd_tags": "env:{{ env }},project:chainbridge,relayerid:{{ relayerId }}",
"dd_tags": "env:{{ env }},project:chainbridge,relayerid:{{ relayerId }},image:{{ imageTag }}",
"dd_message_key": "log",
"Host": "http-intake.logs.datadoghq.com",
"TLS": "on",
Expand Down

0 comments on commit 943608e

Please sign in to comment.