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

Add simplebook ansible roles #114

Merged
merged 2 commits into from May 10, 2021
Merged

Add simplebook ansible roles #114

merged 2 commits into from May 10, 2021

Conversation

slifty
Copy link
Contributor

@slifty slifty commented May 6, 2021

This PR creates two categories of Ansible script for SimpleBook:

  • Scripts to install the SimpleBook services.
  • A role to install the SimpleBook plugin into a competition.

This PR does not actually install the SimpleBook plugin in a given competition.

To install SimpleBook in a competition (e.g. locally for testing):

  1. replace - collection with - simplebook in the competition .yml file (e.g. competitions/LLIIA2020/ansible/LLIIA2020.yml).
  2. Add simplebook_git_version: main to the appropriate inv/{scope}/group_vars/all.tmpl

Resolves #110

Copy link

@hawkinsw hawkinsw left a 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!

Copy link
Collaborator

@frankduncan frankduncan left a 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/inv/dev/group_vars/all Outdated Show resolved Hide resolved
base/simplebook/ansible/inv/staging/hosts Outdated Show resolved Hide resolved
@@ -0,0 +1,2 @@
---
simplebook_git_version: main
Copy link
Collaborator

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

Copy link
Contributor Author

@slifty slifty May 10, 2021

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?

Copy link
Collaborator

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 :)

roles/simplebook/templates/simplebook.php.j2 Show resolved Hide resolved
roles/simplebook/templates/simplebook.php.j2 Show resolved Hide resolved
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
@slifty slifty force-pushed the 10-add-simplebook-ansible branch from 14f375f to a3f6c47 Compare May 10, 2021 18:30
@slifty slifty requested a review from frankduncan May 10, 2021 18:37
Copy link
Collaborator

@frankduncan frankduncan left a 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 :)

@slifty slifty merged commit 84a7d40 into main May 10, 2021
@slifty slifty deleted the 10-add-simplebook-ansible branch May 10, 2021 19:45
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.

SimpleBook support
3 participants