taskcluster / taskcluster-tools

Tools for debugging, inspecting and managing Taskcluster
https://tools.taskcluster.net/
Mozilla Public License 2.0
26 stars 91 forks source link

Use EC2-Manager API to fetch instance state and summaries #220

Open jhford opened 7 years ago

jhford commented 7 years ago

I've left the AWS Provisioner state method in place, but it's deprecated. It really needs to be deleted because it causes a decent amount of overhead and adds a lot of complexity to the provisioner.

The ec2-manager api is now the best sort of information about instance details.

We should use the GET /v1/worker-types/:workerType/stats method to determine instance counts and capacity, the GET /v1/worker-types/:workerType/state to get detailed information about the EC2 resources.

We should expose the DELETE /region/:region/instance/:instanceId and DELETE /region/:region/spot-instance-request/:requestId methods to delete specific instances in the EC2 resource table if the user has the correct ec2-manager:manage-instances:<region>:<instanceId> or ec2-manager:manage-spot-requests:<region>:<requestId> scope.

We should expose the DELETE /worker-types/:workerType/resources method to kill all instances of a workertype if the user has the correct ec2-manager:manage-resources:<workerType> scope.

We should create a basic EC2 Manager debugging tools page which exposes the endpoints with a simple click a button, display the response system:

gregarndt commented 7 years ago

Would this fix the invalid dates on the ec2 resources tab?

jhford commented 7 years ago

no, i have to make a change to the EC2-Manager for that. https://github.com/taskcluster/ec2-manager/issues/4

jhford commented 7 years ago

See: https://github.com/taskcluster/ec2-manager/pull/16