ModusCreateOrg / ModusCreateOrg/devops-infra-demo

Add some swapspace to the instance

Open
#50 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
34
Forks
19
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ansible/cloudinit.yml and terraform/cloud-config.yml to determine where the base AMI setup is defined, then inspect the Terraform extra parameters and instance rotation flow. Add a 1GB swap file through the chosen provisioning path, apply Terraform with a smaller instance type, and verify that the resulting instance operates successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, aws, shell, terraform
Domain
cloud, devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.