cucumber
is a PoC about how reactive planning
works.
It provisions a very simple architecture on Amazon Web Service:
It reads a configuration files that looks like this one:
name: cluster-name
nodes_num: 3
dns_name: rock
It takes as arguments the environment variables required by the aws-cli to
authenticate against AWS, and the route53
hosted zone (AWS_HOSTED_ZONE
) and where to read the request file
(CUCUMBER_REQUEST=./request.yaml
).
Example:
AWS_PROFILE=my-account \
AWS_HOSTED_ZONE=3445234534 \
CUCUMBER_REQUEST=/tmp/request.yaml cucumber
By default cucumber runs in the one-shot mode. It ends after the first execution
of the plan. If you pass CUCUMBER_MODE=reconcile
it will start a
reconciliation loop.
You can try to remove an AWS resource such as:
- A target from the DNS record
- The DNS record
- One or more EC2
- You can scale up the number of nodes in the request file and restart cucumber (scale down not supported yet)
it will recreate what you removed during one of the reconciliation process.
This is a PoC to describe how reactive planning works and why it is cool. So there are some things that you need to provide and some limitations:
- It only works on
us-east-1
- You need to provide a public vpc in us-east-1 tagged with
app=cucumber
- The nodes will be located inside a random subnets from the selected vpc
gianarb/planner is the library that I wrote as foundation to write reactive planning. It contains the interface, one scheduler and more will come...