Skip to content

Commit bf3c570

Browse files
author
Priom Chowdhury
authored
feat: ECS task deployment config file added (#217)
* new ci/cd setup; repo cleanup & refactor * refactor * license added * merged main; changed depandabot check to weekly * added ecs task config file * fix: release action cleanup
1 parent f6d5dc9 commit bf3c570

File tree

2 files changed

+103
-32
lines changed

2 files changed

+103
-32
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,4 @@ jobs:
1515
id: release
1616
with:
1717
release-type: go
18-
- name: Checkout code
19-
uses: actions/checkout@v3
20-
if: ${{ steps.release.outputs.release_created }}
21-
- uses: kciter/aws-ecr-action@v4
22-
with:
23-
access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
24-
secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
25-
account_id: ${{ secrets.AWS_ACCOUNT_ID }}
26-
region: ${{ secrets.PROD_AWS_REGION }}
27-
repo: ${{ secrets.PROD_ECR_REPOSITORY }}
28-
tags: ${{ steps.release.outputs.tag_name }}
29-
create_repo: false
30-
if: ${{ steps.release.outputs.release_created }}
31-
- run: 'echo "$PROD_HELM_VALUES" > helm/values.yaml'
32-
shell: bash
33-
env:
34-
PROD_HELM_VALUES: ${{secrets.PROD_HELM_VALUES}}
35-
if: ${{ steps.release.outputs.release_created }}
36-
- name: AWS Credentials
37-
uses: aws-actions/configure-aws-credentials@v1
38-
with:
39-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
40-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
41-
aws-region: ${{ secrets.PROD_AWS_REGION }}
42-
if: ${{ steps.release.outputs.release_created }}
43-
- name: helm deploy
44-
uses: koslib/helm-eks-action@master
45-
env:
46-
KUBE_CONFIG_DATA: ${{ secrets.PROD_KUBE_CONFIG_DATA }}
47-
with:
48-
command: helm upgrade --install --create-namespace --namespace ${{ secrets.PROD_KUBE_NAMESPACE }} --set image.tag=${{ steps.release.outputs.tag_name }} -f helm/values.yaml crawler helm/crawler
49-
if: ${{ steps.release.outputs.release_created }}
18+
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
{
2+
"taskDefinitionArn": "arn:aws:ecs:us-east-2:381177214925:task-definition/nodewatch-prod-task:4",
3+
"containerDefinitions": [
4+
{
5+
"name": "nodewatch-prod-container",
6+
"image": "381177214925.dkr.ecr.us-east-2.amazonaws.com/nodewatch-prod-ecr:v1.3.1",
7+
"cpu": 256,
8+
"portMappings": [
9+
{
10+
"containerPort": 8080,
11+
"hostPort": 8080,
12+
"protocol": "tcp"
13+
}
14+
],
15+
"essential": true,
16+
"environment": [
17+
{
18+
"name": "env",
19+
"value": "prod"
20+
}
21+
],
22+
"mountPoints": [],
23+
"volumesFrom": [],
24+
"secrets": [
25+
{
26+
"name": "MONGODB_URI",
27+
"valueFrom": "arn:aws:secretsmanager:us-east-2:381177214925:secret:nodewatch-prod-8FCCGw:MONGODB_URI::"
28+
},
29+
{
30+
"name": "RESOLVER_API_KEY",
31+
"valueFrom": "arn:aws:secretsmanager:us-east-2:381177214925:secret:nodewatch-prod-8FCCGw:RESOLVER_API_KEY::"
32+
}
33+
],
34+
"logConfiguration": {
35+
"logDriver": "awslogs",
36+
"options": {
37+
"awslogs-group": "nodewatch-prod-logs",
38+
"awslogs-region": "us-east-2",
39+
"awslogs-stream-prefix": "ecs"
40+
}
41+
}
42+
}
43+
],
44+
"family": "nodewatch-prod-task",
45+
"executionRoleArn": "arn:aws:iam::381177214925:role/nodewatch-prod-role",
46+
"networkMode": "awsvpc",
47+
"revision": 4,
48+
"volumes": [],
49+
"status": "ACTIVE",
50+
"requiresAttributes": [
51+
{
52+
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
53+
},
54+
{
55+
"name": "ecs.capability.execution-role-awslogs"
56+
},
57+
{
58+
"name": "com.amazonaws.ecs.capability.ecr-auth"
59+
},
60+
{
61+
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
62+
},
63+
{
64+
"name": "ecs.capability.secrets.asm.environment-variables"
65+
},
66+
{
67+
"name": "ecs.capability.execution-role-ecr-pull"
68+
},
69+
{
70+
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
71+
},
72+
{
73+
"name": "ecs.capability.task-eni"
74+
}
75+
],
76+
"placementConstraints": [],
77+
"compatibilities": [
78+
"EC2",
79+
"FARGATE"
80+
],
81+
"requiresCompatibilities": [
82+
"FARGATE"
83+
],
84+
"cpu": "256",
85+
"memory": "512",
86+
"registeredAt": "2022-04-27T15:23:12.288Z",
87+
"registeredBy": "arn:aws:sts::381177214925:assumed-role/AWSReservedSSO_AWSAdministratorAccess_8acb862b989cc854/[email protected]",
88+
"tags": [
89+
{
90+
"key": "Terraform",
91+
"value": "true"
92+
},
93+
{
94+
"key": "Env",
95+
"value": "PROD"
96+
},
97+
{
98+
"key": "Project",
99+
"value": "Nodewatch"
100+
}
101+
]
102+
}

0 commit comments

Comments
 (0)