adinancr commented on a change in pull request #318:
URL: https://github.com/apache/rya/pull/318#discussion_r519462909



##########
File path: extras/vagrantExample/src/main/vagrant/Vagrantfile
##########
@@ -46,57 +47,37 @@ Vagrant.configure(2) do |config|
   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

Review comment:
       Any chance of updating the Accumulo dependency? 1.6.5 is very old

##########
File path: extras/vagrantExample/src/main/vagrant/Vagrantfile
##########
@@ -280,112 +248,115 @@ EOF
     mkdir --parents /data/accumulo/lib/ext
     
     sudo chmod -R a+rwX ${ACCUMULO_HOME}/logs/
-
     echo "Starting Accumulo..."
     echo "Init will fail during a re-provision, but you can ignore it:  
'FATAL: It appears the directories [...] were previously initialized.'"
     echo "Also, you may see an indefinitely repeating: 'Waiting for accumulo 
to be initialized' which means Accumulo won't start."
     echo "Either issue can be resolved by removing the directory: 'sudo rm -r 
/data/accumulo' then re-provision. Warning: this will erase all Rya/Accumulo 
data."
     ${ACCUMULO_HOME}/bin/accumulo init --instance-name dev --password root
     ${ACCUMULO_HOME}/bin/start-all.sh  || exit 107
-
     sudo chmod -R a+rwX ${ACCUMULO_HOME}/logs/
-
     echo 'Done!'
-
+    # --------------------
     echo "Installing RDF4J Server"
     # creating log dir rdf4j-http-server-${RDF4J_VERSION}
-    sudo mkdir --parents /usr/share/tomcat7/.RDF4J
-    sudo chown -R tomcat7:tomcat7 /usr/share/tomcat7
-    sudo ln --force -s /usr/share/tomcat7/.RDF4J/Server/logs 
/var/log/tomcat7/rdf4j-server
-    rdf4jwar=/var/lib/tomcat7/webapps/rdf4j-server.war
+    sudo mkdir --parents /usr/share/tomcat9/.RDF4J
+    sudo chown -R tomcat:tomcat /usr/share/tomcat9
+    sudo ln --force -s /usr/share/tomcat9/.RDF4J/Server/logs 
/var/log/tomcat9/rdf4j-server
+    # create a property that the app will pickup.  It defaults to $HOME.
+    sudo echo 'export 
JAVA_OPTS="-Dorg.eclipse.rdf4j.appdata.basedir=/var/lib/tomcat9/webapps/rdf4j-server/"'
 | sudo tee --append '/usr/share/tomcat9/bin/setenv.sh'
+    rdf4jwar=/var/lib/tomcat9/webapps/rdf4j-server.war
     if [[ ! -s $rdf4jwar ]] ; then
         echo "Downloading RDF4J Server"
         download --output $rdf4jwar 
${mavenRepoUrl}org/eclipse/rdf4j/rdf4j-http-server/${RDF4J_VERSION}/rdf4j-http-server-${RDF4J_VERSION}.war
 || exit 110
     fi
     echo "RDF4J http server deployed at 
http://rya-example-box:8080/rdf4j-server";
-
     echo "Installing RDF4J Workbench"
-    workbench=/var/lib/tomcat7/webapps/rdf4j-workbench.war
+    workbench=/var/lib/tomcat9/webapps/rdf4j-workbench.war
     if [[ ! -s $workbench ]] ; then
         echo "Downloading RDF4J Workbench"
         download --output $workbench 
${mavenRepoUrl}org/eclipse/rdf4j/rdf4j-http-workbench/${RDF4J_VERSION}/rdf4j-http-workbench-${RDF4J_VERSION}.war
 || exit 111
     fi
     echo "RDF4J workbench deployed at 
http://rya-example-box:8080/rdf4j-workbench";
-
+    # ----------------------
     echo "Installing Rya"
     ryaIndexing=rya.indexing.example-${RYA_EXAMPLE_VERSION}-distribution
+    # Place in the vagrant folder from your dev project: 
extras/indexingExample/target/rya.indexing.example-4.0.1-incubating-SNAPSHOT-distribution.zip
+    if [[ -s "/vagrant/${ryaIndexing}.zip" ]] ; then
+        echo "Using found local file:  /vagrant/${ryaIndexing}.zip "
+        cp "/vagrant/${ryaIndexing}.zip"  ./
+    fi
     if [[ ! -s ${ryaIndexing}.zip ]] ; then
         echo "Downloading ${ryaIndexing}.zip quietly, this will take some 
minutes with no output..."
-        download --output ${ryaIndexing}.zip 
https://www.dropbox.com/s/gruhp3a848k8ryu/${ryaIndexing}.zip?raw=1 || exit 112
-        # TODO: Eventually this version of the Rya distribution will be on 
maven...and then we can use the following instead
-        #download --output ${ryaIndexing}.zip 
${mavenRepoUrl}org/apache/rya/rya.indexing.example/${RYA_EXAMPLE_VERSION}/${ryaIndexing}.zip
 || exit 112
+        ###download --output ${ryaIndexing}.zip 
https://www.dropbox.com/s/gruhp3a848k8ryu/${ryaIndexing}.zip?raw=1 || exit 112
+        download --output ${ryaIndexing}.zip 
${mavenRepoUrl}org/apache/rya/rya.indexing.example/${RYA_EXAMPLE_VERSION}/${ryaIndexing}.zip
 || exit 112
     fi
     sudo mkdir --parents ${ryaIndexing}
     sudo unzip -q -o ${ryaIndexing}.zip -d ${ryaIndexing}
-
     # before continuing, wait for tomcat to deploy wars:
-    waitForDeploy /var/lib/tomcat7/webapps/rdf4j-workbench/WEB-INF/lib/
-    waitForDeploy /var/lib/tomcat7/webapps/rdf4j-server/WEB-INF/lib/
-
+    waitForDeploy /var/lib/tomcat9/webapps/rdf4j-workbench/WEB-INF/lib/
+    waitForDeploy /var/lib/tomcat9/webapps/rdf4j-server/WEB-INF/lib/
     # soft linking the files doesn't seem to work in tomcat, so we copy them 
instead :(
-    sudo cp ${ryaIndexing}/dist/lib/* 
/var/lib/tomcat7/webapps/rdf4j-workbench/WEB-INF/lib/ || exit 113
-    sudo cp ${ryaIndexing}/dist/lib/* 
/var/lib/tomcat7/webapps/rdf4j-server/WEB-INF/lib/    || exit 114
-
-    # These are older libs that breaks tomcat 7
-    sudo rm --force 
/var/lib/tomcat7/webapps/rdf4j-workbench/WEB-INF/lib/servlet-api-2.5.jar
-    sudo rm --force 
/var/lib/tomcat7/webapps/rdf4j-workbench/WEB-INF/lib/jsp-api-2.1.jar
-    sudo rm --force 
/var/lib/tomcat7/webapps/rdf4j-server/WEB-INF/lib/servlet-api-2.5.jar
-    sudo rm --force 
/var/lib/tomcat7/webapps/rdf4j-server/WEB-INF/lib/jsp-api-2.1.jar
-
-    sudo chown -R tomcat7:tomcat7 
/var/lib/tomcat7/webapps/rdf4j-workbench/WEB-INF/lib/
-    sudo chown -R tomcat7:tomcat7 
/var/lib/tomcat7/webapps/rdf4j-server/WEB-INF/lib/
-
+    sudo cp ${ryaIndexing}/dist/lib/* 
/var/lib/tomcat9/webapps/rdf4j-workbench/WEB-INF/lib/ || exit 113
+    sudo cp ${ryaIndexing}/dist/lib/* 
/var/lib/tomcat9/webapps/rdf4j-server/WEB-INF/lib/    || exit 114
+    # These are older libs that break tomcat and rdf4j that come with Rya 
above.
+    sudo rm --force 
/var/lib/tomcat9/webapps/rdf4j-workbench/WEB-INF/lib/servlet-api-2.5.jar
+    sudo rm --force 
/var/lib/tomcat9/webapps/rdf4j-workbench/WEB-INF/lib/jsp-api-2.1.jar
+    s=/var/lib/tomcat9/webapps/rdf4j-server/WEB-INF/lib/
+    sudo rm --force $s/servlet-api-2.5.jar   $s/lib/jsp-api-2.1.jar
+    sudo find "$s" -name 'spring-*-3.*.jar' -exec sudo rm --force {} +
+     sudo rm --force  $s/slf4j-log4j12-1.7.25.jar   $s/slf4j-api-1.7.25.jar  
$s/jcabi-log-0.14.jar   $s/jcl-over-slf4j-1.7.25.jar   $s/minlog-1.3.0.jar   
$s/commons-logging-1.1.1.jar   $s/log4j-1.2.16.jar
+    sudo chown -R tomcat:tomcat 
/var/lib/tomcat9/webapps/rdf4j-workbench/WEB-INF/lib/
+    sudo chown -R tomcat:tomcat 
/var/lib/tomcat9/webapps/rdf4j-server/WEB-INF/lib/
+    # ----------------------
     echo "Downloading and installing new templates for RDF4J WorkBench"
     ryaVagrant=rya.vagrant.example-${RYA_EXAMPLE_VERSION}
+    # Place in the vagrant folder from your dev project: 
extras/vagrantExample/target/rya.vagrant.example-*.jar 
+    if [[ -s "/vagrant/${ryaVagrant}.jar" ]] ; then
+        echo "Using found local file:  /vagrant/${ryaVagrant}.jar "
+        cp "/vagrant/${ryaVagrant}.jar"  ./
+    fi
     if [[ ! -s ${ryaVagrant}.jar ]] ; then
         echo "Downloading ${ryaVagrant}.jar"
-        download --output ${ryaVagrant}.jar 
https://www.dropbox.com/s/p07u42et9rui3x7/${ryaVagrant}.jar?raw=1 || exit 120
-        # TODO: Eventually this version of the Rya distribution will be on 
maven...and then we can use the following instead
-        #download --output ${ryaVagrant}.jar 
${mavenRepoUrl}org/apache/rya/rya.vagrant.example/${RYA_EXAMPLE_VERSION}/${ryaVagrant}.jar
 || exit 120
+        ###download --output ${ryaVagrant}.jar 
https://www.dropbox.com/s/p07u42et9rui3x7/${ryaVagrant}.jar?raw=1 || exit 120

Review comment:
       delete the commented line

##########
File path: extras/vagrantExample/src/main/vagrant/Vagrantfile
##########
@@ -33,9 +33,10 @@
 
 Vagrant.configure(2) do |config|
 
-  config.vm.box = "ubuntu/trusty64"
-  config.vm.box_url = 
"https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box";
-
+  config.vm.box = "bento/ubuntu-18.04"
+  ###config.vm.box = "ubuntu/trusty64"

Review comment:
       delete the now commented old lines

##########
File path: extras/vagrantExample/src/main/vagrant/Vagrantfile
##########
@@ -46,57 +47,37 @@ Vagrant.configure(2) do |config|
   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-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/
-
+    ### IMPORTANT:  Verify this exists in the Maven repos.  As you know, I am 
writing this before it exists.
+    export RYA_EXAMPLE_VERSION=4.0.1
+    export RDF4J_VERSION=2.3.3

Review comment:
       RDF4J is now at 3.4.3 - any chance we can update the version we are 
relying on?

##########
File path: extras/vagrantExample/src/main/vagrant/Vagrantfile
##########
@@ -280,112 +248,115 @@ EOF
     mkdir --parents /data/accumulo/lib/ext
     
     sudo chmod -R a+rwX ${ACCUMULO_HOME}/logs/
-
     echo "Starting Accumulo..."
     echo "Init will fail during a re-provision, but you can ignore it:  
'FATAL: It appears the directories [...] were previously initialized.'"
     echo "Also, you may see an indefinitely repeating: 'Waiting for accumulo 
to be initialized' which means Accumulo won't start."
     echo "Either issue can be resolved by removing the directory: 'sudo rm -r 
/data/accumulo' then re-provision. Warning: this will erase all Rya/Accumulo 
data."
     ${ACCUMULO_HOME}/bin/accumulo init --instance-name dev --password root
     ${ACCUMULO_HOME}/bin/start-all.sh  || exit 107
-
     sudo chmod -R a+rwX ${ACCUMULO_HOME}/logs/
-
     echo 'Done!'
-
+    # --------------------
     echo "Installing RDF4J Server"
     # creating log dir rdf4j-http-server-${RDF4J_VERSION}
-    sudo mkdir --parents /usr/share/tomcat7/.RDF4J
-    sudo chown -R tomcat7:tomcat7 /usr/share/tomcat7
-    sudo ln --force -s /usr/share/tomcat7/.RDF4J/Server/logs 
/var/log/tomcat7/rdf4j-server
-    rdf4jwar=/var/lib/tomcat7/webapps/rdf4j-server.war
+    sudo mkdir --parents /usr/share/tomcat9/.RDF4J
+    sudo chown -R tomcat:tomcat /usr/share/tomcat9
+    sudo ln --force -s /usr/share/tomcat9/.RDF4J/Server/logs 
/var/log/tomcat9/rdf4j-server
+    # create a property that the app will pickup.  It defaults to $HOME.
+    sudo echo 'export 
JAVA_OPTS="-Dorg.eclipse.rdf4j.appdata.basedir=/var/lib/tomcat9/webapps/rdf4j-server/"'
 | sudo tee --append '/usr/share/tomcat9/bin/setenv.sh'
+    rdf4jwar=/var/lib/tomcat9/webapps/rdf4j-server.war
     if [[ ! -s $rdf4jwar ]] ; then
         echo "Downloading RDF4J Server"
         download --output $rdf4jwar 
${mavenRepoUrl}org/eclipse/rdf4j/rdf4j-http-server/${RDF4J_VERSION}/rdf4j-http-server-${RDF4J_VERSION}.war
 || exit 110
     fi
     echo "RDF4J http server deployed at 
http://rya-example-box:8080/rdf4j-server";
-
     echo "Installing RDF4J Workbench"
-    workbench=/var/lib/tomcat7/webapps/rdf4j-workbench.war
+    workbench=/var/lib/tomcat9/webapps/rdf4j-workbench.war
     if [[ ! -s $workbench ]] ; then
         echo "Downloading RDF4J Workbench"
         download --output $workbench 
${mavenRepoUrl}org/eclipse/rdf4j/rdf4j-http-workbench/${RDF4J_VERSION}/rdf4j-http-workbench-${RDF4J_VERSION}.war
 || exit 111
     fi
     echo "RDF4J workbench deployed at 
http://rya-example-box:8080/rdf4j-workbench";
-
+    # ----------------------
     echo "Installing Rya"
     ryaIndexing=rya.indexing.example-${RYA_EXAMPLE_VERSION}-distribution
+    # Place in the vagrant folder from your dev project: 
extras/indexingExample/target/rya.indexing.example-4.0.1-incubating-SNAPSHOT-distribution.zip
+    if [[ -s "/vagrant/${ryaIndexing}.zip" ]] ; then
+        echo "Using found local file:  /vagrant/${ryaIndexing}.zip "
+        cp "/vagrant/${ryaIndexing}.zip"  ./
+    fi
     if [[ ! -s ${ryaIndexing}.zip ]] ; then
         echo "Downloading ${ryaIndexing}.zip quietly, this will take some 
minutes with no output..."
-        download --output ${ryaIndexing}.zip 
https://www.dropbox.com/s/gruhp3a848k8ryu/${ryaIndexing}.zip?raw=1 || exit 112
-        # TODO: Eventually this version of the Rya distribution will be on 
maven...and then we can use the following instead
-        #download --output ${ryaIndexing}.zip 
${mavenRepoUrl}org/apache/rya/rya.indexing.example/${RYA_EXAMPLE_VERSION}/${ryaIndexing}.zip
 || exit 112
+        ###download --output ${ryaIndexing}.zip 
https://www.dropbox.com/s/gruhp3a848k8ryu/${ryaIndexing}.zip?raw=1 || exit 112

Review comment:
       delete the commented line

##########
File path: extras/vagrantExample/src/main/vagrant/readme.md
##########
@@ -41,6 +41,18 @@ Once Vagrant is installed, starting up the Rya-Example-Box 
is fairly straightfor
 
 1. Download the [Rya-Example-Box Vagrantfile] to the custom directory.  Note 
that it must be named `Vagrantfile` with no extension.
 
+1. Optionally copy built Rya libraries from your project into the vagrant 
directory.  If not, it will attempt to download from the public repository.  
The following files can be copied or linked (ln -s file destination).
+
+        extras/indexingExample/target/rya.indexing.example-*-distribution.zip
+        extras/vagrantExample/target/rya.vagrant.example-*.jar
+        web/web.rya/target/web.rya.war
+
+The last one must be renamed to include the version, for example:  
web.rya-4.0.1-incubating-SNAPSHOT.war

Review comment:
       change example to "web.rya-4.0.1.war" (no incubating, no SNAPSHOT)

##########
File path: extras/vagrantExample/src/main/vagrant/readme.md
##########
@@ -41,6 +41,18 @@ Once Vagrant is installed, starting up the Rya-Example-Box 
is fairly straightfor
 
 1. Download the [Rya-Example-Box Vagrantfile] to the custom directory.  Note 
that it must be named `Vagrantfile` with no extension.
 
+1. Optionally copy built Rya libraries from your project into the vagrant 
directory.  If not, it will attempt to download from the public repository.  
The following files can be copied or linked (ln -s file destination).
+
+        extras/indexingExample/target/rya.indexing.example-*-distribution.zip
+        extras/vagrantExample/target/rya.vagrant.example-*.jar
+        web/web.rya/target/web.rya.war
+
+The last one must be renamed to include the version, for example:  
web.rya-4.0.1-incubating-SNAPSHOT.war
+
+1. Modify the Vagrant file to match the version on your files or in the 
repository.  It may already match the current version, but verify it since it 
is a pre-release guess.  This is around line 56.  For example:

Review comment:
       Change from "Modify the Vagrant file to match the version on your files 
or in the repository." to "Modify the Vagrant file so the RYA_EXAMPLE_VERSION 
matches the version in your files or in the public repository."

##########
File path: extras/vagrantExample/src/main/vagrant/readme.md
##########
@@ -41,6 +41,18 @@ Once Vagrant is installed, starting up the Rya-Example-Box 
is fairly straightfor
 
 1. Download the [Rya-Example-Box Vagrantfile] to the custom directory.  Note 
that it must be named `Vagrantfile` with no extension.
 
+1. Optionally copy built Rya libraries from your project into the vagrant 
directory.  If not, it will attempt to download from the public repository.  
The following files can be copied or linked (ln -s file destination).

Review comment:
       vagrant directory is the custom directory mentioned above? If so, I 
would keep the name consistent and refer to it as the "custom directory" 
instead of "vagrant directory"
   Maybe be more explicit with where the built Rya libraries are coming from. 
For example, 
   "Optionally, if you downloaded and built Rya, copy built Rya libraries from 
your project into the custom directory.  If not, Vagrant will attempt to 
download from the public repository when building the VM.  The following files 
can be copied or linked (ln -s file destination)."

##########
File path: extras/vagrantExample/src/main/vagrant/readme.md
##########
@@ -41,6 +41,18 @@ Once Vagrant is installed, starting up the Rya-Example-Box 
is fairly straightfor
 
 1. Download the [Rya-Example-Box Vagrantfile] to the custom directory.  Note 
that it must be named `Vagrantfile` with no extension.
 
+1. Optionally copy built Rya libraries from your project into the vagrant 
directory.  If not, it will attempt to download from the public repository.  
The following files can be copied or linked (ln -s file destination).
+
+        extras/indexingExample/target/rya.indexing.example-*-distribution.zip
+        extras/vagrantExample/target/rya.vagrant.example-*.jar
+        web/web.rya/target/web.rya.war
+
+The last one must be renamed to include the version, for example:  
web.rya-4.0.1-incubating-SNAPSHOT.war
+
+1. Modify the Vagrant file to match the version on your files or in the 
repository.  It may already match the current version, but verify it since it 
is a pre-release guess.  This is around line 56.  For example:
+
+    export RYA_EXAMPLE_VERSION=4.0.1-SNAPSHOT

Review comment:
       I would remove the SNAPSHOT, leaving just 
   export RYA_EXAMPLE_VERSION=4.0.1




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to