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
Add simplebook ansible roles #114
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know enough about Ansible to give a meaningful review. However, I see nothing that is an immediate cause for concern!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think some of the changes are probably worth discussing, so marked as request changes. The only other thing to request is that an ansible group for "demo" to be created, which starts up on a different port (see torquedata). Then allow the port to be configurable in the inherited simplebook mediawiki extension role. That way, we can set the DemoView competition to use the demo version of simplebook running on the production box.
base/simplebook/ansible/roles/simplebook/templates/supervisor-simplebook.conf.j2
Outdated
Show resolved
Hide resolved
base/simplebook/ansible/roles/simplebook/templates/supervisor-simplebook.conf.j2
Outdated
Show resolved
Hide resolved
base/simplebook/ansible/roles/simplebook/templates/supervisor-simplebook.conf.j2
Outdated
Show resolved
Hide resolved
base/simplebook/ansible/roles/simplebook/templates/supervisor-simplebook.conf.j2
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,2 @@ | |||
--- | |||
simplebook_git_version: main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have gone back and forth on whether we should tag the git_versions to a moving target. But at least for production, and likely demo (in the prod/group_vars/all), we should set to a version. That way we know, for a given deployment of a version of torque-sites, it corresponds directly to a sha, so re-running the ansible-playbook without updating torque-sites installs the same system, and no one accidentally breaks production by accidentally checking in breaking code to simplebook/main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the hard-lock of a version BUT would like to wait to do that until after we have a SimpleBook@1.0.0 -- right now locking in a version would be locking in a broken version since it isn't working yet.
Mind if we keep it main
for now and when we come back and actually deploy it for a competition, update this to point to the v1 tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally fine. Though we (really, I) have been using shas instead of tags as that provides more flexibility. That's not an endorsement, though :)
Simplebook has two services which need to run in order for the plugin to work. The first is an API server which will accept new book requests, the second is a node worker which actually generates PDFs. This makes it possible to install both services, but does not add the SimpleBook plugin to any competitions. Issue #10
This adds a new `simplebook` role that compettion scripts can invoke. A competition can use this ansible role to install the SimpleBook mediawiki plugin to a given instance. It's similar to the existing `Collection` role. Issue #10
14f375f
to
a3f6c47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes talked through, good to go :)
This PR creates two categories of Ansible script for SimpleBook:
This PR does not actually install the SimpleBook plugin in a given competition.
To install SimpleBook in a competition (e.g. locally for testing):
- collection
with- simplebook
in the competition.yml
file (e.g.competitions/LLIIA2020/ansible/LLIIA2020.yml
).simplebook_git_version: main
to the appropriateinv/{scope}/group_vars/all.tmpl
Resolves #110