The Liquibase SDK uses Vagrant to manage database servers.
Vagrant configurations can be auto-generated via the
liquibase-sdk vagrant BOX_NAME init command and started with
liquibase-sdk vagrant BOX_NAME up.
For convenience, the
liquibase-sdk application will execute standard vagrant commands such as up, destroy, halt, and provision.
Within the Liquibase SDK directory structure, vagrant boxes are stored as subdirectories under LIQUIBASE_HOME/sdk/vagrant. There is a special “LIQUIBASE_HOME/sdk/install-files” directory which is used for storing files that cannot be freely downloaded from the Internet. The output from the init command should list anything that needs to be stored in the install-files directory for your configuration.
Liquibase SDK is available in Liquibase 3.2.0+
__Each database configuration may vary from these standards. Check the output of
liquibase-sdk vagrant BOX_NAME init to confirm configuration.
The vagrant configurations generated by liquibase-sdk vagrant BOX_NAME init do not include a base box URL.
This means you need to run
vagrant box add BASE_BOX_NAME URL for each base box name Liquibase will create boxes for.
Liquibase uses the following box definitions:
vagrant box add liquibase.linux.centos.x64 http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130731.box
vagrant BOX_NAME init command will create a new vagrant box for the given configurations. This is a Liquibase SDK specific command and does not simply call the standard
vagrant init command.
Multiple configurations can be listed as
a comma separated list. Parameters to each configuration are defined in [square brackets]. Re-running
vagrant BOX_NAME init will overwrite any changes you may have made to files in the LIQUIBASE_SDK/vagrant/BOX_NAME directory.
vagrant mysql init --databases=mysql
vagrant oss-db init --databases=mysql,postgres
vagrant mysql-win init --databases=mysql[config:windows]
Start a vagrant box previously created with the
vagrant BOX_NAME init command
vagrant mysql-windows up
vagrant oss-db up
Stops the running vagrant box and destroys all resources that were created during the machine creation process. Does not delete the box configuration.
Shuts down the running vagrant box.
Suspends the given vagrant box, rather than fully shutting it down or destroying it.
Resumes the given vagrant box. Normally resumes from the
Returns the state of the machines Vagrant is managing
Equivalent of halt followed by an up. This is normally not a command you need to run unless you are manually changing your generated configuration files.
Re-runs the defined vagrant provisioners. This is normally not a command you need to run unless you are manually changing your generated configuration files.
To run windows-based databases, you need a base windows box. The easiest way is to download the Windows 2008R2 180 day trial image from http://www.microsoft.com/en-us/download/confirmation.aspx?id=16572. Since it is a trial that times out, you will need to re-do this process every 180 days. If you have a valid MSDN license you can use the same process to create a image that does not time out.
Once downloaded, create a new VirtualBox machine to be your vagrant base box. In the initial wizard, do not create or a virtual hard drive because attaching the .vhd you downloaded will attach it as a SATA drive which does not boot. Once it is created, go to the Storage settings and add the downloaded .vhd in the IDE controller. The trial server Administrator password is Pass@word1
Before “vagrant package”:
vagrant package --base YOUR_VIRTUALBOX_MACHINE_NAME
vagrant box add liquibase.windows.2008r2.x64 package.box
Provisioning in Vagrant is handed primarily by puppet. The Vagrantfile contains only a shell provisioner, but it does a small amount of setup to bootstrap puppet then runs puppet. The starting puppet file is manifests/init.pp within each vagrant box.