I am trying to run the drone auto scaler container.I keep getting the following error
{“level”:“fatal”,“error”:“missing provider configuration”,“time”:“2019-05-22T21:30:56Z”,“message”:“Invalid or missing hosting provider”}
Thanks Brad. I downloaded the the code from github and did a grep for the error and thought of the same thing. I thought maybe the container could assume the role by itself, since it is running in the ec2 instance which has the appropriate IAM role.
Quick question: What are the minimum IAM requirements needed by the autoscaler. I have given it full access to EC2 and Autoscaling. Anything else needed?
Another quick question: Will the drone agents use the same iam role or will it use the role of the drone server?
I thought maybe the container could assume the role by itself, since it is running in the ec2 instance which has the appropriate IAM role.
It may require setting AWS_IAM=true
What are the minimum IAM requirements needed by the autoscaler.
Sorry, I do not use AWS and am therefore not very knowledgable when it comes to things like IAM roles. However, I am guessing Drone Autoscaler would require similar IAM roles as docker-machine. So perhaps this will helpful Minimal IAM policy · Issue #1655 · docker/machine · GitHub
Will the drone agents use the same iam role or will it use the role of the drone server?
No, I believe you have to set the IAM role via DRONE_AMAZON_IAM_PROFILE_ARN
So I have the autoscaler configured and it is creating agents(New ec2 instances). The autoscaler is able to connect to the agent and start the containers. Yet no builds are running. Any idea where I can troubleshoot. I logged into the agent and checked the container logs and there are no logs at all
Below is my complete docker-compose file including server and autoscaler
How do I get logs for the agent especially since I’m not provisioning the agents, the autoscaler is. DRONE_LOGS_TRACE=true has been set for the drone server container and the autoscaler container. How can I debug the agent?
@hash167 great, could you provide some details about which IAM permissions were required? And any other details that might be useful to others looking to setup the autoscaler on AWS? Thanks!
Ended up with this set of IAM Policies to authorize drone to launch it’s agents:
WARNING! This policy could be stricter - you can, for example, use tags to only allow termination of drone-agents. Right now, drone server would be able to terminate any instance in your region.
Also, I’m using a different Instance Profile for my drone agents, and you have to explicitly allow drone’s role to pass a role to the agents - search for “iam:PassRole” in this example, and change to your agents role