Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow providing "user-data" #17

Open
ctron opened this issue Jun 16, 2021 · 5 comments
Open

Allow providing "user-data" #17

ctron opened this issue Jun 16, 2021 · 5 comments

Comments

@ctron
Copy link

ctron commented Jun 16, 2021

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.

@TimDaub
Copy link
Owner

TimDaub commented Jun 16, 2021

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?

@ctron
Copy link
Author

ctron commented Jun 16, 2021

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)

@TimDaub
Copy link
Owner

TimDaub commented Jun 16, 2021

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

@ctron
Copy link
Author

ctron commented Jun 16, 2021

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

@TimDaub
Copy link
Owner

TimDaub commented Aug 10, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants