I SOLVED IT, NO NEED TO READ FURTHER 😄
I'm a chump and didn't read the docs: None
Oh, I think I got overexcited and didn't look at this closely. So this ACCESS/SECRET key pair is on the agent-services
container.
I can see that agent-services
is simply a container running clearml-agent daemon --queue services --docker
and hey! that's what I was going to have to add to achieve getting a services worker!
I do have a question: Is there a way I can get the CLEARML_API_ACCESS_KEY and CLEARML_API_SECRET_KEY programmatically to give to this service? Or do I need to create these in the UI? If I create them in the UI and then destroy/re-create the EC2 instance the docker-compose.yml
is running on, would that invalidate those keys?
One idea: is it possible to store usable credentials in advance and place them in a volume that the ClearML containers can access and then use?
@<1541954607595393024:profile|BattyCrocodile47> you mean like environment variables?
That could work! Is that an option? Something that lets me spin up the ClearML and get a services worker to connect to it without manual steps.
Oh my word, is this it? None
Can you set these to any strings and have them function as API keys?
The question I'm exploring remains: is it possible to acquire that initial set of ClearML API keys programmatically so that the manual steps of 1-4 above can be avoided for an initial deployment?
This is already part of the docker-compose file,
https://github.com/allegroai/clearml-server/blob/master/docker/docker-compose.yml
^^^ For my own notes: this is the web request made by the frontend to create a set of credentials
I did a quick local experiment and observed that credentials created from the UI indeed become invalid if you delete the ClearML volumes.
- starting docker-compose locally
- creating a set of credentials from the UI
- hardcodign those credentials into the docker-compose file
- restarting
- the
agent-services
container started up and successfully became a registered worker - I killed the docker-compose and deleted the volume folders
- restarted the docker-compose (with the same hard-coded credentials)
The resulting logs from theagent-services
container were this:
Using environment access key CLEARML_API_ACCESS_KEY=NL0V1RKGB0TN57L3OZRK
Using environment secret key CLEARML_API_SECRET_KEY=********
clearml_agent: ERROR: Failed getting token (error 401 from
): Unauthorized (invalid credentials) (failed to locate provided credentials)