hyrax 3.0.2 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +22 -0
  3. data/.dassie/Gemfile +10 -5
  4. data/.dassie/config/initializers/hyrax.rb +5 -0
  5. data/.dockerignore +3 -0
  6. data/.env +0 -1
  7. data/.rubocop.yml +4 -0
  8. data/CONTAINERS.md +1 -1
  9. data/Dockerfile +12 -6
  10. data/Gemfile +21 -27
  11. data/app/actors/hyrax/actors/base_actor.rb +1 -1
  12. data/app/actors/hyrax/actors/create_with_remote_files_actor.rb +85 -63
  13. data/app/actors/hyrax/actors/create_with_remote_files_ordered_members_actor.rb +7 -42
  14. data/app/controllers/concerns/hyrax/collections_controller_behavior.rb +20 -8
  15. data/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +21 -9
  16. data/app/controllers/concerns/hyrax/leases_controller_behavior.rb +14 -5
  17. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +22 -3
  18. data/app/controllers/hyrax/admin/workflows_controller.rb +8 -2
  19. data/app/controllers/hyrax/dashboard/collection_members_controller.rb +13 -9
  20. data/app/controllers/hyrax/dashboard/collections_controller.rb +12 -10
  21. data/app/controllers/hyrax/file_sets_controller.rb +49 -13
  22. data/app/controllers/hyrax/permissions_controller.rb +3 -4
  23. data/app/controllers/hyrax/workflow_actions_controller.rb +3 -1
  24. data/app/forms/hyrax/forms/collection_form.rb +7 -3
  25. data/app/forms/hyrax/forms/dashboard/nest_collection_form.rb +24 -2
  26. data/app/forms/hyrax/forms/file_set_form.rb +46 -0
  27. data/app/forms/hyrax/forms/permission.rb +23 -0
  28. data/app/forms/hyrax/forms/permission_template_form.rb +8 -2
  29. data/app/forms/hyrax/forms/resource_form.rb +10 -17
  30. data/app/forms/hyrax/forms/work_form.rb +5 -2
  31. data/app/helpers/hyrax/batch_edits_helper.rb +3 -1
  32. data/app/helpers/hyrax/collections_helper.rb +88 -2
  33. data/app/helpers/hyrax/dashboard_helper_behavior.rb +3 -7
  34. data/app/helpers/hyrax/file_set_helper.rb +25 -6
  35. data/app/helpers/hyrax/work_form_helper.rb +53 -0
  36. data/app/indexers/hyrax/administrative_set_indexer.rb +18 -0
  37. data/app/indexers/hyrax/valkyrie_indexer.rb +3 -3
  38. data/app/inputs/controlled_vocabulary_input.rb +2 -5
  39. data/app/jobs/attach_files_to_work_job.rb +19 -10
  40. data/app/jobs/attach_files_to_work_with_ordered_members_job.rb +6 -5
  41. data/app/jobs/inherit_permissions_job.rb +9 -5
  42. data/app/models/admin_set.rb +6 -25
  43. data/app/models/concerns/hyrax/ability.rb +3 -1
  44. data/app/models/concerns/hyrax/collection_behavior.rb +17 -44
  45. data/app/models/concerns/hyrax/file_set/characterization.rb +18 -12
  46. data/app/models/concerns/hyrax/solr_document_behavior.rb +9 -52
  47. data/app/models/concerns/hyrax/suppressible.rb +5 -0
  48. data/app/models/concerns/hyrax/user.rb +9 -3
  49. data/app/models/hyrax/file_set.rb +6 -0
  50. data/app/models/hyrax/pcdm_collection.rb +1 -0
  51. data/app/models/hyrax/permission_template.rb +98 -12
  52. data/app/models/hyrax/virus_scanner.rb +27 -18
  53. data/app/models/sipity/agent.rb +1 -0
  54. data/app/models/sipity/entity.rb +30 -8
  55. data/app/models/sipity/workflow.rb +1 -0
  56. data/app/models/sipity.rb +42 -0
  57. data/app/presenters/hyrax/admin_set_options_presenter.rb +2 -10
  58. data/app/presenters/hyrax/admin_set_presenter.rb +5 -1
  59. data/app/presenters/hyrax/admin_set_selection_presenter.rb +116 -0
  60. data/app/presenters/hyrax/collection_presenter.rb +31 -6
  61. data/app/presenters/hyrax/file_set_presenter.rb +6 -1
  62. data/app/presenters/hyrax/file_usage.rb +3 -2
  63. data/app/presenters/hyrax/stats_usage_presenter.rb +2 -1
  64. data/app/presenters/hyrax/trophy_presenter.rb +33 -4
  65. data/app/presenters/hyrax/user_profile_presenter.rb +11 -1
  66. data/app/presenters/hyrax/version_list_presenter.rb +19 -0
  67. data/app/presenters/hyrax/version_presenter.rb +3 -2
  68. data/app/presenters/hyrax/work_show_presenter.rb +25 -4
  69. data/app/presenters/hyrax/work_usage.rb +5 -3
  70. data/app/renderers/hyrax/renderers/attribute_renderer.rb +10 -2
  71. data/app/search_builders/hyrax/admin_set_search_builder.rb +1 -1
  72. data/app/search_builders/hyrax/my/collections_search_builder.rb +1 -1
  73. data/app/services/hyrax/admin_set_create_service.rb +3 -1
  74. data/app/services/hyrax/collections/collection_member_search_service.rb +72 -0
  75. data/app/services/hyrax/collections/collection_member_service.rb +112 -27
  76. data/app/services/hyrax/collections/migration_service.rb +4 -2
  77. data/app/services/hyrax/collections/nested_collection_persistence_service.rb +12 -13
  78. data/app/services/hyrax/collections/nested_collection_query_service.rb +2 -0
  79. data/app/services/hyrax/collections/permissions_create_service.rb +6 -4
  80. data/app/services/hyrax/contextual_path.rb +23 -0
  81. data/app/services/hyrax/custom_queries/find_file_metadata.rb +7 -5
  82. data/app/services/hyrax/custom_queries/navigators/parent_collections_navigator.rb +46 -0
  83. data/app/services/hyrax/edit_permissions_service.rb +27 -20
  84. data/app/services/hyrax/find_objects_via_solr_service.rb +11 -7
  85. data/app/services/hyrax/multiple_membership_checker.rb +51 -31
  86. data/app/services/hyrax/resource_status.rb +7 -0
  87. data/app/services/hyrax/search_service.rb +4 -2
  88. data/app/services/hyrax/solr_query_builder_service.rb +29 -6
  89. data/app/services/hyrax/solr_query_service.rb +224 -0
  90. data/app/services/hyrax/solr_service.rb +8 -1
  91. data/app/services/hyrax/statistics/depositors/summary.rb +2 -1
  92. data/app/services/hyrax/work_uploads_handler.rb +17 -2
  93. data/app/services/hyrax/workflow/actionable_objects.rb +70 -0
  94. data/app/services/hyrax/workflow/object_in_workflow_decorator.rb +31 -0
  95. data/app/services/hyrax/workflow/status_list_service.rb +43 -13
  96. data/app/views/hyrax/base/_form_relationships.html.erb +1 -2
  97. data/app/views/hyrax/base/_form_rendering.html.erb +1 -1
  98. data/app/views/hyrax/base/_form_representative.html.erb +1 -1
  99. data/app/views/hyrax/base/_form_thumbnail.html.erb +1 -1
  100. data/app/views/hyrax/base/_guts4form.html.erb +2 -2
  101. data/app/views/hyrax/base/_representative_media.html.erb +1 -1
  102. data/app/views/hyrax/base/_show_actions.html.erb +1 -1
  103. data/app/views/hyrax/dashboard/collections/_form.html.erb +3 -3
  104. data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +1 -1
  105. data/app/views/hyrax/dashboard/collections/edit.html.erb +4 -2
  106. data/app/views/hyrax/dashboard/collections/new.html.erb +4 -2
  107. data/app/views/hyrax/dashboard/collections/show.html.erb +1 -1
  108. data/app/views/hyrax/file_sets/edit.html.erb +1 -1
  109. data/app/views/hyrax/file_sets/media_display/_audio.html.erb +1 -1
  110. data/app/views/hyrax/file_sets/media_display/_default.html.erb +1 -1
  111. data/app/views/hyrax/file_sets/media_display/_image.html.erb +1 -1
  112. data/app/views/hyrax/file_sets/media_display/_office_document.html.erb +1 -1
  113. data/app/views/hyrax/file_sets/media_display/_pdf.html.erb +1 -1
  114. data/app/views/hyrax/file_sets/media_display/_video.html.erb +1 -1
  115. data/app/views/hyrax/file_sets/show.html.erb +1 -1
  116. data/app/views/hyrax/my/_admin_set_action_menu.html.erb +0 -11
  117. data/app/views/hyrax/my/_collection_action_menu.html.erb +1 -2
  118. data/app/views/hyrax/my/collections/_list_collections.html.erb +1 -1
  119. data/app/views/hyrax/my/collections/_modal_add_subcollection.html.erb +3 -5
  120. data/bin/solrcloud-assign-configset.sh +8 -5
  121. data/bin/solrcloud-upload-configset.sh +4 -2
  122. data/chart/hyrax/Chart.yaml +3 -3
  123. data/chart/hyrax/README.md +47 -1
  124. data/chart/hyrax/templates/_helpers.tpl +1 -1
  125. data/chart/hyrax/templates/configmap-env.yaml +1 -3
  126. data/chart/hyrax/templates/deployment-worker.yaml +6 -3
  127. data/chart/hyrax/templates/deployment.yaml +8 -3
  128. data/chart/hyrax/values.yaml +12 -0
  129. data/config/brakeman.ignore +2 -2
  130. data/config/locales/hyrax.de.yml +1 -1
  131. data/config/locales/hyrax.en.yml +1 -1
  132. data/config/locales/hyrax.es.yml +1 -1
  133. data/config/locales/hyrax.fr.yml +1 -1
  134. data/config/locales/hyrax.it.yml +1 -1
  135. data/config/locales/hyrax.pt-BR.yml +1 -1
  136. data/config/locales/hyrax.zh.yml +1 -1
  137. data/docker-compose.yml +1 -0
  138. data/documentation/developing-your-hyrax-based-app.md +1 -1
  139. data/documentation/legacyREADME.md +1 -1
  140. data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +5 -0
  141. data/lib/hyrax/active_fedora_dummy_model.rb +62 -0
  142. data/lib/hyrax/configuration.rb +8 -0
  143. data/lib/hyrax/engine.rb +1 -0
  144. data/lib/hyrax/errors.rb +2 -0
  145. data/lib/hyrax/specs/capybara.rb +3 -1
  146. data/lib/hyrax/specs/shared_specs/valkyrie_storage_versions.rb +9 -0
  147. data/lib/hyrax/transactions/container.rb +21 -0
  148. data/lib/hyrax/transactions/file_set_destroy.rb +21 -0
  149. data/lib/hyrax/transactions/steps/add_file_sets.rb +3 -2
  150. data/lib/hyrax/transactions/steps/add_to_parent.rb +36 -0
  151. data/lib/hyrax/transactions/steps/remove_file_set_from_work.rb +47 -0
  152. data/lib/hyrax/transactions/work_create.rb +2 -1
  153. data/lib/hyrax/valkyrie_can_can_adapter.rb +1 -0
  154. data/lib/hyrax/version.rb +1 -1
  155. data/lib/hyrax.rb +9 -0
  156. data/lib/tasks/collection_type_global_id.rake +1 -1
  157. data/lib/tasks/regenerate_derivatives.rake +12 -0
  158. data/lib/wings/orm_converter.rb +18 -2
  159. data/lib/wings/setup.rb +1 -0
  160. data/lib/wings/valkyrie/storage.rb +56 -1
  161. data/template.rb +1 -1
  162. metadata +17 -2
@@ -1,6 +1,6 @@
1
1
  <div class="no-preview">
2
2
  <%= t('hyrax.works.show.no_preview') %>
3
- <% if Hyrax.config.display_media_download_link? && !workflow_restriction?(file_set.try(:parent)) %>
3
+ <% if display_media_download_link?(file_set: file_set) %>
4
4
  <p /><%= link_to t('hyrax.file_set.show.download'),
5
5
  hyrax.download_path(file_set),
6
6
  id: "file_download",
@@ -1,4 +1,4 @@
1
- <% if Hyrax.config.display_media_download_link? && can?(:download, file_set.id) && !workflow_restriction?(file_set.try(:parent)) %>
1
+ <% if display_media_download_link?(file_set: file_set) %>
2
2
  <div>
3
3
  <h2 class="sr-only"><%= t('hyrax.file_set.show.downloadable_content.heading') %></h2>
4
4
  <%= image_tag thumbnail_url(file_set),
@@ -1,4 +1,4 @@
1
- <% if Hyrax.config.display_media_download_link? && !workflow_restriction?(file_set.try(:parent)) %>
1
+ <% if display_media_download_link?(file_set: file_set) %>
2
2
  <div>
3
3
  <h2 class="sr-only"><%= t('hyrax.file_set.show.downloadable_content.heading') %></h2>
4
4
  <%= image_tag thumbnail_url(file_set),
@@ -1,4 +1,4 @@
1
- <% if Hyrax.config.display_media_download_link? && !workflow_restriction?(file_set.try(:parent)) %>
1
+ <% if display_media_download_link?(file_set: file_set) %>
2
2
  <div>
3
3
  <h2 class="sr-only"><%= t('hyrax.file_set.show.downloadable_content.heading') %></h2>
4
4
  <%= image_tag thumbnail_url(file_set),
@@ -1,4 +1,4 @@
1
- <% if Hyrax.config.display_media_download_link? && !workflow_restriction?(file_set.try(:parent)) %>
1
+ <% if display_media_download_link?(file_set: file_set) %>
2
2
  <div>
3
3
  <h2 class="sr-only"><%= t('hyrax.file_set.show.downloadable_content.heading') %></h2>
4
4
  <video controls="controls" class="video-js vjs-default-skin" style="width:100%" data-setup="{}" controlsList="nodownload" preload="auto">
@@ -2,7 +2,7 @@
2
2
  <div class="container-fluid">
3
3
  <div class="row">
4
4
  <div class="col-xs-12 col-sm-4">
5
- <%= media_display @presenter %>
5
+ <%= render media_display_partial(@presenter), file_set: @presenter %>
6
6
  <%= render 'show_actions', presenter: @presenter %>
7
7
  <%= render 'single_use_links', presenter: @presenter if @presenter.editor? %>
8
8
  </div>
@@ -41,16 +41,5 @@
41
41
  <%= t("hyrax.dashboard.my.action.delete_admin_set") %>
42
42
  <% end %>
43
43
  </li>
44
- <% if Hyrax::CollectionType.any_nestable? %>
45
- <li role="menuitem" tabindex="-1">
46
- <%= link_to "#",
47
- class: 'itemicon add-to-collection',
48
- title: t("hyrax.dashboard.my.action.add_to_collection"),
49
- data: { nestable: false,
50
- hasaccess: (can?(:deposit, admin_set_presenter.solr_document)) } do %>
51
- <%= t("hyrax.dashboard.my.action.add_to_collection") %>
52
- <% end %>
53
- </li>
54
- <% end %>
55
44
  </ul>
56
45
  </div>
@@ -6,7 +6,6 @@
6
6
  <span class="sr-only"><%= t("hyrax.dashboard.my.sr.press_to") %> </span>
7
7
  <%= t("hyrax.dashboard.my.action.select") %> <span class="caret" aria-hidden="true"></span>
8
8
  </button>
9
-
10
9
  <ul role="menu" id="<%= ul_id %>" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%= id %>">
11
10
  <li role="menuitem" tabindex="-1">
12
11
  <%= link_to hyrax.dashboard_collection_path(id),
@@ -43,7 +42,7 @@
43
42
  <% end %>
44
43
  </li>
45
44
 
46
- <% if Hyrax::CollectionType.any_nestable? %>
45
+ <% if collection_presenter.collection_type_is_nestable? %>
47
46
  <% # The user should have deposit access to the parent we are adding, and read access to the child (the collection we are linking here). %>
48
47
  <li role="menuitem" tabindex="-1">
49
48
  <%= link_to "#",
@@ -4,7 +4,7 @@
4
4
  <tr id="document_<%= id %>"
5
5
  data-source="my"
6
6
  data-id="<%= id %>"
7
- data-colls-hash="<%= collection_presenter.available_parent_collections(scope: controller) %>"
7
+ data-colls-hash="<%= available_parent_collections_data(collection: collection_presenter) %>"
8
8
  data-post-url="<%= hyrax.dashboard_create_nest_collection_within_path(id) %>"
9
9
  data-post-delete-url="<%= is_admin_set ? hyrax.admin_admin_set_path(id) : hyrax.dashboard_collection_path(id) %>">
10
10
 
@@ -1,5 +1,4 @@
1
1
  <div class="modal fade disable-unless-selected" id="add-subcollection-modal-<%= id %>" tabindex="-1" role="dialog" aria-labelledby="add-subcollection-label">
2
- <% collection = ::Collection.find id %>
3
2
  <div class="modal-dialog" role="document">
4
3
  <div class="modal-content">
5
4
 
@@ -14,10 +13,9 @@
14
13
  <input type="hidden" name="source" value="<%= source %>" />
15
14
  <select name="child_id">
16
15
  <option value="none"><%= t("hyrax.dashboard.my.action.select") %></option>
17
- <% colls = Hyrax::Collections::NestedCollectionQueryService.available_child_collections(parent: collection, scope: controller, limit_to_id: nil) %>
18
- <% colls.each {|coll| %>
16
+ <% available_child_collections(collection: presenter).each do |coll| %>
19
17
  <option value="<%= coll.id %>"><%= coll.title.first %></option>
20
- <% } %>
18
+ <% end %>
21
19
  </select>
22
20
  </div>
23
21
 
@@ -28,7 +26,7 @@
28
26
  disabled
29
27
  type="button"
30
28
  class="btn btn-primary modal-add-button modal-submit-button"
31
- data-post-url="<%= dashboard_create_nest_collection_under_path(collection.id) %>"
29
+ data-post-url="<%= dashboard_create_nest_collection_under_path(presenter.id) %>"
32
30
  data-source="<%= source %>">
33
31
  <%= t('hyrax.collection.actions.nest_collections.button_label') %>
34
32
  </button>
@@ -5,20 +5,23 @@ if [ "$SOLR_ADMIN_USER" ]; then
5
5
  solr_user_settings="--user $SOLR_ADMIN_USER:$SOLR_ADMIN_PASSWORD"
6
6
  fi
7
7
 
8
+ solr_config_name="${SOLR_CONFIGSET_NAME:-solrconfig}"
9
+ solr_collection_name="${SOLR_COLLECTION_NAME:-hyrax}"
10
+
8
11
  # Solr Cloud Collection API URLs
9
12
  solr_collection_list_url="$SOLR_HOST:$SOLR_PORT/solr/admin/collections?action=LIST"
10
- solr_collection_modify_url="$SOLR_HOST:$SOLR_PORT/solr/admin/collections?action=MODIFYCOLLECTION&collection=$SOLR_COLLECTION_NAME&collection.configName=$SOLR_CONFIGSET_NAME"
13
+ solr_collection_modify_url="$SOLR_HOST:$SOLR_PORT/solr/admin/collections?action=MODIFYCOLLECTION&collection=${solr_collection_name}&collection.configName=${solr_config_name}"
11
14
 
12
15
  while [ $COUNTER -lt 30 ]; do
13
16
  if nc -z "${SOLR_HOST}" "${SOLR_PORT}"; then
14
- if curl --silent $solr_user_settings "$solr_collection_list_url" | grep -q "$SOLR_COLLECTION_NAME"; then
15
- echo "-- Collection ${SOLR_COLLECTION_NAME} exists; setting ${SOLR_CONFIGSET_NAME} ConfigSet ..."
17
+ if curl --silent $solr_user_settings "$solr_collection_list_url" | grep -q "$solr_collection_name"; then
18
+ echo "-- Collection ${solr_collection_name} exists; setting ${solr_config_name} ConfigSet ..."
16
19
  echo $solr_collection_modify_url
17
20
  curl $solr_user_settings "$solr_collection_modify_url"
18
21
  exit
19
22
  else
20
- echo "-- Collection ${SOLR_COLLECTION_NAME} does not exist; creating and setting ${SOLR_CONFIGSET_NAME} ConfigSet ..."
21
- solr_collection_create_url="$SOLR_HOST:$SOLR_PORT/solr/admin/collections?action=CREATE&name=$SOLR_COLLECTION_NAME&collection.configName=$SOLR_CONFIGSET_NAME&numShards=1"
23
+ echo "-- Collection ${solr_collection_name} does not exist; creating and setting ${solr_config_name} ConfigSet ..."
24
+ solr_collection_create_url="$SOLR_HOST:$SOLR_PORT/solr/admin/collections?action=CREATE&name=${solr_collection_name}&collection.configName=${solr_config_name}&numShards=1"
22
25
  curl $solr_user_settings "$solr_collection_create_url"
23
26
  exit
24
27
  fi
@@ -8,9 +8,11 @@ if [ "$SOLR_ADMIN_USER" ]; then
8
8
  solr_user_settings="--user $SOLR_ADMIN_USER:$SOLR_ADMIN_PASSWORD"
9
9
  fi
10
10
 
11
+ solr_config_name="${SOLR_CONFIGSET_NAME:-solrconfig}"
12
+
11
13
  # Solr Cloud ConfigSet API URLs
12
14
  solr_config_list_url="http://$SOLR_HOST:$SOLR_PORT/api/cluster/configs?omitHeader=true"
13
- solr_config_upload_url="http://$SOLR_HOST:$SOLR_PORT/solr/admin/configs?action=UPLOAD&name=$SOLR_CONFIGSET_NAME"
15
+ solr_config_upload_url="http://$SOLR_HOST:$SOLR_PORT/solr/admin/configs?action=UPLOAD&name=${solr_config_name}"
14
16
 
15
17
  while [ $COUNTER -lt 30 ]; do
16
18
  echo "-- Looking for Solr (${SOLR_HOST}:${SOLR_PORT})..."
@@ -19,7 +21,7 @@ while [ $COUNTER -lt 30 ]; do
19
21
  if curl --silent --user 'fake:fake' "$solr_config_list_url" | grep -q '401'; then
20
22
  # the solr pods come up and report available before they are ready to accept trusted configs
21
23
  # only try to upload the config if auth is on.
22
- if curl --silent $solr_user_settings "$solr_config_list_url" | grep -q "$SOLR_CONFIGSET_NAME"; then
24
+ if curl --silent $solr_user_settings "$solr_config_list_url" | grep -q "$solr_config_name"; then
23
25
  echo "-- ConfigSet already exists; skipping creation ...";
24
26
  else
25
27
  echo "-- ConfigSet for ${CONFDIR} does not exist; creating ..."
@@ -2,11 +2,11 @@ apiVersion: v2
2
2
  name: hyrax
3
3
  description: An open-source, Samvera-powered digital repository system
4
4
  type: application
5
- version: 0.18.0
5
+ version: 0.22.0
6
6
  appVersion: 3.0.2
7
7
  dependencies:
8
8
  - name: fcrepo
9
- version: 0.6.1
9
+ version: 0.8.0
10
10
  repository: oci://ghcr.io/samvera
11
11
  condition: fcrepo.enabled
12
12
  - name: memcached
@@ -26,6 +26,6 @@ dependencies:
26
26
  repository: https://charts.bitnami.com/bitnami
27
27
  condition: redis.enabled
28
28
  - name: solr
29
- version: 0.2.2
29
+ version: 1.0.1
30
30
  repository: https://charts.bitnami.com/bitnami
31
31
  condition: solr.enabled
@@ -90,12 +90,58 @@ For those interested in trying out or contributing to this Chart, it's helpful
90
90
  to setup a simple cluster locally. Various projects exist to make this easy; we
91
91
  recommend [`k3d`][k3d] or [minikube][minikube].
92
92
 
93
- For example, with `k3d`:
93
+ ### Getting Started with K3D
94
+
95
+ Make sure you have `docker`, `k3d`, and `helm` installed (e.g., for OSX run `brew install k3d` and `brew install helm`; and install `Docker Desktop`).
96
+
97
+ Make sure you have Docker up and running.
98
+
99
+ Run the following command; it will pull images and when finished you'll have a Kubernetes cluster running across a number of Docker containers.
94
100
 
95
101
  ```sh
96
102
  k3d cluster create dev-cluster --api-port 6550 -p 80:80@loadbalancer --agents 3
97
103
  ```
98
104
 
105
+ When it's done, you should see something like the following output:
106
+
107
+ ```sh
108
+ INFO[0251] You can now use it like this:
109
+ kubectl config use-context k3d-dev-cluster
110
+ kubectl cluster-info
111
+ ```
112
+
113
+ Then update the helm charts with the following:
114
+
115
+ ```sh
116
+ HELM_EXPERIMENTAL_OCI=1 helm dependency update chart/hyrax
117
+ ```
118
+
119
+ Without the `HELM_EXPERIMENTAL_OCI=1` switch you might see the following error:
120
+
121
+ ```sh
122
+ repository oci://ghcr.io/samvera is an OCI registry: this feature has been marked as experimental and is not enabled by default. Please set HELM_EXPERIMENTAL_OCI=1 in your environment to use this feature”
123
+ ```
124
+
125
+ With the following command, you'll next want to install hyrax into a namespace. The namespace directive helps convey the meaning of the kubernetes cluster; and helps you manage all of the resources for that namespace (e.g., "production" or "testing").
126
+
127
+ ```sh
128
+ helm install --create-namespace --namespace hyrax dassie chart/hyrax
129
+ ```
130
+
131
+ This creates the Helm release named `dassie`, in the namespace `hyrax`. This command will echo instructions for exposing the running application URL.
132
+
133
+ You'll be downloading a lot of packages, and this will take quite a bit of time (depending on your bandwidth, and depending on how your ISP allocates resources, you may experience network connectivity issues that are VERY hard to troubleshoot; at least that was Jeremy's experience as he kept getting `ImagePullBackOff` errors. The recommendation, find a different network to install Kubernetes).
134
+
135
+ You can check the status by running `kubectl --namespace hyrax get pods --watch`. To learn more about a failed pod, you can run `kubectl describe pod <named pod> --namespace hyrax`. The events section (at the bottom of the output) will be useful for troubleshooting.
136
+
137
+ Some shell commands of house cleaning and destruction:
138
+
139
+ * To stop the cluster: `k3d cluster stop dev-cluster`.
140
+ * To delete the cluster: `k3d cluster delete dev-cluster`.
141
+ * Remove existing docker instances: `docker rm $(docker ps -q -f status=exited)`
142
+ * Remove hanging docker instances: `docker rm $(docker ps -a -q) -f`
143
+ * Removing dangling docker images: `docker rmi $(docker images -f "dangling=true" -q)`
144
+
99
145
  [containers]: ../../CONTAINERS.md#hyrax-image
100
146
  [dassie]: ../../.dassie/README.md
101
147
  [dassie-image]: https://hub.docker.com/r/samveralabs/dassie
@@ -74,7 +74,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
74
74
  {{- if .Values.fcrepo.enabled }}
75
75
  {{- include "hyrax.fcrepo.fullname" . }}
76
76
  {{- else }}
77
- {{- .Values.externalFcrepoHost }}
77
+ {{- .Values.externalFcrepoHost | default "NO_FCREPO_HOST_DEFINED" }}
78
78
  {{- end }}
79
79
  {{- end -}}
80
80
 
@@ -25,12 +25,10 @@ data:
25
25
  {{- if .Values.redis.enabled }}
26
26
  REDIS_HOST: {{ template "hyrax.redis.host" . }}
27
27
  {{- end }}
28
- {{- if .Values.fcrepo.enabled }}
29
- FCREPO_BASE_PATH: {{ .Values.fcrepoBasePathOverride | default (printf "/%s" (include "hyrax.fullname" .)) | quote }}
30
28
  FCREPO_HOST: {{ template "hyrax.fcrepo.host" . }}
29
+ FCREPO_BASE_PATH: {{ .Values.fcrepoBasePathOverride | default (printf "/%s" (include "hyrax.fullname" .)) | quote }}
31
30
  FCREPO_PORT: {{ .Values.fcrepo.servicePort | default 8080 | quote }}
32
31
  FCREPO_REST_PATH: {{ .Values.fcrepo.restPath | default "rest" }}
33
- {{- end }}
34
32
  REDIS_PROVIDER: SIDEKIQ_REDIS_URL
35
33
  {{- if .Values.minio.enabled }}
36
34
  MINIO_ENDPOINT: {{ template "hyrax.minio.fullname" . }}
@@ -20,9 +20,6 @@ spec:
20
20
  {{- include "hyrax.selectorLabels" . | nindent 8 }}
21
21
  spec:
22
22
  initContainers:
23
- {{- if .Values.worker.extraInitContainers }}
24
- {{- toYaml .Values.worker.extraInitContainers | nindent 8 }}
25
- {{- end }}
26
23
  - name: db-wait
27
24
  image: "{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag | default .Chart.AppVersion }}"
28
25
  imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
@@ -37,6 +34,9 @@ spec:
37
34
  - sh
38
35
  - -c
39
36
  - db-wait.sh "$REDIS_HOST:6379"
37
+ {{- if .Values.worker.extraInitContainers }}
38
+ {{- toYaml .Values.worker.extraInitContainers | nindent 8 }}
39
+ {{- end }}
40
40
  {{- with .Values.imagePullSecrets }}
41
41
  imagePullSecrets:
42
42
  {{- toYaml . | nindent 8 }}
@@ -82,6 +82,9 @@ spec:
82
82
  {{- end }}
83
83
  resources:
84
84
  {{- toYaml .Values.worker.resources | nindent 12 }}
85
+ {{- with .Values.extraContainerConfiguration }}
86
+ {{- toYaml . | nindent 10 }}
87
+ {{- end }}
85
88
  volumes:
86
89
  - name: "derivatives"
87
90
  {{- if and .Values.derivativesVolume.enabled .Values.derivativesVolume.existingClaim }}
@@ -21,9 +21,6 @@ spec:
21
21
  {{- include "hyrax.selectorLabels" . | nindent 8 }}
22
22
  spec:
23
23
  initContainers:
24
- {{- if .Values.extraInitContainers }}
25
- {{- toYaml .Values.extraInitContainers | nindent 8 }}
26
- {{- end }}
27
24
  {{- if .Values.loadSolrConfigSet }}
28
25
  - name: load-solr-config
29
26
  image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
@@ -46,6 +43,7 @@ spec:
46
43
  solrcloud-upload-configset.sh /app/samvera/hyrax-webapp/solr/conf &&
47
44
  solrcloud-assign-configset.sh
48
45
  {{- end }}
46
+ {{- if not .Values.skipDbMigrateSeed }}
49
47
  - name: db-setup
50
48
  image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
51
49
  imagePullPolicy: {{ .Values.image.pullPolicy }}
@@ -67,6 +65,10 @@ spec:
67
65
  - sh
68
66
  - -c
69
67
  - db-migrate-seed.sh
68
+ {{- end }}
69
+ {{- if .Values.extraInitContainers }}
70
+ {{- toYaml .Values.extraInitContainers | nindent 8 }}
71
+ {{- end }}
70
72
  {{- with .Values.imagePullSecrets }}
71
73
  imagePullSecrets:
72
74
  {{- toYaml . | nindent 8 }}
@@ -142,6 +144,9 @@ spec:
142
144
  {{- end }}
143
145
  resources:
144
146
  {{- toYaml .Values.resources | nindent 12 }}
147
+ {{- with .Values.extraContainerConfiguration }}
148
+ {{- toYaml . | nindent 10 }}
149
+ {{- end }}
145
150
  volumes:
146
151
  - name: "branding"
147
152
  {{- if and .Values.brandingVolume.enabled .Values.brandingVolume.existingClaim }}
@@ -12,6 +12,9 @@ image:
12
12
 
13
13
  # use true to skip loading Hyrax engine database seed file
14
14
  skipHyraxEngineSeed: false
15
+ # use true to skip running the `db-setup` initContainer
16
+ # this may be desirable for downstream chart users to customize their database setup
17
+ skipDbMigrateSeed: false
15
18
 
16
19
  # use false to skip the configset management init container
17
20
  loadSolrConfigSet: true
@@ -53,6 +56,15 @@ extraInitContainers: []
53
56
  #
54
57
  extraEnvFrom: []
55
58
 
59
+ # Extra container spec configuration
60
+ # Example: (enabling pry debugging for local development)
61
+ # Note: with this enabled, one can `kubectl attach` to a running container with a binding.pry breakpoint
62
+ #
63
+ #extraContainerConfiguration:
64
+ # stdin: true
65
+ # tty: true
66
+ extraContainerConfiguration: []
67
+
56
68
  # an existing volume containing a Hyrax-based application
57
69
  # must be a ReadWriteMany volume if worker is enabled
58
70
  applicationExistingClaim: ""
@@ -68,7 +68,7 @@
68
68
  "file": "app/controllers/hyrax/users_controller.rb",
69
69
  "line": 38,
70
70
  "link": "http://brakemanscanner.org/docs/warning_types/sql_injection/",
71
- "code": "::User.where(*base_query).where(\"#{Hydra.config.user_key_field} like lower(?) OR display_name like lower(?)\", (nil or ((\"%\" + query.downcase) + \"%\")), (nil or ((\"%\" + query.downcase) + \"%\"))).registered.where(\"#{Hydra.config.user_key_field} not in (?)\", [::User.batch_user_key, ::User.audit_user_key])",
71
+ "code": "::User.where(*base_query).where(\"#{Hydra.config.user_key_field} like lower(?) OR display_name like lower(?)\", (nil or ((\"%\" + query.downcase) + \"%\")), (nil or ((\"%\" + query.downcase) + \"%\"))).registered.where(\"#{Hydra.config.user_key_field} not in (?)\", [::User.system_user_key, ::User.batch_user_key, ::User.audit_user_key])",
72
72
  "render_path": null,
73
73
  "location": {
74
74
  "type": "method",
@@ -88,7 +88,7 @@
88
88
  "file": "app/models/concerns/hyrax/user.rb",
89
89
  "line": 27,
90
90
  "link": "http://brakemanscanner.org/docs/warning_types/sql_injection/",
91
- "code": "where(\"#{Hydra.config.user_key_field} not in (?)\", [::User.batch_user_key, ::User.audit_user_key])",
91
+ "code": "where(\"#{Hydra.config.user_key_field} not in (?)\", [::User.system_user_key, ::User.batch_user_key, ::User.audit_user_key])",
92
92
  "render_path": null,
93
93
  "location": {
94
94
  "type": "method",
@@ -1215,7 +1215,7 @@ de:
1215
1215
  subject: Stapelweises Hochladen abgeschlossen
1216
1216
  title: Dateien erfolgreich hochgeladen
1217
1217
  models:
1218
- hyrax/file_set: Dateisatz
1218
+ file_set: Dateisatz
1219
1219
  hyrax/pcdm_collection: Sammlung
1220
1220
  hyrax/work: Arbeit
1221
1221
  my:
@@ -1221,7 +1221,7 @@ en:
1221
1221
  subject: Batch upload complete
1222
1222
  title: Files uploaded successfully
1223
1223
  models:
1224
- hyrax/file_set: File Set
1224
+ file_set: File Set
1225
1225
  hyrax/pcdm_collection: Collection
1226
1226
  hyrax/work: Work
1227
1227
  my:
@@ -1222,7 +1222,7 @@ es:
1222
1222
  subject: Subida en lote completa
1223
1223
  title: Archivos cargados satisfactoriamente
1224
1224
  models:
1225
- hyrax/file_set: Conjunto de archivos
1225
+ file_set: Conjunto de archivos
1226
1226
  hyrax/pcdm_collection: Colección
1227
1227
  hyrax/work: Trabaja
1228
1228
  my:
@@ -1221,7 +1221,7 @@ fr:
1221
1221
  subject: Téléchargement par lots complet
1222
1222
  title: Fichiers téléchargés avec succès
1223
1223
  models:
1224
- hyrax/file_set: Ensemble de fichiers
1224
+ file_set: Ensemble de fichiers
1225
1225
  hyrax/pcdm_collection: Collection
1226
1226
  hyrax/work: Travailler
1227
1227
  my:
@@ -1220,7 +1220,7 @@ it:
1220
1220
  subject: Caricamento batch completato
1221
1221
  title: I file sono stati caricati correttamente
1222
1222
  models:
1223
- hyrax/file_set: Set di file
1223
+ file_set: Set di file
1224
1224
  hyrax/pcdm_collection: Collezione
1225
1225
  hyrax/work: Opera
1226
1226
  my: