https://github.com/base2services/alfajor
boto helper cake
https://github.com/base2services/alfajor
Last synced: 11 months ago
JSON representation
boto helper cake
- Host: GitHub
- URL: https://github.com/base2services/alfajor
- Owner: base2Services
- License: mit
- Created: 2015-08-10T22:55:36.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-07-11T01:15:06.000Z (almost 9 years ago)
- Last Synced: 2023-03-22T19:32:53.976Z (about 3 years ago)
- Language: Python
- Size: 71.3 KB
- Stars: 2
- Watchers: 14
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# alfajor
boto helper cake
##Python Dependencies
boto
pyyaml
##Usage
git clone ...
cp alfajor/sample_aws_config.yml aws_config.yml
vim aws_config.yml
python alfajor/scripts/list_instances.py [account]
python alfajor/scipts/list_orphan_snapshots.py [account]
# Scripts
## Backup (scripts/backup.py)
Backups script will
### 1 - Cleanup previous AMIs
- Collect all instances tagged with given tag (defaults to `MakeSnapshot`)
- For each instance collect all AMI's created from that instance
- Calculate retention period based on instance tags
- For each of collected AMI's, compare retention period with creation date,
and deregister AMI and delete backing EBS snapshots if required
- Repeat the process for EBS snapshots
### 2 - Create new AMIs and EBS snapshots
#### AMI
- Collect all instances tagged with given tag (defaults to `MakeSnapshot`)
- Create new AMI with appropriate name
- Tag AMI with all tags from `snapshot/snapshot_tags` map and `created_by_alfajor=true`
- Tag EBS snapshot that are backing ami with `created_by_alfajor=true` and `image_id=$amiid` tags
#### EBS
- Collect all volumes tagged with given tag (defaults to `MakeSnapshot`)
- Create new EBS snapshot with appropriate name