From 07849b9b13107fc2199ead788d89128131d8725f Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Tue, 18 Apr 2017 16:58:55 +0300 Subject: [PATCH] Add notes for 2017-04-18 --- content/post/2017-04.md | 22 ++++++++++++++++++++++ public/2017-04/index.html | 32 +++++++++++++++++++++++++++++--- public/sitemap.xml | 10 +++++----- 3 files changed, 56 insertions(+), 8 deletions(-) diff --git a/content/post/2017-04.md b/content/post/2017-04.md index 35237b17c..52099a350 100644 --- a/content/post/2017-04.md +++ b/content/post/2017-04.md @@ -216,3 +216,25 @@ sys 1m29.310s Error: ERROR: update or delete on table "bitstream" violates foreign key constraint "bundle_primary_bitstream_id_fkey" on table "bundle" Detail: Key (bitstream_id)=(435) is still referenced from table "bundle". ``` + +## 2017-04-18 + +- Helping Tsega test his new [CGSpace REST API Rails app](https://github.com/ilri/ckm-cgspace-rest-api) on DSpace Test +- Setup and run with: + +``` +$ git clone https://github.com/ilri/ckm-cgspace-rest-api.git +$ cd ckm-cgspace-rest-api/app +$ gem install bundler +$ bundle +$ cd .. +$ rails -s +``` + +- I used Ansible to create a PostgreSQL user that only has `SELECT` privileges on the tables it needs: + +``` +$ ansible linode02 -u aorth -b --become-user=postgres -K -m postgresql_user -a 'db=database name=username password=password priv=CONNECT/item:SELECT/metadatavalue:SELECT/metadatafieldregistry:SELECT/metadataschemaregistry:SELECT/collection:SELECT/handle:SELECT/bundle2bitstream:SELECT/bitstream:SELECT/bundle:SELECT/item2bundle:SELECT state=present +``` + +- Need to look into [running this via systemd](https://github.com/puma/puma/blob/master/docs/systemd.md) diff --git a/public/2017-04/index.html b/public/2017-04/index.html index b6bf3dd58..d2aebe3cc 100644 --- a/public/2017-04/index.html +++ b/public/2017-04/index.html @@ -30,7 +30,7 @@ $ [dspace]/bin/dspace filter-media -f -i 10568/16498 -p "ImageMagick PDF Th - + @@ -79,9 +79,9 @@ $ [dspace]/bin/dspace filter-media -f -i 10568/16498 -p "ImageMagick PDF Th "@type": "BlogPosting", "headline": "April, 2017", "url": "https://alanorth.github.io/cgspace-notes/2017-04/", - "wordCount": "1555", + "wordCount": "1634", "datePublished": "2017-04-02T17:08:52+02:00", - "dateModified": "2017-04-17T14:34:59+03:00", + "dateModified": "2017-04-17T15:01:57+03:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -410,6 +410,32 @@ sys 1m29.310s Detail: Key (bitstream_id)=(435) is still referenced from table "bundle". +

2017-04-18

+ + + +
$ git clone https://github.com/ilri/ckm-cgspace-rest-api.git
+$ cd ckm-cgspace-rest-api/app
+$ gem install bundler
+$ bundle
+$ cd ..
+$ rails -s
+
+ + + +
$ ansible linode02 -u aorth -b --become-user=postgres -K -m postgresql_user -a 'db=database name=username password=password priv=CONNECT/item:SELECT/metadatavalue:SELECT/metadatafieldregistry:SELECT/metadataschemaregistry:SELECT/collection:SELECT/handle:SELECT/bundle2bitstream:SELECT/bitstream:SELECT/bundle:SELECT/item2bundle:SELECT state=present
+
+ + + diff --git a/public/sitemap.xml b/public/sitemap.xml index ca45cabed..64852d4e2 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -3,7 +3,7 @@ https://alanorth.github.io/cgspace-notes/2017-04/ - 2017-04-17T14:34:59+03:00 + 2017-04-17T15:01:57+03:00 @@ -93,7 +93,7 @@ https://alanorth.github.io/cgspace-notes/ - 2017-04-17T14:34:59+03:00 + 2017-04-17T15:01:57+03:00 0 @@ -104,19 +104,19 @@ https://alanorth.github.io/cgspace-notes/tags/notes/ - 2017-04-17T14:34:59+03:00 + 2017-04-17T15:01:57+03:00 0 https://alanorth.github.io/cgspace-notes/post/ - 2017-04-17T14:34:59+03:00 + 2017-04-17T15:01:57+03:00 0 https://alanorth.github.io/cgspace-notes/tags/ - 2017-04-17T14:34:59+03:00 + 2017-04-17T15:01:57+03:00 0