Vettabase / mariadb-columnstore-vagrant

GNU General Public License v3.0
1 stars 0 forks source link

Implement configuration #8

Closed federico-razzoli closed 8 months ago

federico-razzoli commented 8 months ago

User level changes

The file config.sh.template contains default values. A copy (ignored by git) should be created, that is called config.sh.

To run the config file, invoke vagrant.sh instead of vagrant. Pass the same arguments you'd pass to vagrant, for example:

./vagrant.sh destroy --force

There's also a shortcut. If you call vagrant.sh UP (uppercase, no arguments) you'll run:

./vagrant.sh destroy --force ./vagrant.sh up

Under the hood

The configuration file will export some environment variables, making them accessible for the Vagrantfile as ENV[var_name]. Some of them will be used by the Vagrantfile itself. Others will be passed to install.sh as $var_name.

The Vagrantfile should always set a default (ENV[var] || val) rather than assuming that the variable is set.

Examples

I made two examples:

After you test & approve this change, you could refactor S3 options so that they are defined in the new way.