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

Commit 1584281

Browse files
add 4GB of swap space in EC2 instances
1 parent f2de6e2 commit 1584281

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ 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+
106114
# install aws-cli v2 and copy the static binary in an easy to find location for bind-mounts into containers
107115
- curl -s "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "/tmp/awscliv2.zip"
108116
- unzip -q /tmp/awscliv2.zip -d /tmp

0 commit comments

Comments
 (0)