diff --git a/content/posts/2019-02.md b/content/posts/2019-02.md index 6e1bb5429..fcefe7423 100644 --- a/content/posts/2019-02.md +++ b/content/posts/2019-02.md @@ -614,5 +614,38 @@ $ dspace user --add --givenname Thierry --surname Lewyllie --email blah@cta.int ``` - Totally works... awesome! +- Then I tried with rootless containers by creating the subuid and subgid mappings for aorth: + +``` +$ sudo touch /etc/subuid /etc/subgid +$ usermod --add-subuids 10000-75535 aorth +$ usermod --add-subgids 10000-75535 aorth +$ sudo sysctl kernel.unprivileged_userns_clone=1 +$ podman pull postgres:9.6-alpine +$ podman run --name dspacedb -v /home/aorth/.local/lib/containers/volumes/dspacedb_data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres:9.6-alpine +``` + +- Which totally works, but Podman's rootless support doesn't work with port mappings yet... +- Deploy the Tomcat-7-from-tarball branch on CGSpace (linode18), but first stop the Ubuntu Tomcat 7 and do some basic prep before running the Ansible playbook: + +``` +# systemctl stop tomcat7 +# apt remove tomcat7 tomcat7-admin +# useradd -m -r -s /bin/bash dspace +# mv /usr/share/tomcat7/.m2 /home/dspace +# mv /usr/share/tomcat7/src /home/dspace +# chown -R dspace:dspace /home/dspace +# chown -R dspace:dspace /home/cgspace.cgiar.org +# dpkg -P tomcat7-admin tomcat7-common +``` + +- After running the playbook CGSpace came back up, but I had an issue with some Solr cores not being loaded (similar to last month) and this was in the Solr log: + +``` +2019-02-14 18:17:31,304 ERROR org.apache.solr.core.SolrCore @ org.apache.solr.common.SolrException: Error CREATEing SolrCore 'statistics-2018': Unable to create core [statistics-2018] Caused by: Lock obtain timed out: NativeFSLock@/home/cgspace.cgiar.org/solr/statistics-2018/data/index/write.lock +``` + +- The issue last month was address space, which is now set as `LimitAS=infinity` in `tomcat7.service`... +- I re-ran the Ansible playbook to make sure all configs etc were the, then rebooted the server diff --git a/docs/2019-02/index.html b/docs/2019-02/index.html index 462169932..8a143f725 100644 --- a/docs/2019-02/index.html +++ b/docs/2019-02/index.html @@ -42,7 +42,7 @@ sys 0m1.979s - + @@ -89,9 +89,9 @@ sys 0m1.979s "@type": "BlogPosting", "headline": "February, 2019", "url": "https://alanorth.github.io/cgspace-notes/2019-02/", - "wordCount": "3367", + "wordCount": "3579", "datePublished": "2019-02-01T21:37:30+02:00", - "dateModified": "2019-02-13T18:06:47+02:00", + "dateModified": "2019-02-14T02:03:32+02:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -856,6 +856,42 @@ $ dspace user --add --givenname Thierry --surname Lewyllie --email blah@cta.int + +
$ sudo touch /etc/subuid /etc/subgid
+$ usermod --add-subuids 10000-75535 aorth
+$ usermod --add-subgids 10000-75535 aorth
+$ sudo sysctl kernel.unprivileged_userns_clone=1
+$ podman pull postgres:9.6-alpine
+$ podman run --name dspacedb -v /home/aorth/.local/lib/containers/volumes/dspacedb_data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres:9.6-alpine
+
+ + + +
# systemctl stop tomcat7
+# apt remove tomcat7 tomcat7-admin
+# useradd -m -r -s /bin/bash dspace
+# mv /usr/share/tomcat7/.m2 /home/dspace
+# mv /usr/share/tomcat7/src /home/dspace
+# chown -R dspace:dspace /home/dspace
+# chown -R dspace:dspace /home/cgspace.cgiar.org
+# dpkg -P tomcat7-admin tomcat7-common
+
+ + + +
2019-02-14 18:17:31,304 ERROR org.apache.solr.core.SolrCore @ org.apache.solr.common.SolrException: Error CREATEing SolrCore 'statistics-2018': Unable to create core [statistics-2018] Caused by: Lock obtain timed out: NativeFSLock@/home/cgspace.cgiar.org/solr/statistics-2018/data/index/write.lock
+
+ + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 862e5aba7..ab0227db4 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -4,7 +4,7 @@ https://alanorth.github.io/cgspace-notes/2019-02/ - 2019-02-13T18:06:47+02:00 + 2019-02-14T02:03:32+02:00 @@ -209,7 +209,7 @@ https://alanorth.github.io/cgspace-notes/ - 2019-02-13T18:06:47+02:00 + 2019-02-14T02:03:32+02:00 0 @@ -220,7 +220,7 @@ https://alanorth.github.io/cgspace-notes/tags/notes/ - 2019-02-13T18:06:47+02:00 + 2019-02-14T02:03:32+02:00 0 @@ -232,13 +232,13 @@ https://alanorth.github.io/cgspace-notes/posts/ - 2019-02-13T18:06:47+02:00 + 2019-02-14T02:03:32+02:00 0 https://alanorth.github.io/cgspace-notes/tags/ - 2019-02-13T18:06:47+02:00 + 2019-02-14T02:03:32+02:00 0