Skip to content

Commit

Permalink
adding in option for custom ami
Browse files Browse the repository at this point in the history
  • Loading branch information
jerowe committed May 5, 2022
1 parent a454e10 commit 0ed31cf
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions modules/aws-batch-ec2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,11 @@ bash Miniconda3-latest-Linux-x86_64.sh -b -f -p ./miniconda
rm Miniconda3-latest-Linux-x86_64.sh
# https://docs.aws.amazon.com/batch/latest/userguide/efs-volumes.html
sudo systemctl enable --now amazon-ecs-volume-plugin
sudo systemctl enable --now amazon-ecs-volume-plugin || echo "Unable to start ecs-volume-plugin"
# Expand individual docker storage if container requires more than defaul 10GB
cloud-init-per once docker_options echo 'OPTIONS="$$${OPTIONS} --storage-opt dm.basesize=${var.docker_max_container_size}G"' >> /etc/sysconfig/docker
echo ECS_CLUSTER=default>>/etc/ecs/ecs.config
echo ECS_IMAGE_CLEANUP_INTERVAL=60m >> /etc/ecs/ecs.config
echo ECS_IMAGE_MINIMUM_CLEANUP_AGE=60m >> /etc/ecs/ecs.config
sudo systemctl restart docker || echo "unable to restart docker"
sudo start ecs || echo "unable to restart ecs"
## Extra user data
${var.additional_user_data}
TEMPLATE
Expand Down

0 comments on commit 0ed31cf

Please sign in to comment.