Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handling production and development mode. #627

Merged
merged 5 commits into from
Nov 12, 2021
Merged

handling production and development mode. #627

merged 5 commits into from
Nov 12, 2021

Conversation

abessiari
Copy link
Contributor

  • Handling production mode by allowing for the download of solr index, golr_timestamp.log, release-archive-doi.json.
  • Handling dev mode and allowing for creating of solr index ...

@abessiari
Copy link
Contributor Author

@kltm

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

@kltm
Copy link
Member

kltm commented Nov 10, 2021

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
Copy link
Member

kltm commented Nov 11, 2021

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
Copy link
Member

kltm commented Nov 11, 2021

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
Copy link
Contributor Author

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

@abessiari abessiari closed this Nov 11, 2021
@kltm
Copy link
Member

kltm commented Nov 11, 2021

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

@abessiari
Copy link
Contributor Author

Please go ahead and merge.

@kltm kltm reopened this Nov 12, 2021
@kltm kltm merged commit f146f9e into geneontology:master Nov 12, 2021
@kltm
Copy link
Member

kltm commented Nov 12, 2021

Merged!

@abessiari
Copy link
Contributor Author

abessiari commented Nov 12, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants