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

feat: allow caller to provide custom userdata #3798

Merged
merged 2 commits into from
Mar 15, 2024
Merged

feat: allow caller to provide custom userdata #3798

merged 2 commits into from
Mar 15, 2024

Conversation

ebirger
Copy link
Contributor

@ebirger ebirger commented Mar 5, 2024

Using a prebacked AMI we wish to provide a userdata script which requires information from terraform resources - e.g. endpoints for that environment.

The existing userdata_template is not sufficient for this purpose as it requires a static file.

It would be useful to be able to render the userdata script before providing it to the runner configuration.

@npalm
Copy link
Member

npalm commented Mar 13, 2024

Can you provide a usage example?

@ebirger
Copy link
Contributor Author

ebirger commented Mar 13, 2024

Can you provide a usage example?

Sure - but where should I provide it? I'd rather not change an existing working example for this, and a whole new example seems too much...

@npalm
Copy link
Member

npalm commented Mar 13, 2024

The idea is to replace the full template by a static filled content for the user_data? Indeed I think it is better to keep the examples in tact.

Maybe adding a small section to the configuration with some basic direction how to use this. We have embedded the start script in the AMI. WHich is antother approach. It should be clear to the user that the userdata_content is responsible for registring the runner based on the parameters created by the lambda.

@ebirger
Copy link
Contributor Author

ebirger commented Mar 13, 2024

Maybe adding a small section to the configuration with some basic direction how to use this. We have embedded the start script in the AMI. WHich is antother approach. It should be clear to the user that the userdata_content is responsible for registring the runner based on the parameters created by the lambda.

The proposed wording includes:

By providing your own user_data you have to take care of installing all required software, including the action runner

taken from the original "template" version.

Is there any more information needed?

@npalm
Copy link
Member

npalm commented Mar 14, 2024

Maybe adding a small section to the configuration with some basic direction how to use this. We have embedded the start script in the AMI. WHich is antother approach. It should be clear to the user that the userdata_content is responsible for registring the runner based on the parameters created by the lambda.

The proposed wording includes:

By providing your own user_data you have to take care of installing all required software, including the action runner

taken from the original "template" version.

Is there any more information needed?

Could you make one small improvement to the current text.

By providing your own user_data you have to take care of installing all required software, including the action runner and registering the runner. Be-aware configuration paramaters in SSM as well tags are treated as internals. Changes will not trigger a breaking release.

ebirger and others added 2 commits March 14, 2024 10:47
The current ability to customize the userdata contents is based on providing
a template file path. This is insufficient in case the userdata script needs
to include information gathered from terraform resources.

Allow the caller to render their userdata script as needed and provide it
directly.
@ebirger
Copy link
Contributor Author

ebirger commented Mar 14, 2024

Thank you!
Updated per requested, and rebased on top of current main.

@npalm npalm merged commit ac49daf into philips-labs:main Mar 15, 2024
1 check passed
npalm pushed a commit that referenced this pull request Apr 17, 2024
🤖 I have created a release *beep* *boop*
---


##
[5.10.0](v5.9.0...v5.10.0)
(2024-04-17)


### Features

* add spot termination watcher (beta)
([#3789](#3789))
([b2dc794](b2dc794))
* allow caller to provide custom userdata
([#3798](#3798))
([ac49daf](ac49daf))
* Allow to disable runner max scaling check
([#3849](#3849))
([e05a043](e05a043))


### Bug Fixes

* **lambda:** bump axios from 1.6.7 to 1.6.8 in /lambdas
([#3814](#3814))
([513b22f](513b22f))
* **lambda:** bump the aws group in /lambdas with 5 updates
([#3834](#3834))
([e7e56ea](e7e56ea))
* **lambda:** bump the aws group in /lambdas with 5 updates
([#3846](#3846))
([9303a10](9303a10))
* **lambda:** bump the aws group in /lambdas with 6 updates
([#3818](#3818))
([9a9031e](9a9031e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: forest-releaser[bot] <80285352+forest-releaser[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants