Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some swapspace to the instance #50

Open
obscurerichard opened this issue Aug 5, 2019 · 0 comments
Open

Add some swapspace to the instance #50

obscurerichard opened this issue Aug 5, 2019 · 0 comments

Comments

@obscurerichard
Copy link
Member

obscurerichard commented Aug 5, 2019

Without any swap space, the smallest AWS instance that this will work on sucessfully is a t2.small. With some swap space enabled, it might work on a t2.micro or t2.nano or the equivalent t3 machine equivalents.

To see if this works, add a 1GB swap file to the base AMI using Ansible. Then use Terraform to tweak the instance type by putting it into the extra parameters, applying Terraform, and rotating the servers, for example:

instance_type = "t2.micro"

Alternatively this could be accomplished by tweaking the Cloud Init processes initiated through ansible/cloudinit.yml, or through terraform/cloud-config.yml.

It could be something as simple as a cloud-init line such as:

S=/swap && dd bs=1M if=/dev/zero of=$S count=1024 && mkswap $S && chmod 0600 $S && swapon $S
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant