boagent
boagent copied to clipboard
AWS AGENT SELF CALLING
NOM
AWS AGENT SELF CALLING
STORY
As an AWS EC2 instance owner, I want to launch a script to get the impacts of my instance (manufacture and usage)
GUIDELINES
- Creation of an executable script on an aws instance calling the API from its configuration and usage data.
- Launch the usage analysis during a given time in parameter
- Retrieves the instance type
- Retrieve the time per workload
HELP
- API DOC CLOUD : http://hackaton.boavizta.org/Reference/cloud_route/
- SWAGGER : http://hackaton.boavizta.org:5000/docs#/cloud/instance_cloud_impact_v1_cloud_aws_post
- https://medium.com/teads-engineering/estimating-aws-ec2-instances-power-consumption-c9745e347959
RESSOURCES
- POST api.boavizta.org:5000/v1/cloud/aws
{
"usage":{
"usage_location": "BEL",
"workload":{
"10":{
"time": 0.1
},
"50":{
"time": 0.2
},
"100":{
"time": 0.1
},
"idle":{
"time": 0.5
}
}
}
}
USER STORY 2
Compléter les données d'AWS concernant les "right sizing recommendations" en y ajoutant les économies de CO2eq obtenues en ajustant la taille de la VM.
First step is to get instance type.
-> If the script is run inside the instance, we can get instance metadata with this package https://pypi.org/project/ec2-metadata/ -> If the query/inventory is done from outside the instance, we can get the instance type using boto3 sdk (passing instance-id)