Skip to content

SessionStack/sessionstack-aws-asg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This is a terraform module + image used to deploy a single instance docker compose sessionstack instance in AWS EC2. It creates an autoscalling group with a single membere that has an EBS volume attached to it. In case of error due to EC2 the instance gets terminated and the autoscaller ensures it creates another instance with the same image having the same EBS volume attach to it. This results in self healing sessionstack single node configuration.

Usage

  1. Copy ./example/images/sessionstack-aws-asg/files to ./image/sessionstack-aws-asg/files and modify them for your use case.

  2. Build the AMI with everything needed to run a sessionstack services image.

packer build -var 'region=[REGION]' -var 'subnet_id=[SUBNET_ID]' ./images/sessionstack-aws-asg/image.pkr.hcl

  1. Copy ./examples/main.tf to ./main.tf and modify it to your use case.

  2. Modify your ./main.tf to include the proper AMI id generated from Packer

  3. Initialize the terraform play

terraform init

  1. Apply the terraform play

terraform apply

  1. Terminate forcefully your instance to validate the autoscalling group is working

aws autoscaling terminate-instance-in-auto-scaling-group --instance-id [INSTANCE_ID] --no-should-decrement-desired-capacity

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published