Skip to content

twirlip/c4lbc-vagrant-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Installing Evergreen in a Vagrant VM

A rough guide from code4lib BC, 27 November 2014.

Prerequisites

Download VirtualBox from https://www.virtualbox.org.

Download Vagrant from http://www.vagrantup.com.

I recommend reading through the Getting Started guide for Vagrant, so that you know what you're doing when you follow the instructions below. :)

Setting up a Virtual Machine with Vagrant

Create a working directory for your installation.

mkdir vagrant
cd vagrant/

Set up a VM. We'll use Debian because it's easiest to install Evergreen on that flavor of Linux (you can find many other types of Vagrant boxes on http://vagrantcloud.com):

vagrant init chef/debian-7.7-i386

In order to download and run the Evergreen install script, we'll need to install git on the VM, and the script itself works best when run as a user with sudo NOPASSWD privileges. We can handle these steps with Vagrant's provisioning feature. Create a script named bootstrap.sh containing the following:

#!/bin/bash
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/eg-installer
apt-get update
apt-get install -y git-core

Next, add this line to the main configuration loop in your Vagrantfile:

config.vm.provision :shell, path: "bootstrap.sh"

Now we can actually create our VM:

vagrant up

At this point, the VM should be up and running!

Installing Evergreen

In your working directory, create a script called install-eg.sh containing the following:

#!/bin/bash

# grab a copy of the Evergreen automated install script for Debian
git clone git://git.evergreen-ils.org/working/random.git
cd random/
git checkout -b wheezy origin/collab/phasefx/wheezy_installer
cd installer/wheezy

# run the script to install Evergreen with sample data
time sudo ./eg_wheezy_installer.sh -y -a -s

Make this script executable:

chmod +x install-eg.sh

Through the magic of Vagrant synced folders, this script (and everything else in our working directory) will be accessible from within our VM. So let's login to the VM and install Evergreen!

vagrant ssh
cd /vagrant
./install-eg.sh

The install process will take a while. Once it's done, open up a web browser and go to http://localhost:8080, and you should see the default OPAC for your Evergreen install.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published