From 3c3ab0dfdb758602dba51e9ce043b7d108898091 Mon Sep 17 00:00:00 2001 From: "eric.white" Date: Wed, 16 May 2018 12:56:05 -0400 Subject: [PATCH] RYA-495 Closes #297, Updated the Vagrantfile's dependencies --- .../src/main/vagrant/Vagrantfile | 203 +++++++++--------- .../vagrantExample/src/main/vagrant/readme.md | 12 +- 2 files changed, 111 insertions(+), 104 deletions(-) diff --git a/extras/vagrantExample/src/main/vagrant/Vagrantfile b/extras/vagrantExample/src/main/vagrant/Vagrantfile index 247f46cd1..2b8d31064 100644 --- a/extras/vagrantExample/src/main/vagrant/Vagrantfile +++ b/extras/vagrantExample/src/main/vagrant/Vagrantfile @@ -39,33 +39,35 @@ Vagrant.configure(2) do |config| config.vm.provider "virtualbox" do |vb| vb.name = "rya-example-box" vb.memory = "4096" - vb.cpus = 4 + vb.cpus = 4 end config.vm.network :private_network, ip: "192.168.33.10" config.vm.hostname = "rya-example-box" config.vm.provision "shell", inline: <<-SHELL - + ###set -x ## turn on command echo with expanded variables # List of dependency versions export ACCUMULO_VERSION=1.6.5 ###export ACCUMULO_VERSION=1.7.1 export HADOOP_VERSION=2.7.2 - export RYA_EXAMPLE_VERSION=4.0.0-incubating + export RYA_EXAMPLE_VERSION=4.0.0-incubating-SNAPSHOT + # TODO: Eventually this version of the Rya distribution will be on maven...and then we can use the following instead + #export RYA_EXAMPLE_VERSION=4.0.0-incubating export RDF4J_VERSION=2.3.1 export ZOOKEEPER_VERSION=3.4.5-cdh4.5.0 mavenRepoUrl=http://repo1.maven.org/maven2/ echo "Updating host file with permanent ip" - sudo sed -i 's/127.0.1.1/192.168.33.10/' /etc/hosts + sudo sed -i 's/127.0.1.1/192.168.33.10/' /etc/hosts cat >> /etc/hosts < ${BASHRC}.new <&2; } @@ -172,9 +174,9 @@ EOF fi done } - + echo "- Hadoop" - hadoopUrl=http://apache.mirrors.tds.net/hadoop/common/hadoop-${HADOOP_VERSION}/hadoop-${HADOOP_VERSION}.tar.gz + hadoopUrl=https://archive.apache.org/dist/hadoop/common/hadoop-${HADOOP_VERSION}/hadoop-${HADOOP_VERSION}.tar.gz if [[ ! -d ${HADOOP_HOME} ]] ; then echo "Downloading $hadoopUrl" download $hadoopUrl \ @@ -190,13 +192,13 @@ EOF fi echo "- Accumulo" - accumuloUrl=http://apache.mirrors.pair.com/accumulo/${ACCUMULO_VERSION}/accumulo-${ACCUMULO_VERSION}-bin.tar.gz - if [[ ! -d ${ACCUMULO_HOME} ]] ; then - echo "Downloading $accumuloUrl" - download $accumuloUrl \ - | tar -zxC /home/vagrant || exit 103 - fi - + accumuloUrl=https://archive.apache.org/dist/accumulo/${ACCUMULO_VERSION}/accumulo-${ACCUMULO_VERSION}-bin.tar.gz + if [[ ! -d ${ACCUMULO_HOME} ]] ; then + echo "Downloading $accumuloUrl" + download $accumuloUrl \ + | tar -zxC /home/vagrant || exit 103 + fi + echo "Configuring Zookeeper..." sudo mkdir --parents /var/zookeeper sudo chown vagrant:vagrant /var/zookeeper @@ -206,7 +208,7 @@ EOF # Conflicts with Accumulo and maybe Zookeeper sudo rm --force ${HADOOP_HOME}/share/hadoop/common/lib/slf4j-api-1.7.10.jar sudo rm --force ${HADOOP_HOME}/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar - + # Assure logs are creatable and writeable sudo mkdir --parents ${ZOO_LOG_DIR} sudo touch "${ZOO_LOG_DIR}/zookeeper.out" @@ -214,7 +216,7 @@ EOF echo "Running Zookeeper..." sudo -E ${ZOOKEEPER_HOME}/bin/zkServer.sh start - + echo "Configuring Accumulo..." cp ${ACCUMULO_HOME}/conf/examples/1GB/standalone/* ${ACCUMULO_HOME}/conf/ rm --force ${ACCUMULO_HOME}/conf/accumulo-site.xml @@ -270,7 +272,7 @@ EOF rya-example-box EOF - cat > ${ACCUMULO_HOME}/conf/slaves < ${ACCUMULO_HOME}/conf/slaves < /var/lib/tomcat7/webapps/web.rya/WEB-INF/classes/environment.properties < /var/lib/tomcat7/webapps/web.rya/WEB-INF/classes/environment.properties <\ryavagrant` or for Mac/Linux users `/home//ryavagrant`) -1. Download the [Rya-Example-Box Vagrantfile][pathToVF] to the custom directory. Note that it must be named `Vagrantfile` with no extension. +1. Download the [Rya-Example-Box Vagrantfile] to the custom directory. Note that it must be named `Vagrantfile` with no extension. 1. Open a DOS prompt (Windows) or Terminal (Mac/Linux), change to the custom directory, and issue the command `vagrant up`. Note that it may take up to 30 minutes to download, install, and configure Rya and all of the components. @@ -187,7 +187,7 @@ From within the VM, run: The first step to using Rya via the RDF4J Workbench is to create a repository using the Rya Accumulo Store connector. -1. Open your browser to the [RDF4j Workbench](http://rya-example-box:8080/rdf4j-workbench) +1. Open your browser to the [RDF4J Workbench](http://rya-example-box:8080/rdf4j-workbench) 2. Click on `New Repository` 3. Choose "Type" of `Rya Accumulo Store`, a Repository "ID" (e.g., `RyaAccumulo`), and a Repository "Title" (e.g., `Rya Accumulo`). Click on `Next` when complete. 4. Enter the Rya Accumulo Store connection parameters. The default parameters will connect to the Rya Example Box Acccumulo deployment (i.e., Accumulo User: `root`, Accumulo Password: `root`, Accumulo Instance: `dev`, Zookeepers: `localhost`, is Mock?: `false`). Click on `Create` when complete. @@ -222,7 +222,7 @@ Once we've created a Rya repository and uploaded data, we can query Rya via the ### Using the RDF4J REST Service -More information about the RDF4J REST HTTP Protocol is availible in the [RDF4J 2.3.1 Docs] +More information about the RDF4J REST HTTP Protocol is availible in the [RDF4J 2.3.1 Docs] (http://docs.rdf4j.org/rest-api/) ### Using Rya Java Client @@ -253,6 +253,6 @@ TODO TODO ### Resizing the VMs Disk space -Instructions for resizing a Vagrant/VirtualBox image can be found [here] (http://www.midwesternmac.com/blogs/jeff-geerling/resizing-virtualbox-disk-image) +Instructions for resizing a Vagrant/VirtualBox image can be found [here](http://www.midwesternmac.com/blogs/jeff-geerling/resizing-virtualbox-disk-image) -[pathToVF]: Vagrantfile +[Rya-Example-Box Vagrantfile]: Vagrantfile