Add notes for 2017-04-18

This commit is contained in:
Alan Orth 2017-04-18 16:58:55 +03:00
parent 650630e650
commit 07849b9b13
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
3 changed files with 56 additions and 8 deletions

View File

@ -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" 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". 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)

View File

@ -30,7 +30,7 @@ $ [dspace]/bin/dspace filter-media -f -i 10568/16498 -p "ImageMagick PDF Th
<meta property="article:published_time" content="2017-04-02T17:08:52&#43;02:00"/> <meta property="article:published_time" content="2017-04-02T17:08:52&#43;02:00"/>
<meta property="article:modified_time" content="2017-04-17T14:34:59&#43;03:00"/> <meta property="article:modified_time" content="2017-04-17T15:01:57&#43;03:00"/>
@ -79,9 +79,9 @@ $ [dspace]/bin/dspace filter-media -f -i 10568/16498 -p &quot;ImageMagick PDF Th
"@type": "BlogPosting", "@type": "BlogPosting",
"headline": "April, 2017", "headline": "April, 2017",
"url": "https://alanorth.github.io/cgspace-notes/2017-04/", "url": "https://alanorth.github.io/cgspace-notes/2017-04/",
"wordCount": "1555", "wordCount": "1634",
"datePublished": "2017-04-02T17:08:52&#43;02:00", "datePublished": "2017-04-02T17:08:52&#43;02:00",
"dateModified": "2017-04-17T14:34:59&#43;03:00", "dateModified": "2017-04-17T15:01:57&#43;03:00",
"author": { "author": {
"@type": "Person", "@type": "Person",
"name": "Alan Orth" "name": "Alan Orth"
@ -410,6 +410,32 @@ sys 1m29.310s
Detail: Key (bitstream_id)=(435) is still referenced from table &quot;bundle&quot;. Detail: Key (bitstream_id)=(435) is still referenced from table &quot;bundle&quot;.
</code></pre> </code></pre>
<h2 id="2017-04-18">2017-04-18</h2>
<ul>
<li>Helping Tsega test his new <a href="https://github.com/ilri/ckm-cgspace-rest-api">CGSpace REST API Rails app</a> on DSpace Test</li>
<li>Setup and run with:</li>
</ul>
<pre><code>$ git clone https://github.com/ilri/ckm-cgspace-rest-api.git
$ cd ckm-cgspace-rest-api/app
$ gem install bundler
$ bundle
$ cd ..
$ rails -s
</code></pre>
<ul>
<li>I used Ansible to create a PostgreSQL user that only has <code>SELECT</code> privileges on the tables it needs:</li>
</ul>
<pre><code>$ 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
</code></pre>
<ul>
<li>Need to look into <a href="https://github.com/puma/puma/blob/master/docs/systemd.md">running this via systemd</a></li>
</ul>

View File

@ -3,7 +3,7 @@
<url> <url>
<loc>https://alanorth.github.io/cgspace-notes/2017-04/</loc> <loc>https://alanorth.github.io/cgspace-notes/2017-04/</loc>
<lastmod>2017-04-17T14:34:59+03:00</lastmod> <lastmod>2017-04-17T15:01:57+03:00</lastmod>
</url> </url>
<url> <url>
@ -93,7 +93,7 @@
<url> <url>
<loc>https://alanorth.github.io/cgspace-notes/</loc> <loc>https://alanorth.github.io/cgspace-notes/</loc>
<lastmod>2017-04-17T14:34:59+03:00</lastmod> <lastmod>2017-04-17T15:01:57+03:00</lastmod>
<priority>0</priority> <priority>0</priority>
</url> </url>
@ -104,19 +104,19 @@
<url> <url>
<loc>https://alanorth.github.io/cgspace-notes/tags/notes/</loc> <loc>https://alanorth.github.io/cgspace-notes/tags/notes/</loc>
<lastmod>2017-04-17T14:34:59+03:00</lastmod> <lastmod>2017-04-17T15:01:57+03:00</lastmod>
<priority>0</priority> <priority>0</priority>
</url> </url>
<url> <url>
<loc>https://alanorth.github.io/cgspace-notes/post/</loc> <loc>https://alanorth.github.io/cgspace-notes/post/</loc>
<lastmod>2017-04-17T14:34:59+03:00</lastmod> <lastmod>2017-04-17T15:01:57+03:00</lastmod>
<priority>0</priority> <priority>0</priority>
</url> </url>
<url> <url>
<loc>https://alanorth.github.io/cgspace-notes/tags/</loc> <loc>https://alanorth.github.io/cgspace-notes/tags/</loc>
<lastmod>2017-04-17T14:34:59+03:00</lastmod> <lastmod>2017-04-17T15:01:57+03:00</lastmod>
<priority>0</priority> <priority>0</priority>
</url> </url>