Re: [Dspace-tech] Vagrant Goodies

2015-06-23 Thread Pottinger, Hardy J.
> Is there a reason why you did not do

:-) I would never assume that anyone running Vagrant-DSpace would also have 
Maven installed on their host computer. It's part of the point of 
Vagrant-DSpace, to not have to install Maven. Though, it's cool that you 
figured that out, and that you find it helpful.

RE: Landrush, it's kind of fiddly, I don't use it any more. Instead I use 
Vagrant::Hostsupdater [1]

[1] https://github.com/cogitatio/vagrant-hostsupdater

It's a much more solid solution to mapping host names to localhost. 

From: Monika C. Mevenkamp [moni...@princeton.edu]
Sent: Tuesday, June 23, 2015 10:47 AM
To: Pottinger, Hardy J.
Cc: Tim Donohue; Lista técnica do DSpace
Subject: Vagrant Goodies

Hi Hardy

vagrant-cachier is just what the doctor ordered - I was wondering about sharing 
resources
I tried it out - it took me a bit  to find where the maven dir lives on the 
host.

After that I went ahead  and linked
(cd ~/.vagrant.d/cache/dspace-trusty64/maven; ln -s ~/.m2/repositry/* .)

Is that how you share ?

Is there a reason why you did not do

# use the generic cache bucket for Maven
   config.cache.enable :generic, {
 "maven" => { cache_dir: "/home/vagrant/.m2" },
   }

and then link
(cd ~/.vagrant.d/cache/dspace-trusty64/maven; ln -s ~/.m2/* .)

I use Bram’s trick of putting profiles in ~/.settings.xml - sharing the whole 
.m2 dir would give me the ability to keep all config bundles together in 
settings.xml

Anyway - off to read about land rush and the other goodies


Monika


—
Monika Mevenkamp
Digital Repository Infrastructure Developer
Phone: 609-258-4161
333C 701 Carnegie, Princeton University, Princeton, NJ 08544

> On Jun 22, 2015, at 10:47 AM, Pottinger, Hardy J.  
> wrote:
>
> Hi, Monika, here's the line  [1] in the Puppet template file that gets turned 
> into vagrant.properties, which selects the DB driver.
>
> Here's what I do when I want to work with Oracle and Vagrant-DSpace (not 
> often, only when I want to test Oracle compatibility): I keep a copy of 
> vagrant.properties in the config/dotfiles folder, and I rename it 
> vagrant-oracle.properties. I then have a little bash alias I run to change 
> the MAVEN_OPTS:
>
> alias oracle.env-init="export MAVEN_OPTS='-Denv=vagrant-oracle 
> -Dmirage2.on=true -Dmirage2.deps.included=false'"
>
> NOTE: if you're not using Mirage2, you can forget the mirage2 options.
>
> I also park the ojdbc.jar file in there, just in case I need it, however I 
> usually don't, because long ago I installed the Vagrant-cachier plugin [1], 
> and that keeps my entire .m2/repository folder, including any 
> manually-installed jar files, cached on my host machine.
>
> In my local-bootstrap.sh provisioner script, I've added this:
>
> # BASH aliases customization
> if [ -f "/vagrant/config/dotfiles/bash_aliases" ]; then
>echo "setting up .bash_aliases file"
>sudo -i -u vagrant cp /vagrant/config/dotfiles/bash_aliases 
> /home/vagrant/.bash_aliases
> fi
>
>
> Which lets me configure all kinds of little aliases.
>
> --Hardy
>
> [1] 
> https://github.com/DSpace/vagrant-dspace/blob/master/modules/dspace/templates/vagrant.properties.erb#L59
> [2] https://github.com/fgrehm/vagrant-cachier
> 
> From: Tim Donohue [tdono...@duraspace.org]
> Sent: Thursday, June 18, 2015 2:05 PM
> To: Monika C. Mevenkamp; Lista técnica do DSpace
> Subject: Re: [Dspace-tech] dspace 5_x + Oracle on Vagrant
>
> Hi Monika,
>
> It looks like it's trying to connect with:
>
> "Driver: org.postgresql.Driver"
>
> (according to the output of your "dspace database test")
>
> This implies that your dspace.cfg probably has the wrong value for
> "db.driver". It should be:
>
> db.driver=oracle.jdbc.OracleDriver
>
> So you may want to update this in your dspace.cfg and try again. Also
> may want to update it in your "build.properties" (as that's what
> populates the dspace.cfg). In the case of vagrant-dspace, it uses a
> custom "vagrant.properties" by default.
>
> - Tim
>
> On 6/18/2015 1:33 PM, Monika C. Mevenkamp wrote:
>> I got myself dspace vagrant
>> switched to dspace_5_x branch
>> setup to run with Oracle via settings in dspace.cfg
>> copied ~/.m2/repository/com/oracle/ojdbc6 from my host to vagrants ~/.m2
>> did mvn package with -Ddb.name=oracle
>>
>> I can successfully run
>>
>>~/dspace/bin/dspace database test
>>
>>Attempting to connect to database using these configurations:
>>  - URL: jdbc:oracle:thin:@xyz.princeton.edu
>>:1521:dspdevl
>>  - Driver: org.postgresql.Driver
>>  - Username: dspace
>>  - Password: [hidden]
>>  - Schema:
>>
>>Testing connection...
>>Connected successfully!
>>
>>
>>
>> localist:8081/probe tells me that jspui, xmlii, oia, rdf  did not come up
>> there are exceptions in catalina.out
>> java.sql.SQLException: No suitable driver found for
>> jdbc:oracle:thin:@xyz.princeton.edu 

[Dspace-tech] Vagrant Goodies

2015-06-23 Thread Monika C. Mevenkamp
Hi Hardy 

vagrant-cachier is just what the doctor ordered - I was wondering about sharing 
resources 
I tried it out - it took me a bit  to find where the maven dir lives on the 
host. 

After that I went ahead  and linked 
(cd ~/.vagrant.d/cache/dspace-trusty64/maven; ln -s ~/.m2/repositry/* .) 

Is that how you share ? 

Is there a reason why you did not do 

# use the generic cache bucket for Maven
   config.cache.enable :generic, {
 "maven" => { cache_dir: "/home/vagrant/.m2" },
   }

and then link 
(cd ~/.vagrant.d/cache/dspace-trusty64/maven; ln -s ~/.m2/* .) 

I use Bram’s trick of putting profiles in ~/.settings.xml - sharing the whole 
.m2 dir would give me the ability to keep all config bundles together in 
settings.xml 

Anyway - off to read about land rush and the other goodies 


Monika 

 
—
Monika Mevenkamp
Digital Repository Infrastructure Developer
Phone: 609-258-4161
333C 701 Carnegie, Princeton University, Princeton, NJ 08544

> On Jun 22, 2015, at 10:47 AM, Pottinger, Hardy J.  
> wrote:
> 
> Hi, Monika, here's the line  [1] in the Puppet template file that gets turned 
> into vagrant.properties, which selects the DB driver.
> 
> Here's what I do when I want to work with Oracle and Vagrant-DSpace (not 
> often, only when I want to test Oracle compatibility): I keep a copy of 
> vagrant.properties in the config/dotfiles folder, and I rename it 
> vagrant-oracle.properties. I then have a little bash alias I run to change 
> the MAVEN_OPTS:
> 
> alias oracle.env-init="export MAVEN_OPTS='-Denv=vagrant-oracle 
> -Dmirage2.on=true -Dmirage2.deps.included=false'"
> 
> NOTE: if you're not using Mirage2, you can forget the mirage2 options.
> 
> I also park the ojdbc.jar file in there, just in case I need it, however I 
> usually don't, because long ago I installed the Vagrant-cachier plugin [1], 
> and that keeps my entire .m2/repository folder, including any 
> manually-installed jar files, cached on my host machine.
> 
> In my local-bootstrap.sh provisioner script, I've added this:
> 
> # BASH aliases customization
> if [ -f "/vagrant/config/dotfiles/bash_aliases" ]; then
>echo "setting up .bash_aliases file"
>sudo -i -u vagrant cp /vagrant/config/dotfiles/bash_aliases 
> /home/vagrant/.bash_aliases
> fi
> 
> 
> Which lets me configure all kinds of little aliases.
> 
> --Hardy
> 
> [1] 
> https://github.com/DSpace/vagrant-dspace/blob/master/modules/dspace/templates/vagrant.properties.erb#L59
> [2] https://github.com/fgrehm/vagrant-cachier
> 
> From: Tim Donohue [tdono...@duraspace.org]
> Sent: Thursday, June 18, 2015 2:05 PM
> To: Monika C. Mevenkamp; Lista técnica do DSpace
> Subject: Re: [Dspace-tech] dspace 5_x + Oracle on Vagrant
> 
> Hi Monika,
> 
> It looks like it's trying to connect with:
> 
> "Driver: org.postgresql.Driver"
> 
> (according to the output of your "dspace database test")
> 
> This implies that your dspace.cfg probably has the wrong value for
> "db.driver". It should be:
> 
> db.driver=oracle.jdbc.OracleDriver
> 
> So you may want to update this in your dspace.cfg and try again. Also
> may want to update it in your "build.properties" (as that's what
> populates the dspace.cfg). In the case of vagrant-dspace, it uses a
> custom "vagrant.properties" by default.
> 
> - Tim
> 
> On 6/18/2015 1:33 PM, Monika C. Mevenkamp wrote:
>> I got myself dspace vagrant
>> switched to dspace_5_x branch
>> setup to run with Oracle via settings in dspace.cfg
>> copied ~/.m2/repository/com/oracle/ojdbc6 from my host to vagrants ~/.m2
>> did mvn package with -Ddb.name=oracle
>> 
>> I can successfully run
>> 
>>~/dspace/bin/dspace database test
>> 
>>Attempting to connect to database using these configurations:
>>  - URL: jdbc:oracle:thin:@xyz.princeton.edu
>>:1521:dspdevl
>>  - Driver: org.postgresql.Driver
>>  - Username: dspace
>>  - Password: [hidden]
>>  - Schema:
>> 
>>Testing connection...
>>Connected successfully!
>> 
>> 
>> 
>> localist:8081/probe tells me that jspui, xmlii, oia, rdf  did not come up
>> there are exceptions in catalina.out
>> java.sql.SQLException: No suitable driver found for
>> jdbc:oracle:thin:@xyz.princeton.edu :1521:dspdevl
>> 
>> but the jar is available to all webs -  according to ls
>> 
>> ls -ld ~/dspace/webapps/*/WEB-INF/lib/ojdbc6-11.2.0.4.jar
>> ~/dspace/lib/ojdbc6-11.2.0.4.jar
>> -rw-rw-r-- 1 vagrant vagrant 2739670 Jun 18 17:28
>> */home/vagrant/dspace/lib/ojdbc6-11.2.0.4.jar*
>> -rw-rw-r-- 1 vagrant vagrant 2739670 Jun 18 17:28
>> */home/vagrant/dspace/webapps/jspui/WEB-INF/lib/ojdbc6-11.2.0.4.jar*
>> -rw-rw-r-- 1 vagrant vagrant 2739670 Jun 18 17:28
>> */home/vagrant/dspace/webapps/oai/WEB-INF/lib/ojdbc6-11.2.0.4.jar*
>> -rw-rw-r-- 1 vagrant vagrant 2739670 Jun 18 17:28
>> */home/vagrant/dspace/webapps/rdf/WEB-INF/lib/ojdbc6-11.2.0.4.jar*
>> -rw-rw-r-- 1 vagrant vagrant 2739670 Jun 18 1