Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Extend __setup_userdata_script to make cloundinit run local script from local path #60

Open
rplevka opened this issue Jun 20, 2019 · 0 comments

Comments

@rplevka
Copy link
Member

rplevka commented Jun 20, 2019

https://github.com/SatelliteQE/5minute/blob/master/vminute/vminute.py#L1112

the __setup_userdata_script only accepts external URL paths to scripts to be executed by cloud init.
It would be good to also add an implicit option to include script from the instances local path (e.g. /usr/5minute.sh). This would be optional so it won't fail if such file doesn't exist.
The scripts might be parametrized by env variables:
example:

chmod +x /usr/5minute.sh
HOSTNAME="foo.bar" /usr/5minute.sh

The motivation is to be able to provide a static cinit script at the image creation time, so the URL with the script does not need to be available everytime when someone wishes to create a new instance from the image.

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

No branches or pull requests

1 participant