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

Make playbook into two pieces #237

Merged
merged 4 commits into from
Dec 14, 2022
Merged

Conversation

whikloj
Copy link
Member

@whikloj whikloj commented Dec 1, 2022

GitHub Issue: Islandora/documentation#2166

What does this Pull Request do?

This is a bit of a naive first attempt, probably needs a way to continue the original full build steps. Or if you wanted to use this to build a remote machine you'd need to run both sides.

For discussion.

What's new?

Adds a new environment variable to check for called ISLANDORA_BUILD_BASE if it is "true" then the playbook will build a ubuntu/focal64 box with Java, Tomcat 9, Apache, MySQL/Postgres, ActiveMQ, Solr and Cantaloupe installed.

There is some configuration I didn't move, for instance Apache is configured to use the eventual Drupal folder as its DocumentRoot. But as there is nothing there you get a error page.

  • Does this change require documentation to be updated? Yes it will, if adopted
  • Does this change add any new dependencies? no
  • Does this change require any other modifications to be made to the repository
    (i.e. Regeneration activity, etc.)? no
  • Could this change impact execution of existing code? 🤷

How should this be tested?

  1. Pull down this PR in a directory.
  2. Build the base box.
    > ISLANDORA_BUILD_BASE=true vagrant up
    
    This should import the ubuntu/focal64 box, that will be one of the first steps it executes. Once it is complete (without errors 🤞 )
  3. Package the box.
    > vagrant package --output islandora_base
    
    This shuts down the VM and exports it to the file islandora_base in this directory.
  4. Get rid of the old box
    > vagrant destroy
         default: Are you sure you want to destroy the 'default' VM? [y/N] y
    ==> default: Forcing shutdown of VM...
    ==> default: Destroying VM and associated drives...
    
  5. Now build a VM using the base box.
    > vagrant up
    
    This should show it is importing the islandora_base box.

That's it, you can now destroy and rebuild the VM using this base image as many times as you need.

Interested parties

Tag (@ mention) interested parties or, if unsure, @Islandora-Devops/committers especially @rosiel

Vagrantfile Outdated Show resolved Hide resolved
@rosiel
Copy link
Contributor

rosiel commented Dec 1, 2022

🥳 @whikloj I was scared when I saw how quickly the base box built. But this is awesome!

Base box built in 6m:28s
It took a bit to export, but I didn't time it.
The rest of it built in 5m:40s. I saw no errors and the front page loads

Wizardry!! 😀 What do we need to make this 🚀 ?

@whikloj
Copy link
Member Author

whikloj commented Dec 2, 2022

I guess the things I'm not sure of and need clarification on is:

  1. do we still want a full build option in one run? i.e. for using the playbook to setup a remote machine or is running two steps ok.
  2. can you login to the box (I was not sure if I got the private key would work for everyone or just me)

As this is not the flagship distribution method for Islandora, I'm not sure how careful we need to be.

We could make this separate branch so the original dev remains pure but that tends to lead to one or the other branch being more valued.

@whikloj
Copy link
Member Author

whikloj commented Dec 2, 2022

Also, we could push a copy of islandora_base up to Hashicorp (sp?) if we wanted, but I wasn't sure if we wanted to try to maintain that as well.

@rosiel
Copy link
Contributor

rosiel commented Dec 4, 2022

do we still want a full build option in one run?

Two steps is fine. I imagine running them could be done "at once" by chaining the commands, like this?

ISLANDORA_BUILD_BASE=true vagrant up; ISLANDORA_BUILD_BASE=false vagrant provision;

can you login to the box?

vagrant ssh worked just fine. is there anything else I need to test?

As this is not the flagship distribution method for Islandora, I'm not sure how careful we need to be.

Agreed.

We could make this separate branch so the original dev remains pure but that tends to lead to one or the other branch being more valued.

We have already created a 1.0.0 release, so I think that binds us to some degree of semantic version-y responsibility. Therefore I think this should be 2.0.0 or something. I know it's not even managed by Composer, but cutting a release where the non-back-compatible changes happen would let anyone who's running this and encounters problems know where they can go up to without altering how they interface with the playbook.

But branches? the playbook is so minimally maintained, and I can't imagine us maintaining two branches, let's do this all on the dev branch.

we could push a copy of islandora_base up to Hashicorp (sp?) if we wanted

I think we can wait, maybe come back to it in a few months. The base box is really fast to build, and i don't think we have the people/tools to maintain another external snapshot thing right now.

Vagrantfile Outdated Show resolved Hide resolved
@whikloj
Copy link
Member Author

whikloj commented Dec 4, 2022

I am fine with your answers. I hadn't thought about just provisioning over top. I am fine with just adding a new tagged version, we might want to add a last 1.x.x tag to include the last bits (not sure anyone is using the tags) and then add a 2.0.0 tag to the commit that adds this change.

@rosiel
Copy link
Contributor

rosiel commented Dec 4, 2022

Can you add islandora_base to .gitignore? (if not no worries i can make another PR)

Vagrantfile Outdated Show resolved Hide resolved
@whikloj whikloj marked this pull request as ready for review December 5, 2022 18:00
@rosiel
Copy link
Contributor

rosiel commented Dec 6, 2022

😢 I just ran into a problem that i think was caused by this split (but I'm not sure). After building the site on top of the base box, going to http://localhost:8000/admin/config/search/search-api/server/default_solr_server showed me a big red drupal warning banner error: "You are using an incompatible solr schema. Please follow the instructions in the README.md file for setting up Solr."

Screen Shot 2022-12-06 at 1 12 05 PM

I don't know what to look for/at. The indexing worked fine: I went to http://localhost:8983/solr/#/, and did a query, and the results showed i had indexed two nodes and all their values.

But my View (I was using the default that came with the starter site, solr_search_content) returns 0 values, always.

@whikloj
Copy link
Member Author

whikloj commented Dec 7, 2022

Argh, okay. Let me look there is some futzing we do with the Solr stuff but I thought it was working.

@rosiel rosiel merged commit 79b24b1 into Islandora-Devops:dev Dec 14, 2022
@rosiel
Copy link
Contributor

rosiel commented Dec 14, 2022

That did it. Awesome stuff!

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.

2 participants