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

Install SimpleBook via Ansible #21

Merged
merged 3 commits into from
May 12, 2021
Merged

Install SimpleBook via Ansible #21

merged 3 commits into from
May 12, 2021

Conversation

slifty
Copy link
Contributor

@slifty slifty commented May 6, 2021

This PR updates our development environment to use the Ansible Scripts when installing and configuring SimpleBook. It also replaces the actual code base of the ansible-installed SimpleBook with our mounted copy so that we can actually develop the project in our development environment.

In order to test this you will need to:

  1. have this branch checked out in your copy of torque-sites: https://github.com/OpenTechStrategies/torque-sites/tree/10-add-simplebook-ansible

  2. vagrant destroy & vagrant up

  3. vagrant ssh

  4. sudo supervisorctl status and should see the two simplebook services running.

Note that SimpleBook is not actually installed in any of the sites at that point (see OpenTechStrategies/torque-sites#114 for instructions on how to locally install SimpleBook in a given competition)

Resolves #20
Resolves #22 illegally and I should probably put that in its own PR.

slifty added 2 commits May 6, 2021 17:16
We recently changed the way environment vars are defined but forgot to
update the `.gitignore` to prevent accidental tracking of populated config
variables.

No longer do developers have to live in fear!
We no longer want to install SimpleBook "manually" but instead want to
use the Ansible scripts that are part of torque-sites.

This temporarily removes SimpleBook from devenv (as in, the mounted copy
is not actually used in any local competitions), but it does make sure
our local setup is performed in the same way it will be performed on
production.

The next step will be to link in the mounted code in the various
directories that we want to use it.

Since we're relying on Ansible to install SimpleBook we don't (yet) need
to install pipenv or node, so those dependencies are removed for now.

Issue #20
@slifty slifty force-pushed the 20-ansiblized-simplebook branch 2 times, most recently from e0e787e to 48d5f19 Compare May 6, 2021 22:06
@slifty slifty requested a review from hawkinsw May 6, 2021 22:07
Copy link
Contributor

@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.

Just a few questions!! Otherwise, looking great!

rm -fr /var/www/html/LLIIA2020/extensions/Collection
ln -s /home/vagrant/SimpleBook /var/www/html/LLIIA2020/extensions/Collection
rm -fr /var/www/html/LLIIA2020/extensions/SimpleBook
ln -s /home/vagrant/SimpleBook /var/www/html/LLIIA2020/extensions/SimpleBook
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems out of place. I would expect that we would do this for each of the competitions or none of the competitions. Is this somehow left over?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chatted about this -- this is intentional BUT requires a manual change in torque-sites unfortunately to install simplebook for the LLIIA competition. I'm not committing that to torque-sites because simplebook isn't ready for a live competition, so it has to be a local change.

The "right" solution here would probably to set simplebook up on demoview in both places, but I don't have demoview loaded with data, unfortunately -- and I don't think I have the bandwidth to fix that until after we finish simplebook.

TL;DR

This is right to call out, but for now lets commit this as is, knowing that once simplebook is launched this will suddenly not be "wrong" (and in the mean time we can manually activate simplebook on LLIIA in local)

configure.sh Show resolved Hide resolved
configure.sh Outdated Show resolved Hide resolved
We want to install SimpleBook using ansible, but we also want to use our
local copy since this is, at the end of the day, the development
environment.

To do this we delete the downloaded copies of SimpleBook and instead
symlink our mounted copy.  We also need to install the SimpleBook
dependencies (e.g. pipenv and yarn install) so that we can set up our
mounted copy of SimpleBook properly.

Technically those tools are installed via Ansible but in the spirit of
defensiveness we'll explicitly install them in our provisioner as well
in case that ever changes / to ensure that the development requirements
of SimpleBook are reflected in the development environment.

Issue #20
@slifty slifty merged commit 9406f9d into main May 12, 2021
@slifty slifty deleted the 20-ansiblized-simplebook branch May 12, 2021 17:21
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.

Ignore configuration.env Install SimpleBook via ansible
2 participants