StackStorm Automation pack for auto scaling Docker Swarm Cluster based on container load. https://youtu.be/2tQlfxRrtXo
Clone or download
Latest commit f6879e9 Jun 1, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
actions Moving pack code in Jun 1, 2017
rules Moving pack code in Jun 1, 2017
sensors Moving pack code in Jun 1, 2017
tests Moving pack code in Jun 1, 2017
README.md Moving pack code in Jun 1, 2017
config.schema.yaml Moving pack code in Jun 1, 2017
icon.png Moving pack code in Jun 1, 2017
pack.yaml Moving pack code in Jun 1, 2017
requirements.txt Moving pack code in Jun 1, 2017

README.md

Auto-Scaling Docker Swarm Cluster On Container Load

This samlpe automation pack contains sensors actions and rules for auto-scaling Docker Swarm cluster based on container load.

Install and Configure

# Install this pack
st2 pack install https://github.com/dzimine/swarm_scaling

# You will also need AWS pack, too
st2 pack install aws

Give StackStorm system users - stanley and st2 - access to the Docker group usermod -a -G docker st2.

Create a count key in the data store:

st2 key set asg.workers 2

TODO: update a rule once this st2 bug fixed, to increment/decrement workers count.

Unit tests

To run the pack's unit tests:

# Activate existing pack's virtual environmet
source /opt/stackstorm/virtualenvs/swarm/bin/activate
# Run the tests first time - it will install test dependencies
st2-run-pack-tests -x /opt/stackstorm/swarm
# Skip installing dependencies on subsequent runs
st2-run-pack-tests -x -j /opt/stackstorm/swarm