AtlasOfLivingAustralia / ala-install

Ansible playbooks for installing the ALA components
https://www.ala.org.au
Apache License 2.0
26 stars 52 forks source link

Hardcoded /data instead of {{data_dir}} #178

Open JeGoi opened 6 years ago

JeGoi commented 6 years ago

On line https://github.com/AtlasOfLivingAustralia/ala-install/blob/master/ansible/roles/solr5/tasks/main.yml#L95 /data should be replace by {{data_dir}}, isn't it? url="{{ solr_base_url }}/solr/admin/cores?action=CREATE&name={{ item }}&instanceDir=/data/solr/data/{{ item }}&config=solrconfig.xml&dataDir=data" force=yes timeout=30 dest=/tmp/ replaced by url="{{ solr_base_url }}/solr/admin/cores?action=CREATE&name={{ item }}&instanceDir={{data_dir}}/solr/data/{{ item }}&config=solrconfig.xml&dataDir=data" force=yes timeout=30 dest=/tmp/

JeGoi commented 6 years ago

Same on line 25: https://github.com/AtlasOfLivingAustralia/ala-install/blob/master/ansible/roles/solr5/tasks/main.yml#L25 shell: "./install_solr_service.sh /tmp/solr-{{ solr_version }}.tgz -d /data/solr -f" replaced by shell: "./install_solr_service.sh /tmp/solr-{{ solr_version }}.tgz -d {{data_dir}}/solr -f"

vjrj commented 5 years ago

After deploying the node of Austria (cc @geonb) using /e as data_dir seems that some /data/ directories are hardcoded.

More than solr described by JeGoi, here a list of files in /data instead of /e:

/data:
total 186348
drwxr-x--- 4 solr    solr         4096 Jul  9 13:49 solr
drwxr-xr-x 3 root    root         4096 Jul  9 13:54 biocache
-rw-r--r-- 1 root    root    101131112 Jul  9 14:06 ROOT_2019-07-09T11:34:49Z.war
-rw-r--r-- 1 root    root     89672359 Jul  9 16:31 ROOT_2019-07-09T13:59:51Z.war
drwxr-xr-x 3 tomcat7 tomcat7      4096 Jul  9 16:39 tmp
/data/solr:
total 12
-rw-r----- 1 solr solr 2678 Jul  9 13:48 log4j2.xml
drwxr-x--- 2 solr solr 4096 Jul  9 13:48 data
drwxr-x--- 2 solr solr 4096 Jul  9 13:49 logs

/data/solr/data:
total 8
-rw-r----- 1 solr solr  975 Jul  9 13:48 zoo.cfg
-rw-r----- 1 solr solr 2180 Jul  9 13:48 solr.xml
/data/solr/logs:
total 56
-rw-r----- 1 solr solr     0 Jul  9 13:49 solr_slow_requests.log
(...)
/data/biocache:
total 4
drwxr-xr-x 2 root root 4096 Jul  9 13:54 vocab
/data/biocache/vocab:
total 148
-rw-r--r-- 1 root root 10091 Jul  9 13:54 mime-types.txt
(...) 
/data/tmp:
total 4
drwxr-xr-x 2 tomcat7 root 4096 Jul  9 16:40 tomcat-tmp
/data/tmp/tomcat-tmp:
total 232
-rw-r--r-- 1 tomcat7 tomcat7 236751 Jul  9 16:40 stacktrace.log

The sha1 of the wars:

15d332d3186240746070a635a50d774a9b4ed7c5  ROOT_2019-07-09T11:34:49Z.war
3f2194dfd78305b2ab7d0e93b0a5d03a288150e7  ROOT_2019-07-09T13:59:51Z.war

one if from bie-index.

The spatial playbook (deployed in other machine) has also other hardcoded /data directories.

As a workaround we'll create a link /data pointing to /e.