This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt install make | |
cd /opt | |
git clone https://github.com/islandora-devops/isle-dc.git | |
cd isle-dc | |
cp sample.env .env | |
IP=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address | sed 's/\./-/g') | |
sed -i "s/DOMAIN=.*/DOMAIN=$IP.traefik.me/g" .env | |
make demo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ubuntu@claw:/var/www/html/drupal/web/modules/contrib/islandora$ drupal config:override | |
Enter configuration name [at_core.settings]: | |
> system.file | |
Enter the configuration key [allow_insecure_uploads]: | |
> temporary_maximum_age | |
Enter the configuration value: | |
> 1 | |
Configuration name system.file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
service karaf stop | |
# Back up the data directoyr just in case | |
tar -czvf ~/data.tar.gz /opt/karaf/data | |
rm -rf /opt/karaf/data/* | |
# Temporarily move out the blueprint files and sed them to use | |
# 'broker' instead of 'activemq' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
set -euxo pipefail | |
COLLECTION_NID=`curl -sSf -X POST -u changeme:changeme -H "Content-Type: application/json" -d "{\"title\": [\"Christian Martyrdom\"], \"type\": \"islandora_object\", \"field_model\": [30]}" http://future.islandora.ca/entity/node?_format=json | jq -re '.nid[0].value'` | |
for file in *.jpg; do | |
PAGE_NID=`curl -sSf -X POST -u changeme:changeme -H "Content-Type: application/json" -d "{\"title\": [\"$file\"], \"type\": \"islandora_object\", \"field_member_of\": [$COLLECTION_NID], \"field_model\": [31]}" http://future.islandora.ca/entity/node?_format=json | jq -re '.nid[0].value'` | |
curl -sSf -X PUT -u changeme:changeme -H "Content-Type: image/jpeg" -H "Content-Location: fedora://2020-04/$file" --data-binary @"$file" "http://future.islandora.ca/node/$PAGE_NID/media/image/16" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Update drupal core | |
cd /var/www/html/drupal | |
composer -n update drupal/core webflo/drupal-core-require-dev "symfony/*" --with-dependencies | |
# Update islandora dependencies in composer.json | |
sed -i 's/"islandora\/islandora_defaults": "1.0.0"/"islandora\/islandora_defaults": "1.1.0"/' composer.json | |
sed -i 's/"islandora\/openseadragon": "1.0.0"/"islandora\/openseadragon": "1.1.0"/' composer.json | |
sed -i 's/"islandora\/carapace": "1.0.0"/"islandora\/carapace": "3.0.0"/' composer.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -RiIl 'PasswordAuthentication no' /etc/ssh/sshd_config | xargs sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' | |
service ssh restart | |
grep -RiIl "$1" /var/www | xargs sed -i "s/$1/$2/g" | |
grep -RiIl "$1" /opt | xargs sed -i "s/$1/$2/g" | |
cd /var/www/html/drupal | |
drush -y cset --input-format=yaml islandora.settings gemini_url "http://$2:80/gemini" | |
drush -y cset --input-format=yaml islandora_iiif.settings iiif_server "http://$2:8080/cantaloupe/iiif/2" | |
drush -y cset --input-format=yaml openseadragon.settings iiif_server "http://$2:8080/cantaloupe/iiif/2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ur inventory/vagrant/group_vars/all/passwords.yml inventory/sandbox/group_vars/all/passwords.yml | |
--- inventory/vagrant/group_vars/all/passwords.yml 2019-10-31 11:28:11.975058891 -0300 | |
+++ inventory/sandbox/group_vars/all/passwords.yml 2019-11-19 11:47:22.435840282 -0400 | |
@@ -1,20 +1,20 @@ | |
--- | |
# Drupal | |
-drupal_db_password: islandora | |
-drupal_account_pass: islandora | |
+drupal_db_password: ChangeMe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$filesystem = \Drupal::service('flysystem_factory')->getFilesystem('mydrive'); | |
$file_storage = \Drupal::service('entity_type.manager')->getStorage('file'); | |
$mime_guesser = \Drupal::service('file.mime_type.guesser'); | |
foreach($filesystem->listContents('/path/to/your/stuff') as $info) { | |
$mime = $mime_guesser->guess($info['path']); | |
$file = $file_storage->create([ | |
'uid' => 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uuid: 017ab87a-6b33-4bc4-85dd-2628db6768f9 | |
langcode: en | |
status: true | |
dependencies: | |
config: | |
- field.storage.media.field_media_file | |
- taxonomy.vocabulary.islandora_media_use | |
content: | |
- 'taxonomy_term:islandora_media_use:bf0edc29-aec8-430b-bfe9-e07715bffed0' | |
module: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
daniel@daniel-Latitude-3560:~/Code/Environments/claw-playbook$ diff -ENwbur inventory/vagrant inventory/sandbox | |
diff -ENwbur inventory/vagrant/group_vars/all/passwords.yml inventory/sandbox/group_vars/all/passwords.yml | |
--- inventory/vagrant/group_vars/all/passwords.yml 2018-02-05 09:50:58.353953059 -0400 | |
+++ inventory/sandbox/group_vars/all/passwords.yml 2018-10-29 12:14:03.275311691 -0300 | |
@@ -1,17 +1,17 @@ | |
--- | |
# Drupal | |
-drupal_db_password: islandora | |
-drupal_account_pass: islandora |
NewerOlder