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 profile #160

Merged
merged 30 commits into from
Mar 24, 2022
Merged

Install profile #160

merged 30 commits into from
Mar 24, 2022

Conversation

dannylamb
Copy link
Member

@dannylamb dannylamb commented May 4, 2021

Pulls in all the work to use Born Digital's new install profile.

@seth-shaw-unlv
Copy link

I just tried this out on a clean checkout of isle-dc and it didn't complete successfully:

$ git checkout -b install-profile origin/install-profile
Branch install-profile set up to track remote branch install-profile from origin.
Switched to a new branch 'install-profile'
$ cp sample.env .env
$ make local
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5596  100  5596    0     0   8757      0 --:--:-- --:--:-- --:--:--  8743
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1704  100  1704    0     0   5958      0 --:--:-- --:--:-- --:--:--  5958
docker-compose pull
Pulling activemq   ... done
Pulling alpaca     ... done
Pulling blazegraph ... done
Pulling cantaloupe ... done
Pulling fcrepo     ... done
Pulling fits       ... done
Pulling crayfits   ... done
Pulling homarus    ... done
Pulling houdini    ... done
Pulling hypercube  ... done
Pulling mariadb    ... done
Pulling matomo     ... done
Pulling milliner   ... done
Pulling recast     ... done
Pulling solr       ... done
Pulling traefik    ... done
Pulling drupal     ... done
Unable to find image 'islandora/nginx:c2d65aee856887b49b2cbf889060e549a83e4946' locally
c2d65aee856887b49b2cbf889060e549a83e4946: Pulling from islandora/nginx
Digest: sha256:7df17a78c0554243bee046c81bdb0ac1b5bcfa16fe2a2930fbf94744c9aba6ee
Status: Downloaded newer image for islandora/nginx:c2d65aee856887b49b2cbf889060e549a83e4946
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-container-environment-00-init.sh: executing... 
[cont-init.d] 00-container-environment-00-init.sh: exited 0.
[cont-init.d] 00-container-environment-01-override-nginx.sh: executing... 
[cont-init.d] 00-container-environment-01-override-nginx.sh: exited 0.
[cont-init.d] 00-container-environment-01-override-php.sh: executing... 
[cont-init.d] 00-container-environment-01-override-php.sh: exited 0.
[cont-init.d] 00-container-environment-02-database-defaults.sh: executing... 
[cont-init.d] 00-container-environment-02-database-defaults.sh: exited 0.
[cont-init.d] 01-confd-render-templates.sh: executing... 
[cont-init.d] 01-confd-render-templates.sh: exited 0.
[cont-init.d] 02-fpm-install.sh: executing... 
[cont-init.d] 02-fpm-install.sh: exited 0.
[cont-init.d] 02-ngnix-install.sh: executing... 
[cont-init.d] 02-ngnix-install.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Cloning into '/tmp/codebase'...
[27-Jul-2021 18:01:23] NOTICE: fpm is running, pid 727
[27-Jul-2021 18:01:23] NOTICE: ready to handle connections

                                                                                                                                                                                                                                                                                                                                             
  [InvalidArgumentException]                                                                                                                                                                                                                                                                                                                 
  Package islandora/islandora_profile exists in composer repo (https://repo.packagist.org) and package repo (defining 1 package) which has a higher repository priority. The packages with higher priority do not match your constraint and are therefore not installable. See https://getcomposer.org/repoprio for details and assistance.  
                                                                                                                                                                                                                                                                                                                                             

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-scripts] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>]...

[cmd] with-contenv exited 1
[27-Jul-2021 18:01:32] NOTICE: Terminating ...
[27-Jul-2021 18:01:32] NOTICE: exiting, bye-bye!
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[services.d] service fpm finish: executing...
[services.d] service fpm exiting with exit code: 0
s6-svwait: fatal: supervisor died
[services.d] service nginx finish: executing...
[services.d] service nginx exiting with exit code: 0
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
make: *** [local] Error 1

@noahwsmith
Copy link
Contributor

@seth-shaw-unlv try again- I just pushed a small patch for this issue. @dannylamb put install_profile in packagist, which means we can remove the package declaration islandora-deprecated/islandora-project#2

@noahwsmith
Copy link
Contributor

Status update - @dannylamb is going to get this back to the point where Composer installs cleanly, and then I'll jump back in and see if all the configs are landing correctly.

@dannylamb
Copy link
Member Author

This works with make demo but not with make local. I'm currently investigating what the difference is between the two codebases and trying to bring them into alignment.

@dannylamb
Copy link
Member Author

This works now with make local. Haven't tested anything super thoroughly, but the site comes up now.

The issue was with trying to use https://github.com/islandora-devops/islandora-project. There's some additional things I added to the composer.json in https://github.com/Islandora-Devops/islandora-sandbox that would need to be added. Mostly just stuff around the config sync / config split directories.

@noahwsmith
Copy link
Contributor

I can confirm that this works - thanks @dannylamb !

@seth-shaw-unlv this is ready for re-testing. Just git pull, sudo rm -rf codebase and make local and you should be back in action.

@noahwsmith
Copy link
Contributor

Actually, if we can get confirmation that this is in a good working state, I'd love to move forward with merging PR...

@seth-shaw-unlv
Copy link

I started it up yesterday but it appeared to hang and I didn't get to take a closer look before I left for the day. Unfortunately I'm now stuck at home until we can confirm that the fever one of my kids developed isn't COVID. I can test as soon as I can get back to the office, but if someone else beats me to it, that would be great.

@yamensaleh
Copy link

yamensaleh commented Aug 7, 2021 via email

@yamensaleh
Copy link

yamensaleh commented Aug 7, 2021 via email

@seth-shaw-unlv
Copy link

He is feeling better, thanks! Fortunately it wasn't COVID.

That said, I haven't been back to my office yet where I was testing this. I can give it a go on Monday.

@seth-shaw-unlv
Copy link

I came back to the office this morning and realized that it hadn't completed running before I left the office and was still waiting for a password. So I had it finish running. This run did complete finally and I didn't have @yamensaleh's error. (See the attached terminal output: isle-born-digital.log.)

It appears to be working although there are some oddities about it:

Going to the front page just after it finished gave me a 404:
Screen Shot 2021-08-09 at 11 17 29 AM

And after I created my first object it became my homepage:
Screen Shot 2021-08-09 at 11 23 38 AM

Also, I had to use the OpenSeadragon display hint because without it we only see the original file download link, rather than the Jpeg service file:
Screen Shot 2021-08-09 at 11 26 03 AM
Screen Shot 2021-08-09 at 11 26 50 AM

@yamensaleh
Copy link

yamensaleh commented Aug 11, 2021 via email

@DonRichards
Copy link
Member

Brought in upstream changes to resolve conflicts.

@kstapelfeldt
Copy link

See today's discussion for more details: https://github.com/Islandora/documentation/wiki/October-20,-2021

@noahwsmith
Copy link
Contributor

@alxp
Copy link
Contributor

alxp commented Oct 27, 2021

I noticed that this PR is using islandora-sandbox along with the install profile repository. This means I was able to tell Ansible to use the project and profile. It runs up until the step to install openseadragon.

Then I noticed that the composer.json file in the install-profile branch of islandora-sandbox declares the requirement on the dev-main branch: https://github.com/Islandora-Devops/islandora-sandbox/blob/install-profile/composer.json#L69

"require": {
        "islandora/islandora_install_profile_demo": "dev-main"
    },

I see that the docker script uses git to clone the folder which is why the mismatch isn't caught.

I think the Sandbox project would make a good base for the aim we have been discussing for a common project.

@noahwsmith noahwsmith mentioned this pull request Nov 17, 2021
@DonRichards
Copy link
Member

@dannylamb Is this ready to test?

@dannylamb
Copy link
Member Author

Yes, make demo-install-profile and make local-install-profile should all bring you up a newly improved and d9 site with islandora_install_profile_demo.

Just make sure you set ENVIRONMENT=local or ENVIRONMENT=demo as appropriate in your .env file.

@dannylamb
Copy link
Member Author

fixed the merge conflict 😅

@DonRichards
Copy link
Member

@dannylamb I was left more confused about where this is going. Are we trying to get this merged in or was there something else that we're doing?

@dannylamb
Copy link
Member Author

This depends on a lot of stuff. If you merge it now it works, and make local and make demo are unchanged. But there's install_profile and bd-d9-updates branches for various repos you'll want to merge in as well.

I'm swamped now but can make those PRs for those branches, though presumable everybody here as permissions to do that if they'd like. I didn't get around to making them b/c I wanted to QA it all a bit first since folks usually immediately descend onto a PR that isn't quite ready yet 😅

@dannylamb
Copy link
Member Author

Also, just to be clear, this doesn't change make local or make demo. All the new stuff is under make demo-install-profile and make local-install-profile.

@DonRichards
Copy link
Member

@dannylamb are you seeing during during the build this error? I ran make demo-install-profile

In SolrCommandHelper.php line 41:               
  Unknown server               

search-api-solr:get-server-config [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--xh-link XH-LINK] [--notify [NOTIFY]] [--druplicon] [--] <command> <server_id> [<file_name>] [<solr_version>]

unzip: can't open /tmp/ISLANDORA/solr_config.zip[.zip]
Waiting for 8983 on solr to open.

@DonRichards
Copy link
Member

@dannylamb To test this, am I expected to run make demo then make demo-install-profile?

@DonRichards
Copy link
Member

Well I guess 2 weeks is long enough. I'll start the rebase process.

@noahwsmith
Copy link
Contributor

@wgilling will be testing this today or early next week

@wgilling
Copy link
Contributor

Ok - here are my results today. Success. I cloned the isle-dc project locally and changed to this install-profile branch, ran the make demo-install-profile and it completed without any failures and the resultant local website looks fine.

I added some taxonomy values for Family entities to refer to with one of the fields that is indexed by the default Solr config and was able to search for the related item based on the family name value. I even made a collection item and related the items to the collection and search and all other functionality worked as expected.

The only errors during the internal Makefile's islandora_install_profile_demo method were:

    [notice] Performed install task: install_load_profile
    [error] Error importing/updating configuration
    [error] Error getting JWT token for message. Check JWT Configuration.

I am not sure that those errors are critical or would needed addressed. Please let me know if any clarification is needed.

@dannylamb
Copy link
Member Author

If the site functions, then that can be ignored. That function runs twice iirc, so one failure out of the two i think is normal. TL;DR if you can make a derivative or put something in Fedora, then JWTs are properly configured and there's no issue.

@noahwsmith
Copy link
Contributor

Our testing found a duplicate function in the Makefile which I have now removed.

@noahwsmith
Copy link
Contributor

We've tested this again. Don's rebase is good, and we (Born-Digital) recommend that this be merged. I assume that someone else needs to hit the button, though?

@rosiel
Copy link
Contributor

rosiel commented Mar 24, 2022

I don't think I have any code in this, so I'll hit the button. Now if we can put some attention to Islandora-Devops/isle-buildkit#170 ... and we'll be done.

@rosiel rosiel merged commit 5b04015 into development Mar 24, 2022
@noahwsmith
Copy link
Contributor

YAY thanks Rosie!

@misilot
Copy link
Contributor

misilot commented Mar 24, 2022

Thanks everyone!

@seth-shaw-unlv seth-shaw-unlv deleted the install-profile branch March 31, 2022 20:29
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.