Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Commit 3bf06f7

Browse files
move swap declaration to ecs-additions-common.sh
1 parent 1584281 commit 3bf06f7

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/ecs-additions/ecs-additions-common.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,11 @@
33
# add fetch and run batch helper script
44
chmod a+x /opt/ecs-additions/fetch_and_run.sh
55
cp /opt/ecs-additions/fetch_and_run.sh /usr/local/bin
6+
7+
# add 4GB of swap space
8+
dd if=/dev/zero of=/swapfile bs=128M count=32
9+
chmod 600 /swapfile
10+
mkswap /swapfile
11+
swapon /swapfile
12+
swapon -s
13+
echo '/swapfile swap swap defaults 0 0' >> /etc/fstab

src/templates/gwfcore/gwfcore-launch-template.template.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,6 @@ Resources:
103103
- unzip
104104

105105
runcmd:
106-
# add 4GB of swap space
107-
- dd if=/dev/zero of=/swapfile bs=128M count=32
108-
- chmod 600 /swapfile
109-
- mkswap /swapfile
110-
- swapon /swapfile
111-
- swapon -s
112-
- echo '/swapfile swap swap defaults 0 0' >> /etc/fstab
113-
114106
# install aws-cli v2 and copy the static binary in an easy to find location for bind-mounts into containers
115107
- curl -s "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "/tmp/awscliv2.zip"
116108
- unzip -q /tmp/awscliv2.zip -d /tmp

0 commit comments

Comments
 (0)