This is an overview of what Majordome can detect with existing rules:
- Detect an AMI not used by any EC2 instance
- Detect
aan EBS Volume not attached to any EC2 instance - Detect a Snapshot of
aan EBS Volume that doesn't or no more exists - Detect
aanUunused Elastic IP - Detect
aanUunused Security Group - Detect a LoadBalancer without EC2 instances attached behind it
Table of Contents
Table of Contents
Configuration
Make sure your authentication on AWS is readyset, either by exporting your AWS access key and secret:
export AWS_ACCESS_KEY_ID='...'
export AWS_SECRET_ACCESS_KEY='...'
[default]
aws_access_key_id = '...'
aws_secret_access_key = '...'
Finally, you have to copy app/config.php.dist
.env.example
to app/config.php
.env
and edit aws.region
AWS_REGION
and aws.accountId
AWS_ACCOUNT
. accountIdAWS_ACCOUNT
must not haveinclude -
ex:63383838383
, so get rid of them from your typical accountId format.
You can also specify which rule to enable or disable under the aws.rules
key in app/config.php
.
Note : To be efficient,Majordome should have extensible read access to different AWS resources like EC2 instances, security groups, Snapshots, Volumes and Elastic Load Balancers
This is the policy Majordome should have:
Prerequisites
- PHP >=
7.48.2 with curl and sqlite3 extensions - Sqlite3
- Composer
make install
make install
make install-db
Run
make run
make docker-run
Finally, launch the web interface that will be accessible at http://localhost:8080:
make docker-run-web
Tests
make install-dev
make test
Silex
To switch on the previous implementation based on Silex framework:
git checkout tags/silex
FAQ
I want to implement a new rule, is it possible ?
Yes ! The core of Majordome was designed for extensibility. There is a RuleInterface which each rule should implementsimplement, you can get a look to existing rules.
License
Licensed under the MIT license. See LICENSE for the full details.
Credits
- www.freefavicon.com for the favicon