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

Add common extra specs #5

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

fabi200123
Copy link
Contributor

@fabi200123 fabi200123 commented Jun 10, 2024

This change adds the common options:

  • disable_updates
  • enable_boot_debug
  • extra_packages
  • runner_install_template
  • extra_context
  • pre_install_scripts

Copy link
Member

@gabriel-samfira gabriel-samfira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a couple of notes.

README.md Outdated
}
```

*NOTE*: The `extra_context` spec adds a map of key/value pairs that are expanded in the `runner_install_template`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that **may** be expected

The extra_context spec allows you to add arbitrary key/value pairs to your custom template, which enables you to write any custom template you may need.

README.md Outdated
The `runner_install_template` allows us to completely override the script that installs and starts the runner. In the example above, I have added a copy of the current template from `garm-provider-common`, with the adition of one line:

```bash
echo "I am the override script: {{ .ExtraContext.Person }} - {{ .ExtraContext.Who }}" | sudo tee /garm-override.txt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace this with something a bit more friently/meaningful for the example. Mine was terrible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated it to do a curl to github.com and paste the output into a file

README.md Outdated
```

*NOTE*: The `extra_context` spec adds a map of key/value pairs that are expanded in the `runner_install_template`.
The `runner_install_template` allows us to completely override the script that installs and starts the runner. In the example above, I have added a copy of the current template from `garm-provider-common`, with the adition of one line:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note that this is a golang template which enables all the goodies that come with it. Give some examples if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a note that reference golang templates and their example regarding those

@fabi200123 fabi200123 force-pushed the add-common-extra-specs branch 4 times, most recently from 5583e5b to 674e741 Compare June 10, 2024 13:28
@fabi200123 fabi200123 force-pushed the add-common-extra-specs branch from 674e741 to 038ba12 Compare June 10, 2024 15:46
@gabriel-samfira gabriel-samfira merged commit 6db5bf6 into cloudbase:main Jun 10, 2024
1 check passed
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