No description
  • Python 95.7%
  • Dockerfile 4.3%
Find a file
Jill R 12672a59fb
Merge pull request #5 from jillr/asg_maxsize
Make ASG MaxSize be calculated based on cluster_size
2019-09-19 15:53:11 -07:00
cfn Also group clints by ECS cluster 2018-08-30 10:43:57 -04:00
inventory Set correct cisco user/pass and root user/pass on CLINTs 2018-08-30 11:10:55 -04:00
vars Make region a variable 2018-08-30 10:57:58 -04:00
.gitignore More README documentation 2018-08-30 10:43:57 -04:00
ansible.cfg Fix host cluster name grouping 2018-08-30 11:08:30 -04:00
deploy.yml Make ASG MaxSize be calculated based on cluster_size 2019-09-18 15:53:13 -07:00
destroy.yml Allow destroy.yml to work in a number of cases when the deployment playbook fails midway through 2019-09-13 12:13:09 -04:00
Dockerfile Do not auto-include ryansb SSH keys in container 2018-08-30 10:43:57 -04:00
LICENSE Relicense to Apache 2.0 2018-08-30 10:55:16 -04:00
README.md Add a lore note for the name of the container host 2018-10-19 09:57:30 -04:00
vars.template.yml update to allow custom instance types 2018-08-30 10:43:57 -04:00

QA Scale Lab

Docker images at quay.io

Creates an ECS cluster and an ASG of container hosts to SSH into for scale testing Ansible playbooks and discovering performance issues. The ./inventory/clints.py inventory plugin queries ECS and creates inventory hosts with all the CLINTs (Container Lightweight Inventory Numerous Targets) with the task UUID as the inventory hostname.

Usage

Copy vars.template.yml to vars/vars.yml and fill in AWS profile and (optionally) an EC2 SSH key. The default instance type is m5.4xlarge, but c5.4xlarge and t3.large are also supported.

To choose how many targets are created, set the desired_targets parameters for the container types you need. By default, 2000 centos SSH containers are created. The number of container hosts (m5.4xlarge) is calculated based on the number of targets, so there's no need to change the autoscaling group configuration manually.

deploy.yml

Creates a host cluster and (by default) 2000 containers. To turn off the cluster, run deploy.yml again with the numbers of desired_hosts set to zero. This will delete all the container hosts in the autoscaling group and scale the ECS services to zero containers.

destroy.yml

Deletes the instances, container registry, tasks, and VPC created in deploy.yml

Custom Inventory Plugin

To SSH to all the fake hosts, you will need to use the included inventory plugin that discovers running ECS tasks.

Here's a sample config for that inventory:

# in ./inventory/all.clints.yml
plugin: clints
regions:
  - us-east-2
boto_profile: YourProfileHere

To test that the plugin is working, you can run ansible-inventory --list and there should be a long list of hosts with UUID-looking names. Once that's the case, you can run any Ansible you like across the SSH hosts like this:

ansible clint_ssh -m ping

Licensing

This repo is made available under the Apache 2.0 license. The cfn/ directory also contains Apache 2.0 licensed code courtesy of aws-cf-templates.

Lore Note

The names for the Container Lightweight Inventory Numerous Targets (CLINTs) is a backronym to match Mission to Zyxx's Clone Light Infantry Nomadic Troopers.