Skip to content

Commit

Permalink
More changes from testing. Setting up aliases.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannylamb committed Jan 3, 2017
1 parent fae3772 commit 6869c0c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 68 deletions.
1 change: 0 additions & 1 deletion install/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision :shell, :path => "./scripts/loris.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/composer.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/drupal.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/drupal-console.sh", :args => home_dir, :privileged => false
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/karaf.sh", :args => home_dir
Expand Down
2 changes: 2 additions & 0 deletions install/configs/variables
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ SOLR_VERSION=6.2.1
BLAZEGRAPH_VERSION=2.1.4
DRUPAL_HOME="/var/www/html/drupal"
DRUPAL_VERSION=8.2.2
DRUSH_CMD="$DRUPAL_HOME/vendor/drush/drush/drush -r $DRUPAL_HOME/web"
DRUPAL_CMD="$DRUPAL_HOME/vendor/drupal/console/bin/drupal --root=$DRUPAL_HOME/web"
FITS_VERSION=1.0.3
FITS_WS_VERSION=1.1.3
MYSQL_USER=root
Expand Down
99 changes: 33 additions & 66 deletions install/scripts/drupal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,32 @@ fi
cd "$HOME_DIR"

# Drush and drupal deps
apt-get -y -qq install php7.0-gd php7.0-xml php7.0-mysql php7.0-curl php7.0-json php-stomp
cd /tmp && wget http://files.drush.org/drush.phar
chmod +x drush.phar
mv drush.phar /usr/local/bin/drush
apt-get -y -qq install php7.0-gd php7.0-xml php7.0-mysql php7.0-curl php7.0-json
a2enmod rewrite
service apache2 reload
cd /var/www/html

# Download Drupal
drush dl drupal-"$DRUPAL_VERSION" --drupal-project-rename=drupal
git clone https://github.com/Islandora-CLAW/drupal-project drupal
cd "$DRUPAL_HOME"
composer install

# Permissions
chown -R www-data:www-data drupal
chmod -R g+w drupal
# Setup drush and drupal console aliases
touch "$HOME_DIR/.bash_aliases"
echo "alias drush=\"$DRUSH_CMD\"" >> "$HOME_DIR/.bash_aliases"
echo "alias drupal=\"$DRUPAL_CMD\"" >> "$HOME_DIR/.bash_aliases"

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

# Set document root
sed -i 's|DocumentRoot /var/www/html$|DocumentRoot /var/www/html/drupal|' /etc/apache2/sites-enabled/000-default.conf
sed -i 's|DocumentRoot /var/www/html$|DocumentRoot /var/www/html/drupal/web|' /etc/apache2/sites-enabled/000-default.conf

# Set override for drupal directory
# TODO Don't do this in main apache conf
sed -i '$i<Directory /var/www/html/drupal>' /etc/apache2/apache2.conf
sed -i '$i<Directory /var/www/html/drupal/web>' /etc/apache2/apache2.conf
sed -i '$i\\tOptions Indexes FollowSymLinks' /etc/apache2/apache2.conf
sed -i '$i\\tAllowOverride All' /etc/apache2/apache2.conf
sed -i '$i\\tRequire all granted' /etc/apache2/apache2.conf
Expand All @@ -46,7 +46,7 @@ sed -i '$i</Directory>' /etc/apache2/apache2.conf
rm /var/www/html/index.html

## Trusted Host Settings
cat >> "$DRUPAL_HOME"/sites/default/settings.php <<EOF
cat >> "$DRUPAL_HOME"/web/sites/default/settings.php <<EOF
\$settings['trusted_host_patterns'] = array(
'^localhost$',
);
Expand All @@ -56,74 +56,41 @@ EOF
service apache2 restart

#Enable Core modules
drush en -y rdf
drush en -y responsive_image
drush en -y syslog
drush en -y serialization
drush en -y basic_auth
drush en -y rest
$DRUSH_CMD en -y rdf
$DRUSH_CMD en -y responsive_image
$DRUSH_CMD en -y syslog
$DRUSH_CMD en -y serialization
$DRUSH_CMD en -y basic_auth
$DRUSH_CMD en -y rest

# Islandora dependencies

# Typed Data
drush dl typed_data
drush en -y typed_data

# Rules
drush dl rules
drush en -y rules

# RDF UI
drush dl rdfui --dev
drush en -y rdfui
drush en -y rdf_builder

# REST UI
drush dl restui
drush en -y restui

# Inline entity form
drush dl inline_entity_form
drush en -y inline_entity_form
$DRUSH_CMD en -y restui

# Media entity ecosystem
drush dl media_entity
drush en -y media_entity
$DRUSH_CMD en -y media_entity

drush dl media_entity_image
drush en -y media_entity_image
$DRUSH_CMD en -y media_entity_image

# Devel
drush dl devel
drush -y en devel
$DRUSH_CMD -y en devel

# Web Profiler
drush dl webprofiler
drush en -y webprofiler
$DRUSH_CMD en -y webprofiler

# Apache Solr
## https://www.drupal.org/node/2613470
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
$DRUSH_CMD -y pm-uninstall search
$DRUSH_CMD en -y search_api

cd "$DRUPAL_HOME/modules"
git clone https://github.com/DiegoPino/claw-jsonld.git
drush en -y jsonld

git clone https://github.com/Islandora-CLAW/islandora.git
drush en -y islandora
$DRUSH_CMD en -y islandora
$DRUSH_CMD en -y islandora_collection

# Set default theme to bootstrap
drush -y dl bootstrap
drush -y en bootstrap
drush -y config-set system.theme default bootstrap
$DRUSH_CMD -y en bootstrap
$DRUSH_CMD -y config-set system.theme default bootstrap

# Permissions
cd /var/www/html
chown -R www-data:www-data drupal
chmod -R g+w drupal
chown -R www-data:www-data "$DRUPAL_HOME"
chmod -R g+w "$DRUPAL_HOME"
2 changes: 1 addition & 1 deletion install/scripts/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ service karaf-service restart
sleep 60

# Clear drupal cache
drush -r "$DRUPAL_HOME" cache-rebuild
$DRUSH_CMD cache-rebuild

0 comments on commit 6869c0c

Please sign in to comment.