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, 'standard' and 'demo' options #206

Merged
merged 5 commits into from
Dec 8, 2021
Merged

Conversation

alxp
Copy link
Contributor

@alxp alxp commented Nov 3, 2021

GitHub Issue: Islandora/documentation#1194

  • Other Relevant Links (Google Groups discussion, related pull requests,
    Release pull requests, etc.)

Uses install-profile branch, a D9 update, of https://github.com/Islandora-Devops/islandora-sandbox/tree/install-profile
Related PR on Islandora-Devops/islandora_install_profile_demo: Islandora-Devops/islandora_install_profile_demo#3

What does this Pull Request do?

Allows a user to run a playbook that installs either a standard Drupal distribution with Islandroa and Islandora Defaults enabled, without much more customization, or the 'demo' profile, based on the install profile provided to the community by Born DIgital and updated with Drupal 9 compatibility for this PR.

What's new?

The base install should not change - it still uses the drupal/recommended-project composer project as a base, and it is the default option for the ISLANDORA_INSTALL_PROFILE variable.

The user now has an option to set that variable to 'demo', which will check out the install-profile branch of the Islandora-Devops/islandora-sandbox project ** for now ** and run composer install when the Drupal role is executed.

THis can be a basis for Ansible to deploy an organization's own project, just by changing the drupal variables in var/demo to point to their own repo. It doesn't need to be in composer.

  • Does this change require documentation to be updated?

PR includes an update to the README. External install docs should be updated also.

  • Does this change add any new dependencies?

If 'demo' is install, it will point to the Islandora-Devops/islandora-sandbox composer project which depends on Islandora-Devops/islandora_install_profile_demo.

  • Does this change require any other modifications to be made to the repository
    (i.e. Regeneration activity, etc.)?

I faccepted, we need to decide what the branch scheme of islandora-sandbox is 'main' is still needed elsewhere in its current form.

  • Could this change impact execution of existing code?

Default is to stick with 'standard' so no.

How should this be tested?

after running vagrant destroy:

Set a Unix shell variable:
export ISLANDORA_INSTALL_PROFILE=demo
Run 'vagrant up

Interested parties

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

@alxp
Copy link
Contributor Author

alxp commented Nov 5, 2021

Testing the Demo profile, and an error is encountered on running the migration scripts. It can't find the ActiveMQ broker.

It looks like the profile hard-codes the activemq server as "activemq" i.e., what the Docker stack would be.

This needs to get pulled out in to a variable.

image

@Natkeeran
Copy link
Contributor

@alxp
Ran into the same issue as you noted. I ran the migrations manually after changing the activemq config manually.

Then, when creating a repository item, I get the following error:

Error: Call to a member function getName() on null in islandora_install_profile_demo_core_entity_view() (line 652 of /var/www/html/drupal/web/profiles/contrib/islandora_install_profile_demo/islandora_install_profile_demo/modules/islandora_install_profile_demo_core/islandora_install_profile_demo_core.module)

#0 [internal function]: islandora_install_profile_demo_core_entity_view(Array, Object(Drupal\node\Entity\Node), Object(Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay), 'open_seadragon')
#1 /var/www/html/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(403): call_user_func_array('islandora_insta...', Array)
#2 /var/www/html/drupal/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(289): Drupal\Core\Extension\ModuleHandler->invokeAll('entity_view', Array)
#3 /var/www/html/drupal/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(239): Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array)
#4 [internal function]: Drupal\Core\Entity\EntityViewBuilder->build(Array)
#5 /var/www/html/drupal/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(101): call_user_func_array(Array, Array)
#6 /var/www/html/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(786): Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')
#7 /var/www/html/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(377): Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array)
#8 /var/www/html/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(201): Drupal\Core\Render\Renderer->doRender(Array, false)
#9 /var/www/html/drupal/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(241): Drupal\Core\Render\Renderer->render(Array, false)
#10 /var/www/html/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(578): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#11 /var/www/html/drupal/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(242): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#12 /var/www/html/drupal/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(132): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#13 /var/www/html/drupal/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#14 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#15 /var/www/html/drupal/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#16 /var/www/html/drupal/vendor/symfony/http-kernel/HttpKernel.php(163): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
#17 /var/www/html/drupal/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#18 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#19 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#20 /var/www/html/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#21 /var/www/html/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#22 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#23 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /var/www/html/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /var/www/html/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(717): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /var/www/html/drupal/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#27 {main}

@alxp
Copy link
Contributor Author

alxp commented Dec 2, 2021

@Natkeeran I pushed a couple of updates that were causing this white screen:

First added a workaround for the Install Profile hard-coding the broker URL to the default ISLE_DC hostname.

Second, there is a missing check if a taxonomy term is not set.

Creating a new object now works as expected.

Copy link
Contributor

@ajstanley ajstanley left a comment

Choose a reason for hiding this comment

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

Built without error once I'd upgraded to current Ansible.
All derivatives were created on media ingest.

@ajstanley ajstanley merged commit f38625e into dev Dec 8, 2021
@rosiel rosiel deleted the install-profile branch December 9, 2021 14:53
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.

3 participants