A scheduling script for aws ec2 instances
Project description
# Uniplaces AWS Scheduler
The AWS Scheduler is a script that given a set of profiles schedule the uptime of ec2 instances.
## Getting Started
Install through pip.
pip install aws-ec2-scheduler
The initial configuration is done in the `aws.conf` file. Copy the `aws.conf.dist`
to `aws.conf` and configure with the right credentials.
By default `aws.conf` reads schedule profiles from `scheduler.json` but you can change
the directory from where you want to load the profiles.
To run the scheduler just run
ec2scheduler -c path/to/config_file
#### Profiles
The scheduler expects you to create profiles to start and stop the machines.
You can just copy the `scheduler.json.dist` and start creating your new profiles from there.
```
{
"profiles": [ // an array of profiles
{
"name": "staging", // profile name
"region": "us-west-1", // aws region
"schedule": { // weekday schedule
"monday": {
"start": 9, // start hour
"stop": 19 // stop hour
},
"tuesday": {
"start": 9,
"stop": 19
},
"wednesday": {
"start": 9,
"stop": 19
},
"thursday": {
"start": 9,
"stop": 19
},
"friday": {
"start": 9,
"stop": 19
},
"saturday": {
"start": 9,
"stop": 19
},
"sunday": {
"start": 9,
"stop": 19
}
},
"instance_tags": [ // tags from the instances you want to attach this profile schedule
"jobs-staging", // this tag should be the name of the instance tag:Name
"admin-staging",
"reports-staging"
],
"elb_names": [ // add this configuration if you want to reregister this elb instances
"example-tag-elb-name"
]
}
]
}
```
The AWS Scheduler is a script that given a set of profiles schedule the uptime of ec2 instances.
## Getting Started
Install through pip.
pip install aws-ec2-scheduler
The initial configuration is done in the `aws.conf` file. Copy the `aws.conf.dist`
to `aws.conf` and configure with the right credentials.
By default `aws.conf` reads schedule profiles from `scheduler.json` but you can change
the directory from where you want to load the profiles.
To run the scheduler just run
ec2scheduler -c path/to/config_file
#### Profiles
The scheduler expects you to create profiles to start and stop the machines.
You can just copy the `scheduler.json.dist` and start creating your new profiles from there.
```
{
"profiles": [ // an array of profiles
{
"name": "staging", // profile name
"region": "us-west-1", // aws region
"schedule": { // weekday schedule
"monday": {
"start": 9, // start hour
"stop": 19 // stop hour
},
"tuesday": {
"start": 9,
"stop": 19
},
"wednesday": {
"start": 9,
"stop": 19
},
"thursday": {
"start": 9,
"stop": 19
},
"friday": {
"start": 9,
"stop": 19
},
"saturday": {
"start": 9,
"stop": 19
},
"sunday": {
"start": 9,
"stop": 19
}
},
"instance_tags": [ // tags from the instances you want to attach this profile schedule
"jobs-staging", // this tag should be the name of the instance tag:Name
"admin-staging",
"reports-staging"
],
"elb_names": [ // add this configuration if you want to reregister this elb instances
"example-tag-elb-name"
]
}
]
}
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aws-ec2-scheduler-1.0.tar.gz
(3.8 kB
view details)
File details
Details for the file aws-ec2-scheduler-1.0.tar.gz
.
File metadata
- Download URL: aws-ec2-scheduler-1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06d667a6d9d6b709af2aa0acc8596589960b2ece3c777c9f6d894c81734e5d11 |
|
MD5 | 914b527866acddc9eba29332f72275fc |
|
BLAKE2b-256 | ea0e261843c0bd8bfaf370a417f51a06ae490a2fd6ec1912cf4f69ff4fc6c00a |