Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Handle configuration validation and plugin installation in a Vagrant plugin #80

Merged
merged 7 commits into from
Jun 27, 2016

Conversation

vdloo
Copy link
Member

@vdloo vdloo commented Jun 18, 2016

bundle vagrant-hypconfigmgmt plugin

The basic hypernode-vagrant box can now be configured and booted by cloning the repo and running "vagrant up" three times and following the dialogue. Vagrant needs to be started three consecutive times because it loads all configurations during initialization, not during runtime. When we change the configuration in the Vagrant process we need to restart Vagrant for the changes to take effect.

  1. First vagrant up: Install the vagrant-hypconfigmgmt plugin
  2. Second vagrant up: Configure the local.yml and install other required plugins
  3. Third vagrant up: Boot the box

When the box is properly configured and all the required plugins is installed one vagrant up is sufficient so this will have no impact if you (correctly) manually manage your local.yml file. Prompting for options can be disabled by removing config.hypconfigmgmt.enabled = true in the Vagrantfile (but the config validation will also be gone so beware).

Fresh install:
bootvagrant
What the configuration file will look like after completing the dialogue:
localyml

Running "vagrant up" again after only changing the Magento version from 2 to 1 in the local.yml configuration file.
bootvagrant2
The resulting local.yml (note the disabled mounted directory)
localyml2

tldr: simplified installation to calling "vagrant up" three times. settings are prompted during "vagrant up". magento1 and magento2 mount paths are swapped out when the version is changed in the config. Platform for moving complexity out of the Vagrantfile and into the bundled plugin.

@vdloo vdloo force-pushed the move-config-mgmtlogic-into-vagrant-hypconfigmgmt-plugin branch from d2d807f to fbae68a Compare June 20, 2016 09:36
@vdloo
Copy link
Member Author

vdloo commented Jun 20, 2016

blocked because of an issue with vagrant 1.8.4 see hashicorp/vagrant#7493

edit: uploaded the gem to https://rubygems.org/gems/vagrant-hypconfigmgmt, plugin can now be installed with "vagrant plugin install vagrant-hypconfigmgmt"

@vdloo vdloo force-pushed the move-config-mgmtlogic-into-vagrant-hypconfigmgmt-plugin branch 2 times, most recently from 3a95c28 to 4263944 Compare June 20, 2016 10:34
@vdloo
Copy link
Member Author

vdloo commented Jun 21, 2016

@hongaar @timneutkens what do you think?

@hongaar
Copy link
Contributor

hongaar commented Jun 21, 2016

Sweet. 👍 for a cleaner Vagrantfile and offloading configuration to a separate plugin.

@timneutkens
Copy link
Contributor

Cool stuff, seems like a good solution! 👍

vdloo added 2 commits June 25, 2016 14:07
The basic hypernode-vagrant box can now be configured and booted by cloning the repo and running "vagrant up" three times and following the dialogue.
Vagrant needs to be started three consecutive times because it loads all configurations during initialization, not during runtime.
When we change the configuration in the Vagrant process we need to restart Vagrant for the changes to take effect.

1. Install the vagrant-hypconfigmgmt plugin
2. Configure the local.yml and install other required plugins
3. Boot the box

When the box is properly configured and all the required plugins is installed one vagrant up is sufficient.
@vdloo vdloo force-pushed the move-config-mgmtlogic-into-vagrant-hypconfigmgmt-plugin branch from 4263944 to c58c35c Compare June 26, 2016 19:20
@vdloo vdloo force-pushed the move-config-mgmtlogic-into-vagrant-hypconfigmgmt-plugin branch from df26ca8 to db38390 Compare June 26, 2016 19:42
…to move-config-mgmtlogic-into-vagrant-hypconfigmgmt-plugin

Conflicts:
	Vagrantfile
@coveralls
Copy link

coveralls commented Jun 26, 2016

Coverage Status

Changes Unknown when pulling c368ce0 on move-config-mgmtlogic-into-vagrant-hypconfigmgmt-plugin into * on master*.

@vdloo vdloo force-pushed the move-config-mgmtlogic-into-vagrant-hypconfigmgmt-plugin branch from 0d54d9c to a553f6f Compare June 26, 2016 20:08
@vdloo vdloo merged commit e3e1f0a into master Jun 27, 2016
@vdloo vdloo deleted the move-config-mgmtlogic-into-vagrant-hypconfigmgmt-plugin branch August 9, 2016 13:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

4 participants