geneontology / amigo

AmiGO is the public interface for the Gene Ontology.
http://amigo.geneontology.org
BSD 3-Clause "New" or "Revised" License
29 stars 17 forks source link

handling production and development mode. #627

Closed abessiari closed 2 years ago

abessiari commented 2 years ago
abessiari commented 2 years ago

@kltm

Now supporting prod/dev mode. prod is the default.

kltm commented 2 years ago

Successful local with:

diff --git a/provision/vars.yaml b/provision/vars.yaml
index ce59e9db..aa22d8f6 100644
--- a/provision/vars.yaml
+++ b/provision/vars.yaml
@@ -3,13 +3,13 @@
 # Point stage_dir to a different locatiom. By default it will reside in the cur
rent directory.
 ##############
 stage_dir: "{{ lookup('env', 'PWD') }}/stage_dir"
-branch: master
+branch: provision2
 tag: latest
-repo: https://github.com/geneontology/amigo.git
+repo: https://github.com/abessiari/amigo.git
 repo_dir: '{{ stage_dir }}/amigo'
mkdir -p /tmp/stage && ansible-playbook -e "stage_dir=/tmp/stage" -u ubuntu -i "localhost," --connection=local build_image.yaml
mkdir -p /tmp/stage/srv-solr-data/index/ && cd /tmp/stage/srv-solr-data/index/
wget http://skyhook.berkeleybop.org/issue-35-neo-test/products/solr/golr-index-contents.tgz
tar -zxvf golr-index-contents.tgz
(back to amigo/provision)
ansible-playbook -e "stage_dir=/tmp/stage" -u ubuntu -i "localhost," --connection=local stage.yaml
kltm commented 2 years ago

Going through PROVISION_AWS_README.md, when reaching ansible-playbook -e "stage_dir=$STAGE_DIR" -u ubuntu -i "$HOST," --private-key $PRIVATE_KEY build_image.yaml I had failure with

fatal: [52.5.59.113]: FAILED! => {"changed": false, "module_stderr": "/home/sjcarbon/.ssh/config line 3: Unsupported option \"rsaauthentication\"\r\nShared connection to 52.5.59.113 closed.\r\n", "module_stdout": "/bin/sh: 1: /usr/bin/python: not found\r\n", "msg": "MODULE FAILURE", "rc": 127}

I was passed after performing sudo apt-get -u install python on the recently terraform-created target machine; this could possibly be automated or added to a new base image?

kltm commented 2 years ago

Looking at how things are handled in the "Untar index archive" step, I would suggest an alternate explicit command that can run much much faster, especially as this is likely the most time-consuming step: https://github.com/geneontology/operations/blob/ffb158c89a9198811c6139801a63866b3fa15f35/ansible/roles/update-golr-forced/tasks/main.yml#L46

abessiari commented 2 years ago

add install of python. add docker-compose -f in ansible. add ServerAlias .... tar -I pigz -xvf /srv/golr_new.tgz -C /srv/golr_unpacked

kltm commented 2 years ago

@abessiari Should we reopen and merge this, or were you wanting to start fresh with a new PR?

abessiari commented 2 years ago

Please go ahead and merge.

kltm commented 2 years ago

Merged!

abessiari commented 2 years ago

Thanks.

On Thu, Nov 11, 2021 at 4:11 PM kltm @.***> wrote:

Merged!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geneontology/amigo/pull/627#issuecomment-966714710, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALQOQSESGOJE76HP572I4P3ULRLRPANCNFSM5HJZSEQA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.