Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions terraform/dev/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ locals {

dev_instance_definitions = {
ami = "ami-012ea6058806ff688"
instance_type = "t3a.small"
instance_type = "t2.micro"
role = "dev"
iam_instance_profile = data.terraform_remote_state.common.outputs.instance_profile_name["ec2-to-ecs"]
key_name = "eatda-ec2-dev-key"
Expand Down Expand Up @@ -75,13 +75,6 @@ locals {
"java",
"-Xlog:gc*:stdout:time,uptime,level,tags",
"-Xlog:gc*:file=/logs/gc.log:time,uptime,level,tags",
"-XX:+UseG1GC",
"-XX:InitialRAMPercentage=30",
"-XX:MaxRAMPercentage=70",
"-XX:ParallelGCThreads=2",
"-XX:ConcGCThreads=1",
"-XX:MaxDirectMemorySize=128m",
"-Xlog:ergo=trace",
"-javaagent:/dd-java-agent.jar",
"-Ddd.logs.injection=true",
"-Ddd.runtime-metrics.enabled=true",
Expand Down
6 changes: 6 additions & 0 deletions terraform/dev/scripts/user-data.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/bin/bash
echo ECS_CLUSTER=${ecs_cluster_name} >> /etc/ecs/ecs.config

fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstab

mkdir -p /home/ec2-user/logs/backup
mkdir -p /home/ec2-user/mysql
mkdir -p /home/ec2-user/scripts
Expand Down
6 changes: 3 additions & 3 deletions terraform/dev/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ ecs_services = {

ecs_task_definitions_base = {
api-dev = {
cpu = 1500
memory = 1024
cpu = 500
memory = 256
network_mode = "host"
requires_compatibilities = ["EC2"]

Expand All @@ -47,7 +47,7 @@ ecs_task_definitions_base = {
mysql-dev = {
cpu = 256
memoryReservation = 128
memory = 512
memory = 256
network_mode = "host"
requires_compatibilities = ["EC2"]
container_image = "mysql:8"
Expand Down