LR Vagrant Readme
Copyright 2015 Jim Klo <email@example.com>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Vagrant Box Detailas
There are the basic Vagrant VMs as listed in the table below:
|lr||lr.local||This is a Learning Registry node with a base configuration, running latest stable LR code.|
|lr51||lr51.local||Optional VM. This is a Learning Registry v.51 node with a base configuration.|
|lr49||lr49.local||Optional VM. This is a Learning Registry v.49 node with a base configuration.|
|lruser||lruser.local||Optional VM. This is a Linux Mint desktop VM. Can be used to access the apps running on lr51 VM. Alternative to using this is updating host's hosts file to point to IP's of the VMs.|
Install VirtualBox https://www.virtualbox.org
Install Vagrant https://www.vagrantup.com
Open a Terminal, shell, or command prompt and clone this repository.
$ mkdir -p /<some work path>/ $ cd /<some work path>/ $ git clone https://github.com/LearningRegistry/lr-vagrant.git lr-vagrant $ cd lr-vagrant
Install some vagrant plugins.
$ vagrant plugin install vagrant-hostmanager
Launch the VM's. Each line launches a different VM.
$ vagrant up lr ## this is a Learning Registry demo node, using latest stable code $ vagrant up lruser ## this is a Linux Mint desktop that can be used as a client on the same network as the other VMs
Optional LR User VM
$ vagrant up lruser ## this is a Linux Mint desktop that can be used as a client on the same network as the other VMs
VMs should be running... http://lr.local/
You will need approximately 10 GB free on your host machine with 2GB RAM or more, 8+ preferred... for each VM you want to run.
The VMs will take quite a long time to download the base boxes the first time, but are then cached locally in
$HOME/.vagrant. You can get a list of these boxes by issuing the following command.
$ vagrant box list
You can set an environment variable in your profile if you want to use an external drive to store VMs:
You may be prompted to enter your host machine admin password to update
/etc/hostsor equivalent on Windows.
When the box is launched, this directory is shared on the the vagrant box as
This project was initially developed to test distribution between nodes running v0.49 and v0.51 and use of admin whitelisted keys. Information on those setups can be found in
Setup for development from the host machine
Using a vagrant synced folder you can do development on your local (host) machine while running the code on the virtual machine. To implement this setup (only needs to be done once):
Shutdown the node if it's running:
vagrant halt lr
Uncomment and update the
lr.vm.synced_folderin Vagrantfile with your local LearningRegistry src folder location
- If you are running on Windows, you will need to escape your file path. i.e.:
Start the node, and then run the
$ vagrant up lr $ vagrant ssh lr -c '/vagrant/bin/setup_local_dev.sh'
bin directory contains a list of misc scripts that can be run via
Using bash$ vagrant ssh <boxname> -c '/vagrant/bin/<script name>'
||Preps a vagrant box for repackaging.|
||Adds a new remote to the existing checked out LR code base and checks out the specified tag.|
||Runs the LR
||Sets LR_HOME to /lr_src synced_folder for local dev (see instructions above)|
GPG Public and Private Keys
Signing keys for performing external document signing are located in
|Key ID / Fingerprint||Passphrase|