-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
Description
Goal: create an Ansible script to automate the AWS benchmarking that is currently being set up & done manually. Goal is greater Ansible familiarity + improved repeatability of tests.
Inputs:
- AWS keys
- region to use
- instance type (optional, default to c4.large)
- optional boolean to use private IPs instead of public
- benchmarking git branchname (default master)
- OPTIONAL CLI args for benchmark
Steps performed:
Playbook 1: provisioning
- If instances DON'T exist: Create two instances of $type in $region, with $selected_keypair, 5 GB of GP2 EBS volume (enough) for benchmark host, 2 GB for client, security group open on ports 22/8080/4443 (SSH/HTTP/HTTPS), name them pycl-benchmark, pycl-benchmark-client
- Store the private and public IPs
- Run updates
- Install git, docker on both
4). Clone repo to /tmp on both, and checkout $benchmark_branch - On pycl-benchmark-client, install python, python-pip, python-pycurl, and pip install client libraries from requirements.txt
Playbook 2: benchmark run
- See if instances exist, if not fail, if so then start them if not running in EC2
- On pycl-benchmark, start docker service and start container for benchmark (container needs to be pushed to Dockerhub to be pullable)
- On pycl-benchmark-client start the benchmark using (public or private IP) of pycl-benchmark as target. Option to supply CLI options to benchmark. Log the overall run to a logfile, and output results to a CSV
- When benchmark is done, retrieve the log to local folder, and same for the results.
- Stop instances (don't terminate though).
Note: running it WILL COST MONEY, call it around $2 for setup + first run, and $0.20-$0.40 per run. Approximately $1.60 with 8 GB EBS volumes (2 x 8 GB @ $0.10 per provisioned GB per month) + instance cost (say $0.20-$0.30). Perhaps we can under-provision storage to 2 GB-4GB per host to keep costs under $1? -- see how much of volumes are used currently.