Vagrant SOCI

Vagrant used to build and provision virtual environments for hassle-free SOCI development.



SOCI DB2 backend

The soci.vm will be configured properly to build the DB2 backend only if it is provisioned with complete DB2 CLI client (libraries and headers). You need to download "IBM Data Server Driver Package (DS Driver)" manually and make it visible to Vagrant:

  1. Go to IBM Data Server Client Packages.
  2. Download "IBM Data Server Driver Package (DS Driver)".
  3. Copy the package to ${SOCI_HOME}/tmp directory, on host machine.


Below, simple and easy development workflow with Vagrant is outlined:

vagrant up

or boot VMs selectively:

vagrant up {soci|db2}

First time you run it, be patient as Vagrant downloads VM box and provisions it installing all the necessary packages.

vagrant ssh {soci|db2}
cd /vagrant # aka $SOCI_HOME
git pull origin master
vagrant ssh soci
cd /vagrant    # aka $SOCI_HOME
cd soci-build  # aka $SOCI_BUILD

You can also execute the build.h script provided to run CMake and make

vagrant ssh soci
vagrant {suspend|halt|destroy} {soci|db2}

Check Vagrant command-line interface for complete list of commands.

Environment variables

All variables available to the vagrant user on the VMs are defined in and sourced from /vagrant/scripts/vagrant/common.env:

Note, those variables are also used by provision scripts to set up databases.