Open ctron opened 3 years ago
Interesting. Can you maybe refer me to a section of the Hetzner REST API where it's specified how user data can be created and added to a machine?
On the API no, but hcloud
has it:
Create a server
Usage:
hcloud server create FLAGS
Flags:
…
--user-data-from-file stringArray Read user data from specified file (use - to read from stdin)
Good to know. How I'm automating installing things at the moment is by logging into ssh from my personal GitHub Action. But being able to pass a user data string to sdtin would make things less complex I imagine
Maybe it helps you understand what I am trying to do: https://github.com/drogue-iot/drogue-cloud-testing/blob/main/.github/workflows/system-test.yaml
I'd be happy to have this functionality added. I think manually logging in with SSH is not always the desired use case. Feel free to send a PR.
Again, trying to follow the https://github.com/machulav/ec2-github-runner#example for Hetzner, I would need to run a few commands after the server was created.
This can be achieved by providing "user-data" to the Hetzner server instance. However, this action doesn't seem to allow providing any user data.
It would be great if this action could let the user provide an arbitrary string, so that a server can be set up during the provisioning process. Rather than SSH-ing into it later.