Skip to content

Commit

Permalink
Update 'vagrant' to work with new submodule structure after #257 (#264)
Browse files Browse the repository at this point in the history
* #258; Updating vagrant to work with CLAW post #182.
  • Loading branch information
ruebot authored and DiegoPino committed May 25, 2016
1 parent 9056d27 commit 49c9373
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 85 deletions.
6 changes: 3 additions & 3 deletions install/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
config.vm.provider "virtualbox" do |v|
v.name = "Islandora 7.x-2.x"
v.name = "Islandora CLAW"
config.vm.network :forwarded_port, guest: 80, host: 8000 # Apache
end

Expand Down Expand Up @@ -73,8 +73,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision :shell, :path => "./scripts/drupal.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/fcrepo.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/blazegraph.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/islandora-commands.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/islandora-camel.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/alpaca.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/composer.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/karaf.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/islandora-karaf-components.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/config.sh", :args => home_dir
Expand Down
10 changes: 5 additions & 5 deletions install/configs/001-microservices.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /opt/islandora/services/src
DocumentRoot /opt/microservices/pdx/src

<Directory /opt/islandora/services/>
<Directory /opt/microservices/pdx>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Expand All @@ -35,13 +35,13 @@
#LogLevel info rewrite:trace3
LogLevel info

ErrorLog ${APACHE_LOG_DIR}/services-error.log
CustomLog ${APACHE_LOG_DIR}/services-access.log combined
ErrorLog ${APACHE_LOG_DIR}/crayfish-error.log
CustomLog ${APACHE_LOG_DIR}/crayfish-access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
</VirtualHost>
2 changes: 0 additions & 2 deletions install/configs/karaf/islandora_basic_image.script

This file was deleted.

2 changes: 0 additions & 2 deletions install/configs/karaf/islandora_collection.script

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
repo-add file:/home/vagrant/islandora/camel/karaf/target/classes/features.xml
repo-add file:/home/vagrant/Alpaca/karaf/target/classes/features.xml
feature:install islandora-indexing-triplestore
4 changes: 2 additions & 2 deletions install/configs/karaf/islandora_sync_gateway.script
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
repo-add file:/home/vagrant/islandora/camel/karaf/target/classes/features.xml
feature:install islandora-sync-gateway
repo-add file:/home/vagrant/Alpaca/karaf/target/classes/features.xml
feature:install islandora-sync-gateway
6 changes: 3 additions & 3 deletions install/configs/karaf/watch.script
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bundle:watch --start mvn:ca.islandora.camel.component/islandora-camel-component/0.0.1-SNAPSHOT
bundle:watch --start mvn:ca.islandora.camel.sync/islandora-sync-gateway/0.0.1-SNAPSHOT
bundle:watch --start mvn:ca.islandora.camel.indexing/islandora-indexing-triplestore/0.0.1-SNAPSHOT
bundle:watch --start mvn:ca.islandora.component/islandora-camel-component/0.0.1-SNAPSHOT
bundle:watch --start mvn:ca.islandora.sync/islandora-sync-gateway/0.0.1-SNAPSHOT
bundle:watch --start mvn:ca.islandora.indexing/islandora-indexing-triplestore/0.0.1-SNAPSHOT
logout
2 changes: 1 addition & 1 deletion install/configs/variables
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

HOME_DIR=$1
DOWNLOAD_DIR="$HOME_DIR/islandora/install/downloads"
FEDORA_VERSION=4.4.0
FEDORA_VERSION=4.5.1
KARAF_VERSION=4.0.5
KARAF_DIR="/opt/karaf"
KARAF_CLIENT="$KARAF_DIR/bin/client"
Expand Down
23 changes: 0 additions & 23 deletions install/scripts/align_branches.sh

This file was deleted.

17 changes: 10 additions & 7 deletions install/scripts/islandora-camel.sh → install/scripts/alpaca.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
# Islandora Camel Services
echo "Building Islandora Camel Services"
#!/bin/sh
# Alpaca
echo "Building Alpaca"

HOME_DIR=$1

if [ -f "$HOME_DIR/islandora/install/configs/variables" ]; then
. "$HOME_DIR"/islandora/install/configs/variables
fi

# Chown everything over to the vagrant user just in case
chown -R vagrant:vagrant "$HOME_DIR/.m2"

cd "$HOME_DIR/islandora/camel"

cd "$HOME_DIR"
git clone https://github.com/Islandora-CLAW/Alpaca.git
cd Alpaca
chown -R vagrant:vagrant "$HOME_DIR/Alpaca"
sudo -u vagrant mvn -q install

# Chown everything over to the vagrant user just in case
chown -R vagrant:vagrant "$HOME_DIR/.m2"
chown -R vagrant:vagrant "$HOME_DIR/Alpaca"
7 changes: 7 additions & 0 deletions install/scripts/composer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
echo "Installing Composer"

apt-get install -y php5.6-mbstring
curl -sS https://getcomposer.org/installer | php
php composer.phar install --no-progress
mv composer.phar /usr/local/bin/composer
6 changes: 2 additions & 4 deletions install/scripts/drupal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,8 @@ drush en -y apachesolr
cp -a "$DRUPAL_HOME"/sites/all/modules/apachesolr/solr-conf/solr-4.x/. "$SOLR_HOME"/collection1/conf/
service tomcat7 restart

# Islandora modules
if [ ! -f "islandora" ]; then
ln -s "$HOME_DIR/islandora/drupal/" islandora
fi
cd "$DRUPAL_HOME/sites/all/modules"
git clone https://github.com/Islandora-CLAW/islandora.git
drush -y en islandora
drush -y en islandora_dc
drush -y en islandora_mods
Expand Down
13 changes: 0 additions & 13 deletions install/scripts/islandora-commands.sh

This file was deleted.

30 changes: 11 additions & 19 deletions install/scripts/islandora-microservices.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ if [ -f "$HOME_DIR/islandora/install/configs/variables" ]; then
. "$HOME_DIR"/islandora/install/configs/variables
fi

ln -s "$HOME_DIR/islandora" "/opt/islandora"
mkdir /opt/microservices
cd /opt/microservices
git clone https://github.com/Islandora-CLAW/Crayfish.git
git clone https://github.com/Islandora-CLAW/pdx.git

cp "$HOME_DIR/islandora/install/configs/001-microservices.conf" "/etc/apache2/sites-enabled/"

Expand All @@ -17,22 +20,11 @@ fi

/etc/init.d/apache2 restart

cp "$HOME_DIR/islandora/install/scripts/align_branches.sh" "/opt/islandora/services"
cd /opt/islandora/services
./align_branches.sh
cp "/opt/islandora/services/config/example.settings.yml" "/opt/islandora/services/config/settings.dev.yml"

cp "$HOME_DIR/islandora/install/composer-setup.php" "/opt/islandora/services"
cp "$HOME_DIR/islandora/install/composer.sha384sum" "/opt/islandora/services"
cd "/opt/islandora/services"

sha384sum -c composer.sha384sum
if [ "$?" != "0" ]; then
echo "Composer-setup.php did not match the expected SHA-384 hash, did you update the version of composer and not the stored hash?"
exit
fi

php composer-setup.php
php -r "unlink('composer-setup.php');"
php composer.phar update
cp "/opt/microservices/Crayfish/config/example.settings.yml" "/opt/microservices/Crayfish/config/settings.dev.yml"
cd "/opt/microservices/Crayfish"
composer update
cp "/opt/microservices/pdx/config/example.settings.yml" "/opt/microservices/pdx/config/settings.dev.yml"
cd "/opt/microservices/pdx"
composer update

chown -hR vagrant:vagrant /opt/microservices

0 comments on commit 49c9373

Please sign in to comment.