The Learning Registry is a project spearheaded by the US Department of Education's Office of Educational Technology to make digital learning resources easier to find, easier to access and easier to integrate into learning environments wherever they are stored -- around the country and the world. Although the Department's public nodes were shuttered in September 2018, the project codebase lives on and can be adapted by anyone for public or private use.
The LR-Vagrant project provides configurations and virtualbox images to start up and test Learning Registry nodes, or the LR Search server. More information on the LR-Data and LR Search Widget projects can be found on their respective GitHub repos.
There are the basic Vagrant VMs as listed in the table below:
Vagrant ID | Hostname | Description |
---|---|---|
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. |
lrsearch | lrsearch.local | Optional VM. Local dev copy of LR Search services. Provides the LR-Data indexing, the search widget manager app, and the search APIs. |
Install VirtualBox https://www.virtualbox.org
Install Vagrant https://www.vagrantup.com
Open a Terminal, shell, or command prompt and clone this repository.
Using bash
$ 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.
Using bash
$ vagrant plugin install vagrant-hostmanager
Launch the VM's. Each line launches a different VM.
Using bash
$ vagrant up lr ## this is a Learning Registry demo node, using latest stable code $ vagrant up lrsearch ## this is the LR Search services, which points at local lr by default but could be used solo with public LR nodes.
Optional LR User VM
Using bash
$ 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/ or http://lrsearch.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.Using bash
$ vagrant box list
You can set an environment variable in your profile if you want to use an external drive to store VMs:
export VAGRANT_HOME=/Volumes/MyExternalDrive/vagrant
You may be prompted to enter your host machine admin password to update
/etc/hosts
or equivalent on Windows.When the box is launched, this directory is shared on the the vagrant box as
/vagrant
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
test/LRv49-51_ReadMe.rst
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_folder
in Vagrantfile with your local LearningRegistry src folder location- If you are running on Windows, you will need to escape your file path. i.e.:
"G:\\LearningRegistry\\source"
Start the node, and then run the
bin/setup_local_dev.sh
scriptUsing bash
$ vagrant up lr $ vagrant ssh lr -c '/vagrant/bin/setup_local_dev.sh'
The bin
directory contains a list of misc scripts that can be run via
Using bash
$ vagrant ssh <boxname> -c '/vagrant/bin/<script name>'
Script Name | Description |
---|---|
set-insecure-key.sh |
Preps a vagrant box for repackaging. |
provision-lr-branch.sh <remote_name> <remote_url> <tag> |
Adds a new remote to the existing checked out LR code base and checks out the specified tag. |
provision-fix-start-script.sh |
Runs the LR service_util.py with default options and then
replaces the existing script in /etc/init.d/ with the newly
generated one. |
install_whitelist_key.py |
Configures /vagrant/signing_keys/pub_keys/ as the Admin Whitelist Public Keys directory. |
setup_local_dev.sh |
Sets LR_HOME to /lr_src synced_folder for local dev (see instructions above) |
Signing keys for performing external document signing are located in ./signing_keys
.
Key ID / Fingerprint | Passphrase | |
---|---|---|
175FBB7D5D6F5B9A504F95D8B7B49BA3A7409F8A | whitelist | [email protected] |
01916AE1DC8F279352E3FE6705510FF20CC118C7 | vagrant | [email protected] |
01916AE1DC8F279352E3FE6705510FF20CC118C7 | vagrant | [email protected] |
59CB75D2C7D6F8FB649E30EF9E735BEE5AC53DD3 | vagrant | [email protected] |
0180320D8A7698E0104790374212BA1AAF82338A | vagrant | [email protected] |
Copyright 2015 Jim Klo <[email protected]>
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
http://www.apache.org/licenses/LICENSE-2.0
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.