Skip to content

Commit

Permalink
Merge pull request #286 from ruebot/drupal8
Browse files Browse the repository at this point in the history
First pass at #285; Update vagrant to use Drupal 8, and remove all Dr…
whikloj authored Jun 20, 2016
2 parents f4f37c4 + 64409c6 commit fe5136c
Showing 6 changed files with 103 additions and 59 deletions.
3 changes: 2 additions & 1 deletion install/Vagrantfile
Original file line number Diff line number Diff line change
@@ -70,11 +70,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision :shell, :path => "./scripts/bootstrap.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/lamp-server.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/solr.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/composer.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/twigcextensions.sh", :args => home_dir
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/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
5 changes: 0 additions & 5 deletions install/configs/add_default_fields.php

This file was deleted.

2 changes: 1 addition & 1 deletion install/scripts/composer.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
echo "Installing Composer"

apt-get install -y php5.6-mbstring
apt-get install -y php5.6-mbstring php5.6-dev
curl -sS https://getcomposer.org/installer | php
php composer.phar install --no-progress
mv composer.phar /usr/local/bin/composer
134 changes: 87 additions & 47 deletions install/scripts/drupal.sh
Original file line number Diff line number Diff line change
@@ -20,15 +20,15 @@ service apache2 reload
cd /var/www/html

# Download Drupal
drush dl drupal-7 --drupal-project-rename=drupal
drush dl drupal-8 --drupal-project-rename=drupal

# Permissions
chown -R www-data:www-data drupal
chmod -R g+w drupal

# Do the install
cd "$DRUPAL_HOME"
drush si -y --db-url=mysql://root:islandora@localhost/drupal7 --site-name=Islandora-7.x-2.x
drush si -y --db-url=mysql://root:islandora@localhost/drupal8 --site-name=Islandora-CLAW
drush user-password admin --password=islandora

# Set document root
@@ -45,69 +45,109 @@ sed -i '$i</Directory>' /etc/apache2/apache2.conf
# Torch the default index.html
rm /var/www/html/index.html

# Cycle apache
service apache2 restart
## Trusted Host Settings
cat >> "$DRUPAL_HOME"/sites/default/settings.php <<EOF
\$settings['trusted_host_patterns'] = array(
'^localhost$',
);
EOF

# Make the modules and libraries directories
if [ ! -d "$DRUPAL_HOME/sites/all/modules" ]; then
mkdir "$DRUPAL_HOME/sites/all/modules"
fi
## The always_populate_raw_post_data PHP setting should be set to -1 in PHP version 5.6
sed -i 's|#;always_populate_raw_post_data = -1|always_populate_raw_post_data = -1|g' /etc/php/5.6/apache2/php.ini
sed -i 's|#;always_populate_raw_post_data = -1|always_populate_raw_post_data = -1|g' /etc/php/5.6/cli/php.ini

if [ ! -d "$DRUPAL_HOME/sites/all/libraries" ]; then
mkdir "$DRUPAL_HOME/sites/all/libraries"
fi
# Cycle apache
service apache2 restart

cd "$DRUPAL_HOME/sites/all/modules"
#Enable Core modules
drush en -y responsive_image
drush en -y syslog
drush en -y serialization
drush en -y basic_auth
drush en -y rest

# Islandora dependencies
drush dl httprl
## HAS NOT BEEN PORTED TO DRUPAL 8
#drush dl httprl

## Drupal 8 Alpha
drush dl services
drush dl field_permissions
drush dl field_readonly
drush dl views
drush dl rdfx
drush -y en services

## Drupal 8 Alpha
drush dl libraries
drush -y en libraries

## HAS NOT BEEN PORTED TO DRUPAL 8
#drush dl field_permissions

## HAS NOT BEEN PORTED TO DRUPAL 8
#drush dl field_readonly

## INCLUDED IN DRUPAL CORE
#drush dl views

## HAS NOT BEEN PORTED TO DRUPAL 8
#drush dl rdfx

## Drupal 8 Alpha
drush dl entity
drush dl uuid
drush dl xml_field
drush dl jquery_update
git clone https://github.com/Islandora-Labs/xpath_field.git
drush -y en entity

## HAS NOT BEEN PORTED TO DRUPAL 8
#drush dl uuid

## HAS NOT BEEN PORTED TO DRUPAL 8
#drush dl xml_field

## INCLUDED IN DRUPAL CORE
#drush dl jquery_update

#git clone https://github.com/Islandora-Labs/xpath_field.git

## Drupal 8 Beta
drush dl hook_post_action
drush -y en hook_post_action

# Devel!
# Devel
## Drupal 8 Alpha
drush dl devel
drush -y en devel

# Undocumented dependency for rdfx on ARC2 for RDF generation, and spyc.
cd "$DRUPAL_HOME/sites/all/libraries"
git clone https://github.com/mustangostang/spyc.git
mkdir ARC2
cd ARC2
git clone https://github.com/semsol/arc2.git
mv arc2 arc
cd "$DRUPAL_HOME/sites/all/modules"
#cd "$DRUPAL_HOME/sites/all/libraries"
#git clone https://github.com/mustangostang/spyc.git
#mkdir ARC2
#cd ARC2
#git clone https://github.com/semsol/arc2.git
#mv arc2 arc
#cd "$DRUPAL_HOME/sites/all/modules"

# Apache Solr
drush dl apachesolr
drush en -y apachesolr
## https://www.drupal.org/node/2613470
#drush dl apachesolr
#drush en -y apachesolr
drush dl search_api
drush -y pm-uninstall search
drush en -y search_api

# Copy new schema files and restart Tomcat
cp -a "$DRUPAL_HOME"/sites/all/modules/apachesolr/solr-conf/solr-4.x/. "$SOLR_HOME"/collection1/conf/
service tomcat7 restart

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
drush -y en islandora_basic_image
drush -y en islandora_collection
drush -y en islandora_apachesolr
drush -y en islandora_delete_by_fedora_uri_service
drush -y en islandora_medium_size_service
drush -y en islandora_tn_service
#cp -a "$DRUPAL_HOME"/sites/all/modules/apachesolr/solr-conf/solr-4.x/. "$SOLR_HOME"/collection1/conf/
#service tomcat7 restart

#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
#drush -y en islandora_basic_image
#drush -y en islandora_collection
#drush -y en islandora_apachesolr
#drush -y en islandora_delete_by_fedora_uri_service
#drush -y en islandora_medium_size_service
#drush -y en islandora_tn_service

# Set default theme to bootstrap
cd "$DRUPAL_HOME/sites/all/themes"
drush -y dl bootstrap
drush -y en bootstrap
drush vset theme_default bootstrap
drush -y config-set system.theme default bootstrap
7 changes: 2 additions & 5 deletions install/scripts/post-install.sh
Original file line number Diff line number Diff line change
@@ -28,8 +28,5 @@ sleep 60
$KARAF_CLIENT -f $KARAF_CONFIGS/watch.script

# Fix ApacheSolr config
drush -r "$DRUPAL_HOME" sqlq "update apachesolr_environment set url='http://localhost:8080/solr' where url='http://localhost:8983/solr'"
drush -r "$DRUPAL_HOME" cc all

# Add DC as some default fields for folks.
drush -r "$DRUPAL_HOME" scr "$HOME_DIR"/islandora/install/configs/add_default_fields.php
#drush -r "$DRUPAL_HOME" sqlq "update apachesolr_environment set url='http://localhost:8080/solr' where url='http://localhost:8983/solr'"
#drush -r "$DRUPAL_HOME" cc all
11 changes: 11 additions & 0 deletions install/scripts/twigcextensions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
echo " Installing Twig C extentions"
cd /home/vagrant
composer require twig/twig:~1.0
cd /home/vagrant/vendor/twig/twig/ext/twig
phpize
./configure
make
make install
sed -i '$iextension=/usr/lib/php/20131226/twig.so' /etc/php/5.6/apache2/php.ini

0 comments on commit fe5136c

Please sign in to comment.