Skip to content

Commit 7e79d65

Browse files
committed
fix: prod 환경 task 정의 어플리케이션, 모니터링 분리
1 parent e5d9488 commit 7e79d65

File tree

2 files changed

+98
-78
lines changed

2 files changed

+98
-78
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"family": "bitnagil-monitoring-prod",
3+
"networkMode": "bridge",
4+
"containerDefinitions": [
5+
{
6+
"name": "prometheus",
7+
"image": "prometheus-image-placeholder",
8+
"essential": true,
9+
"portMappings": [
10+
{
11+
"containerPort": 9090,
12+
"hostPort": 0,
13+
"protocol": "tcp"
14+
}
15+
],
16+
"mountPoints": [
17+
{
18+
"sourceVolume": "prometheus-storage",
19+
"containerPath": "/prometheus"
20+
}
21+
],
22+
"logConfiguration": {
23+
"logDriver": "awslogs",
24+
"options": {
25+
"awslogs-group": "/ecs/prometheus-dev",
26+
"awslogs-region": "ap-northeast-2",
27+
"awslogs-stream-prefix": "ecs"
28+
}
29+
}
30+
},
31+
{
32+
"name": "grafana",
33+
"image": "grafana/grafana:10.4.1",
34+
"links": [
35+
"prometheus"
36+
],
37+
"portMappings": [
38+
{
39+
"containerPort": 3000,
40+
"hostPort": 0,
41+
"protocol": "tcp"
42+
}
43+
],
44+
"environment": [
45+
{
46+
"name": "GF_SERVER_ROOT_URL",
47+
"value": "https://www.bitnagil.com/grafana"
48+
},
49+
{
50+
"name": "GF_SERVER_SERVE_FROM_SUB_PATH",
51+
"value": "true"
52+
}
53+
],
54+
"mountPoints": [
55+
{
56+
"sourceVolume": "grafana-storage",
57+
"containerPath": "/var/lib/grafana"
58+
}
59+
],
60+
"essential": true,
61+
"logConfiguration": {
62+
"logDriver": "awslogs",
63+
"options": {
64+
"awslogs-group": "/ecs/grafana-dev",
65+
"awslogs-region": "ap-northeast-2",
66+
"awslogs-stream-prefix": "ecs"
67+
}
68+
}
69+
}
70+
],
71+
"volumes": [
72+
{
73+
"name": "prometheus-storage",
74+
"host": {
75+
"sourcePath": "/ecs/prometheus-data"
76+
}
77+
},
78+
{
79+
"name": "grafana-storage",
80+
"host": {
81+
"sourcePath": "/ecs/grafana-data"
82+
}
83+
}
84+
],
85+
"taskRoleArn": "arn:aws:iam::750819668269:role/ecsTaskExecutionRole",
86+
"executionRoleArn": "arn:aws:iam::750819668269:role/ecsTaskExecutionRole",
87+
"requiresCompatibilities": [
88+
"EC2"
89+
],
90+
"cpu": "200",
91+
"memory": "300",
92+
"runtimePlatform": {
93+
"cpuArchitecture": "X86_64",
94+
"operatingSystemFamily": "LINUX"
95+
}
96+
}

task-definition-prod.json

Lines changed: 2 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"containerDefinitions": [
55
{
66
"name": "bitnagil",
7-
"cpu": 700,
87
"portMappings": [
98
{
109
"containerPort": 8080,
@@ -41,90 +40,15 @@
4140
"secretOptions": []
4241
},
4342
"systemControls": []
44-
},
45-
{
46-
"name": "prometheus",
47-
"image": "prometheus-image-placeholder",
48-
"cpu": 200,
49-
"essential": false,
50-
"portMappings": [ {
51-
"containerPort": 9090,
52-
"hostPort": 0,
53-
"protocol": "tcp" } ],
54-
"mountPoints": [
55-
{
56-
"sourceVolume": "prometheus-storage",
57-
"containerPath": "/prometheus"
58-
}
59-
],
60-
"logConfiguration": {
61-
"logDriver": "awslogs",
62-
"options": {
63-
"awslogs-group": "/ecs/prometheus-dev",
64-
"awslogs-region": "ap-northeast-2",
65-
"awslogs-stream-prefix": "ecs"
66-
}
67-
}
68-
},
69-
{
70-
"name": "grafana",
71-
"image": "grafana/grafana:10.4.1",
72-
"cpu": 100,
73-
"portMappings": [
74-
{
75-
"containerPort": 3000,
76-
"hostPort": 0,
77-
"protocol": "tcp"
78-
}
79-
],
80-
"environment": [
81-
{
82-
"name": "GF_SERVER_ROOT_URL",
83-
"value": "https://www.bitnagil.com/grafana"
84-
},
85-
{
86-
"name": "GF_SERVER_SERVE_FROM_SUB_PATH",
87-
"value": "true"
88-
}
89-
],
90-
"mountPoints": [
91-
{
92-
"sourceVolume": "grafana-storage",
93-
"containerPath": "/var/lib/grafana"
94-
}
95-
],
96-
"essential": false,
97-
"logConfiguration": {
98-
"logDriver": "awslogs",
99-
"options": {
100-
"awslogs-group": "/ecs/grafana-dev",
101-
"awslogs-region": "ap-northeast-2",
102-
"awslogs-stream-prefix": "ecs"
103-
}
104-
}
105-
}
106-
],
107-
"volumes": [
108-
{
109-
"name": "prometheus-storage",
110-
"host": {
111-
"sourcePath": "/ecs/prometheus-data"
112-
}
113-
},
114-
{
115-
"name": "grafana-storage",
116-
"host": {
117-
"sourcePath": "/ecs/grafana-data"
118-
}
11943
}
12044
],
12145
"taskRoleArn": "arn:aws:iam::750819668269:role/ecsTaskExecutionRole",
12246
"executionRoleArn": "arn:aws:iam::750819668269:role/ecsTaskExecutionRole",
12347
"requiresCompatibilities": [
12448
"EC2"
12549
],
126-
"cpu": "1024",
127-
"memory": "962",
50+
"cpu": "824",
51+
"memory": "662",
12852
"runtimePlatform": {
12953
"cpuArchitecture": "X86_64",
13054
"operatingSystemFamily": "LINUX"

0 commit comments

Comments
 (0)