From bcef5d32dadb4826e73be34292e21c69853b5e4e Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Fri, 2 Sep 2016 11:44:44 +0300 Subject: [PATCH] Add notes for 2016-09-01 --- content/2016-09.md | 37 ++++++++ public/2016-08/index.html | 2 +- public/2016-09/index.html | 168 +++++++++++++++++++++++++++++++++++ public/index.html | 62 +++++++------ public/index.xml | 45 +++++++++- public/page/2/index.html | 126 ++++++++++++++++++++++++++ public/sitemap.xml | 7 +- public/tags/index.html | 2 +- public/tags/notes/index.html | 26 ++++++ public/tags/notes/index.xml | 45 +++++++++- 10 files changed, 486 insertions(+), 34 deletions(-) create mode 100644 content/2016-09.md create mode 100644 public/2016-09/index.html create mode 100644 public/page/2/index.html diff --git a/content/2016-09.md b/content/2016-09.md new file mode 100644 index 000000000..47fd79508 --- /dev/null +++ b/content/2016-09.md @@ -0,0 +1,37 @@ ++++ +date = "2016-09-01T15:53:00+03:00" +author = "Alan Orth" +title = "September, 2016" +tags = ["notes"] +image = "../images/bg.jpg" + ++++ +## 2016-09-01 + +- Discuss helping CCAFS with some batch tagging of ORCID IDs for their authors +- Discuss how the migration of CGIAR's Active Directory to a flat structure will break our LDAP groups in DSpace +- We had been using `DC=ILRI` to determine whether a user was ILRI or not +- It looks like we might be able to use OUs now, instead of DCs: + +``` +$ ldapsearch -x -H ldaps://svcgroot2.cgiarad.org:3269/ -b "dc=cgiarad,dc=org" -D "admigration1@cgiarad.org" -W "(sAMAccountName=admigration1)" +``` + +- User who has been migrated to the root vs user still in the hierarchical structure: + +``` +distinguishedName: CN=Last\, First (ILRI),OU=ILRI Kenya Employees,OU=ILRI Kenya,OU=ILRIHUB,DC=CGIARAD,DC=ORG +distinguishedName: CN=Last\, First (ILRI),OU=ILRI Ethiopia Employees,OU=ILRI Ethiopia,DC=ILRI,DC=CGIARAD,DC=ORG +``` + +- Notes for local PostgreSQL database recreation from production snapshot: + +``` +$ dropdb dspacetest +$ createdb -O dspacetest --encoding=UNICODE dspacetest +$ psql dspacetest -c 'alter user dspacetest createuser;' +$ pg_restore -O -U dspacetest -d dspacetest ~/Downloads/cgspace_2016-09-01.backup +$ psql dspacetest -c 'alter user dspacetest nocreateuser;' +$ psql -U dspacetest -f ~/src/git/DSpace/dspace/etc/postgres/update-sequences.sql dspacetest -h localhost +$ vacuumdb dspacetest +``` diff --git a/public/2016-08/index.html b/public/2016-08/index.html index b57153ecd..e6c5c4806 100644 --- a/public/2016-08/index.html +++ b/public/2016-08/index.html @@ -424,7 +424,7 @@ $ JAVA_OPTS="-Dfile.encoding=UTF-8 -Xmx512m" /home/cgspace.cgiar.org/b - + diff --git a/public/2016-09/index.html b/public/2016-09/index.html new file mode 100644 index 000000000..a4ac16a46 --- /dev/null +++ b/public/2016-09/index.html @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + September, 2016 · CGSpace Notes + + + + + + + + + + + + + +
+ + +
+
+

September, 2016

+ +
+
+ + +

2016-09-01

+ +
    +
  • Discuss helping CCAFS with some batch tagging of ORCID IDs for their authors
  • +
  • Discuss how the migration of CGIAR’s Active Directory to a flat structure will break our LDAP groups in DSpace
  • +
  • We had been using DC=ILRI to determine whether a user was ILRI or not
  • +
  • It looks like we might be able to use OUs now, instead of DCs:
  • +
+ +
$ ldapsearch -x -H ldaps://svcgroot2.cgiarad.org:3269/ -b "dc=cgiarad,dc=org" -D "admigration1@cgiarad.org" -W "(sAMAccountName=admigration1)"
+
+ +
    +
  • User who has been migrated to the root vs user still in the hierarchical structure:
  • +
+ +
distinguishedName: CN=Last\, First (ILRI),OU=ILRI Kenya Employees,OU=ILRI Kenya,OU=ILRIHUB,DC=CGIARAD,DC=ORG
+distinguishedName: CN=Last\, First (ILRI),OU=ILRI Ethiopia Employees,OU=ILRI Ethiopia,DC=ILRI,DC=CGIARAD,DC=ORG
+
+ +
    +
  • Notes for local PostgreSQL database recreation from production snapshot:
  • +
+ +
$ dropdb dspacetest
+$ createdb -O dspacetest --encoding=UNICODE dspacetest
+$ psql dspacetest -c 'alter user dspacetest createuser;'
+$ pg_restore -O -U dspacetest -d dspacetest ~/Downloads/cgspace_2016-09-01.backup
+$ psql dspacetest -c 'alter user dspacetest nocreateuser;'
+$ psql -U dspacetest -f ~/src/git/DSpace/dspace/etc/postgres/update-sequences.sql dspacetest -h localhost
+$ vacuumdb dspacetest
+
+ +
+ +
+ +
+ + + + + + + + + diff --git a/public/index.html b/public/index.html index 7bbeb6672..0909a6033 100644 --- a/public/index.html +++ b/public/index.html @@ -58,6 +58,34 @@
+
+
+

September, 2016

+ +
+
+ 2016-09-01 Discuss helping CCAFS with some batch tagging of ORCID IDs for their authors Discuss how the migration of CGIAR’s Active Directory to a flat structure will break our LDAP groups in DSpace We had been using DC=ILRI to determine whether a user was ILRI or not It looks like we might be able to use OUs now, instead of DCs: $ ldapsearch -x -H ldaps://svcgroot2.cgiarad.org:3269/ -b "dc=cgiarad,dc=org" -D "admigration1@cgiarad.org" +
+ + + +
+ + + +
+ - -
- -
-
-

November, 2015

- -
-
- 2015-11-22 CGSpace went down Looks like DSpace exhausted its PostgreSQL connection pool Last week I had increased the limit from 30 to 60, which seemed to help, but now there are many more idle connections: $ psql -c 'SELECT * from pg_stat_activity;' | grep idle | grep -c cgspace 78 For now I have increased the limit from 60 to 90, run updates, and rebooted the server 2015-11-24 CGSpace went down again Getting emails from uptimeRobot and uptimeButler that it’s down, and Google Webmaster Tools is sending emails that there is an increase in crawl errors Looks like there are still a bunch of idle PostgreSQL connections: $ psql -c 'SELECT * from pg_stat_activity;' | grep idle | grep -c cgspace 96 For some reason the number of idle connections is very high since we upgraded to DSpace 5 2015-11-25 Troubleshoot the DSpace 5 OAI breakage caused by nginx routing config The OAI application requests stylesheets and javascript files with the path /oai/static/css, which gets matched here: # static assets we can load from the file system directly with nginx location ~ /(themes|static|aspects/ReportingSuite) { try_files $uri @tomcat; ... -
- - - -
- -
diff --git a/public/index.xml b/public/index.xml index 649d7d1e3..d61e235df 100644 --- a/public/index.xml +++ b/public/index.xml @@ -6,9 +6,52 @@ Recent content on CGSpace Notes Hugo -- gohugo.io en-us - Mon, 01 Aug 2016 15:53:00 +0300 + Thu, 01 Sep 2016 15:53:00 +0300 + + September, 2016 + https://alanorth.github.io/cgspace-notes/2016-09/ + Thu, 01 Sep 2016 15:53:00 +0300 + + https://alanorth.github.io/cgspace-notes/2016-09/ + + +<h2 id="2016-09-01">2016-09-01</h2> + +<ul> +<li>Discuss helping CCAFS with some batch tagging of ORCID IDs for their authors</li> +<li>Discuss how the migration of CGIAR&rsquo;s Active Directory to a flat structure will break our LDAP groups in DSpace</li> +<li>We had been using <code>DC=ILRI</code> to determine whether a user was ILRI or not</li> +<li>It looks like we might be able to use OUs now, instead of DCs:</li> +</ul> + +<pre><code>$ ldapsearch -x -H ldaps://svcgroot2.cgiarad.org:3269/ -b &quot;dc=cgiarad,dc=org&quot; -D &quot;admigration1@cgiarad.org&quot; -W &quot;(sAMAccountName=admigration1)&quot; +</code></pre> + +<ul> +<li>User who has been migrated to the root vs user still in the hierarchical structure:</li> +</ul> + +<pre><code>distinguishedName: CN=Last\, First (ILRI),OU=ILRI Kenya Employees,OU=ILRI Kenya,OU=ILRIHUB,DC=CGIARAD,DC=ORG +distinguishedName: CN=Last\, First (ILRI),OU=ILRI Ethiopia Employees,OU=ILRI Ethiopia,DC=ILRI,DC=CGIARAD,DC=ORG +</code></pre> + +<ul> +<li>Notes for local PostgreSQL database recreation from production snapshot:</li> +</ul> + +<pre><code>$ dropdb dspacetest +$ createdb -O dspacetest --encoding=UNICODE dspacetest +$ psql dspacetest -c 'alter user dspacetest createuser;' +$ pg_restore -O -U dspacetest -d dspacetest ~/Downloads/cgspace_2016-09-01.backup +$ psql dspacetest -c 'alter user dspacetest nocreateuser;' +$ psql -U dspacetest -f ~/src/git/DSpace/dspace/etc/postgres/update-sequences.sql dspacetest -h localhost +$ vacuumdb dspacetest +</code></pre> + + + August, 2016 https://alanorth.github.io/cgspace-notes/2016-08/ diff --git a/public/page/2/index.html b/public/page/2/index.html new file mode 100644 index 000000000..017cd77cc --- /dev/null +++ b/public/page/2/index.html @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + CGSpace Notes + + + + + + + + + + + + + + + +
+ +
+ + +
+
+

November, 2015

+ +
+
+ 2015-11-22 CGSpace went down Looks like DSpace exhausted its PostgreSQL connection pool Last week I had increased the limit from 30 to 60, which seemed to help, but now there are many more idle connections: $ psql -c 'SELECT * from pg_stat_activity;' | grep idle | grep -c cgspace 78 For now I have increased the limit from 60 to 90, run updates, and rebooted the server 2015-11-24 CGSpace went down again Getting emails from uptimeRobot and uptimeButler that it’s down, and Google Webmaster Tools is sending emails that there is an increase in crawl errors Looks like there are still a bunch of idle PostgreSQL connections: $ psql -c 'SELECT * from pg_stat_activity;' | grep idle | grep -c cgspace 96 For some reason the number of idle connections is very high since we upgraded to DSpace 5 2015-11-25 Troubleshoot the DSpace 5 OAI breakage caused by nginx routing config The OAI application requests stylesheets and javascript files with the path /oai/static/css, which gets matched here: # static assets we can load from the file system directly with nginx location ~ /(themes|static|aspects/ReportingSuite) { try_files $uri @tomcat; ... +
+ + + +
+ + +
+ + +
+
+ + + +
+ + + + + + + + + diff --git a/public/sitemap.xml b/public/sitemap.xml index 067868458..2718875af 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -3,7 +3,12 @@ https://alanorth.github.io/cgspace-notes/ - 2016-08-01T15:53:00+03:00 + 2016-09-01T15:53:00+03:00 + + + + https://alanorth.github.io/cgspace-notes/2016-09/ + 2016-09-01T15:53:00+03:00 diff --git a/public/tags/index.html b/public/tags/index.html index 718ba4d2d..e18de9314 100644 --- a/public/tags/index.html +++ b/public/tags/index.html @@ -64,7 +64,7 @@ diff --git a/public/tags/notes/index.html b/public/tags/notes/index.html index 37879b77c..723fc1eb3 100644 --- a/public/tags/notes/index.html +++ b/public/tags/notes/index.html @@ -61,6 +61,32 @@

Notes

+
+
+
+

September, 2016

+ +
+
+ 2016-09-01 Discuss helping CCAFS with some batch tagging of ORCID IDs for their authors Discuss how the migration of CGIAR’s Active Directory to a flat structure will break our LDAP groups in DSpace We had been using DC=ILRI to determine whether a user was ILRI or not It looks like we might be able to use OUs now, instead of DCs: $ ldapsearch -x -H ldaps://svcgroot2.cgiarad.org:3269/ -b "dc=cgiarad,dc=org" -D "admigration1@cgiarad.org" +
+ + + +
+ +
diff --git a/public/tags/notes/index.xml b/public/tags/notes/index.xml index 905ec39de..f0dd25677 100644 --- a/public/tags/notes/index.xml +++ b/public/tags/notes/index.xml @@ -6,9 +6,52 @@ Recent content in Notes on CGSpace Notes Hugo -- gohugo.io en-us - Mon, 01 Aug 2016 15:53:00 +0300 + Thu, 01 Sep 2016 15:53:00 +0300 + + September, 2016 + https://alanorth.github.io/cgspace-notes/2016-09/ + Thu, 01 Sep 2016 15:53:00 +0300 + + https://alanorth.github.io/cgspace-notes/2016-09/ + + +<h2 id="2016-09-01">2016-09-01</h2> + +<ul> +<li>Discuss helping CCAFS with some batch tagging of ORCID IDs for their authors</li> +<li>Discuss how the migration of CGIAR&rsquo;s Active Directory to a flat structure will break our LDAP groups in DSpace</li> +<li>We had been using <code>DC=ILRI</code> to determine whether a user was ILRI or not</li> +<li>It looks like we might be able to use OUs now, instead of DCs:</li> +</ul> + +<pre><code>$ ldapsearch -x -H ldaps://svcgroot2.cgiarad.org:3269/ -b &quot;dc=cgiarad,dc=org&quot; -D &quot;admigration1@cgiarad.org&quot; -W &quot;(sAMAccountName=admigration1)&quot; +</code></pre> + +<ul> +<li>User who has been migrated to the root vs user still in the hierarchical structure:</li> +</ul> + +<pre><code>distinguishedName: CN=Last\, First (ILRI),OU=ILRI Kenya Employees,OU=ILRI Kenya,OU=ILRIHUB,DC=CGIARAD,DC=ORG +distinguishedName: CN=Last\, First (ILRI),OU=ILRI Ethiopia Employees,OU=ILRI Ethiopia,DC=ILRI,DC=CGIARAD,DC=ORG +</code></pre> + +<ul> +<li>Notes for local PostgreSQL database recreation from production snapshot:</li> +</ul> + +<pre><code>$ dropdb dspacetest +$ createdb -O dspacetest --encoding=UNICODE dspacetest +$ psql dspacetest -c 'alter user dspacetest createuser;' +$ pg_restore -O -U dspacetest -d dspacetest ~/Downloads/cgspace_2016-09-01.backup +$ psql dspacetest -c 'alter user dspacetest nocreateuser;' +$ psql -U dspacetest -f ~/src/git/DSpace/dspace/etc/postgres/update-sequences.sql dspacetest -h localhost +$ vacuumdb dspacetest +</code></pre> + + + August, 2016 https://alanorth.github.io/cgspace-notes/2016-08/