- Provision N number of EC2 on a date for M number of hours
- Show how many EC2 instances are running
- Show IP addresses of each EC2 instances
- Show auto-scaling history
- Remove specific instances
- Configuration file to mark certain instance or autoscaling group as read-only.
- Access control
- API calls
GET - List or show
PUT - Update or replace
POST - Create or add new
DELETE - Delete
Provision:
/simpleaws/provision/{n}/{date}/{time}/{hours}
/simpleaws/provision/{n}/{date}/{time}
/simpleaws/provision/{n}/{date}
/simpleaws/provision/{n}
Show scheduled provisions:
/simpleaws/provision
Show number of EC2 instances running:
/simpleaws/ec2/running
Show IP address of each ec2 instances:
/simpleaws/ec2/public-ip
/simpleaws/ec2/private-ip
/simpleaws/ec2/status
Show auto-scaling groups:
/simpleaws/auto-scaling
Show auto-scaling history:
/simpleaws/auto-scaling/{id}/
- Provisioning is done through setting up cron jobs.
- Cron jobs can be normal user cron job. No root permission is required.
- Schedule is written to database. Cron job is run every 15 minutes to check for schedule.
- Provisioning is run three hours before the user-specified date time.
- SQLite3 is used as storage
schedule:
rowid (implicit) - Generated by sqlite
create_at (int) - UNIX timestamp of record creation
schedule_at (int) - UNIX timestamp of user-specified schedule time
run_at (int) - UNIX timestamp of the schedule got kicked off by cron job
quantity (int) - Desired quantity / number of EC2
create table schedule (
create_at INTEGER,
schedule_at INTEGER,
run_at INTEGER,
quantity INTEGER);