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

Overlay bundles - provide custom '.config' file which overrides the default '.config' file #120

Closed
ivandavidov opened this issue Nov 29, 2017 · 2 comments

Comments

@ivandavidov
Copy link
Owner

Such feature will allow the bundles to have separate configuration. Right now the main '.config' file is filled with one line entries which point to online resources. If there is custom '.config' file for each bundle this will make the main '.config' file significantly smaller.

This is how it should work:

  • Implement new function in 'common.sh' which takes as argument the configuration property that we look for.
  • The function should look for the file '.config' in the bundle's root directory and parse the property.
  • If the file doesn't exist or the property value there is empty or not founds, fall back to the main '.config' file and parse the property.

All bundles should be refactored to use this function. Also, all bundles which download something should provide their own '.config' file and all entries from the main '.config' file should be moved to the corresponding bundle configuration.

@ivandavidov
Copy link
Owner Author

The functionality has been implemented here. The overlay bundles cf_cli and bosh_cli have been enhanced to use this functionality as proof of concept. The corresponding download URLs have been removed from the main .config file and placed in the corresponding bundle specific .config file.

Although it seems to be working fine, this functionality needs some further testing. Also, it has unexpected side effect - the declared function cannot be exported and for now it is mandatory to source the common.sh file in each script which uses configuration properties.

@ivandavidov
Copy link
Owner Author

All existing bundles have been updated and now they use local configuration file. I'm closing the issue.

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

No branches or pull requests

1 participant