-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathservices.sh
executable file
·35 lines (31 loc) · 1.1 KB
/
services.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
##!/bin/bash
#
# WebApp Service
#
SERVICE_NAME=WebAppService
TASK_DEFINITION=$WEBAPP_TASK_DEFINITION
CLOUDMAP_SERVICE_ARN=$CLOUDMAP_WEBAPP_SERVICE_ARN
aws ecs create-service --service-name $SERVICE_NAME \
--cluster $CLUSTER_NAME \
--task-definition $TASK_DEFINITION \
--desired-count 1 \
--enable-execute-command \
--service-registries "registryArn=$CLOUDMAP_SERVICE_ARN" \
--network-configuration "awsvpcConfiguration={subnets=$PRIVATE_SUBNET_IDS,securityGroups=[$SECURITY_GROUP_ID],assignPublicIp=DISABLED}" \
--scheduling-strategy REPLICA \
--launch-type EC2
#
# Create the ADOT Service
#
SERVICE_NAME=ADOTService
TASK_DEFINITION=$ADOT_TASK_DEFINITION
CLOUDMAP_SERVICE_ARN=$CLOUDMAP_ADOT_COLLECTOR_SERVICE_ARN
aws ecs create-service --service-name $SERVICE_NAME \
--cluster $CLUSTER_NAME \
--task-definition $TASK_DEFINITION \
--desired-count 1 \
--enable-execute-command \
--service-registries "registryArn=$CLOUDMAP_SERVICE_ARN" \
--network-configuration "awsvpcConfiguration={subnets=$PRIVATE_SUBNET_IDS,securityGroups=[$SECURITY_GROUP_ID],assignPublicIp=DISABLED}" \
--scheduling-strategy REPLICA \
--launch-type EC2