hyrax 3.0.1 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +49 -19
- data/.dassie/.env +1 -2
- data/.dassie/Gemfile +18 -9
- data/.dassie/app/controllers/catalog_controller.rb +6 -0
- data/.dassie/app/models/user.rb +0 -2
- data/.dassie/config/analytics.yml +12 -5
- data/.dassie/config/environments/development.rb +2 -0
- data/.dassie/config/initializers/hyrax.rb +7 -0
- data/.dassie/config/role_map.yml +2 -0
- data/.dassie/db/migrate/20210921150120_enable_uuid_extension.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150121_create_orm_resources.valkyrie_engine.rb +19 -0
- data/.dassie/db/migrate/20210921150122_add_model_type_to_orm_resources.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150123_change_model_type_to_internal_model.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150124_create_path_gin_index.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150125_create_internal_resource_index.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150126_create_updated_at_index.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20210921150127_add_optimistic_locking_to_orm_resources.valkyrie_engine.rb +7 -0
- data/.dassie/db/migrate/20211130181150_create_default_administrative_set.rb +8 -0
- data/.dassie/db/schema.rb +20 -1
- data/.dassie/db/seeds.rb +1 -1
- data/.dockerignore +3 -0
- data/.env +8 -6
- data/.github/workflows/main.yml +17 -0
- data/.github/workflows/release.yml +17 -0
- data/.gitignore +1 -0
- data/.regen +1 -1
- data/.rubocop.yml +4 -0
- data/CONTAINERS.md +33 -10
- data/Dockerfile +14 -9
- data/Gemfile +21 -27
- data/README.md +37 -0
- data/app/actors/hyrax/actors/base_actor.rb +2 -2
- data/app/actors/hyrax/actors/collections_membership_actor.rb +3 -3
- data/app/actors/hyrax/actors/create_with_remote_files_actor.rb +85 -63
- data/app/actors/hyrax/actors/create_with_remote_files_ordered_members_actor.rb +7 -42
- data/app/actors/hyrax/actors/file_set_actor.rb +12 -5
- data/app/assets/javascripts/hyrax/admin/graphs.es6 +34 -37
- data/app/assets/javascripts/hyrax/analytics_events.js +69 -0
- data/app/assets/javascripts/hyrax/collapse.js +24 -0
- data/app/assets/javascripts/hyrax/collections.js +1 -2
- data/app/assets/javascripts/hyrax/ga_events.js +2 -8
- data/app/assets/javascripts/hyrax/reports-buttons.js +33 -0
- data/app/assets/javascripts/hyrax.js +2 -1
- data/app/assets/stylesheets/_bootstrap-default-overrides.scss +9 -0
- data/app/assets/stylesheets/hyrax/_styles.scss +5 -0
- data/app/authorities/qa/authorities/collections.rb +4 -5
- data/app/authorities/qa/authorities/find_works.rb +1 -1
- data/app/controllers/concerns/hyrax/breadcrumbs_for_collection_analytics.rb +26 -0
- data/app/controllers/concerns/hyrax/breadcrumbs_for_works_analytics.rb +26 -0
- data/app/controllers/concerns/hyrax/collections_controller_behavior.rb +30 -10
- data/app/controllers/concerns/hyrax/controller.rb +35 -2
- data/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +21 -9
- data/app/controllers/concerns/hyrax/leases_controller_behavior.rb +14 -5
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +22 -3
- data/app/controllers/hyrax/admin/admin_sets_controller.rb +2 -19
- data/app/controllers/hyrax/admin/analytics/analytics_controller.rb +40 -0
- data/app/controllers/hyrax/admin/analytics/collection_reports_controller.rb +61 -0
- data/app/controllers/hyrax/admin/analytics/work_reports_controller.rb +122 -0
- data/app/controllers/hyrax/admin/permission_template_accesses_controller.rb +5 -6
- data/app/controllers/hyrax/admin/workflows_controller.rb +8 -2
- data/app/controllers/hyrax/collections_controller.rb +6 -1
- data/app/controllers/hyrax/dashboard/collection_members_controller.rb +24 -17
- data/app/controllers/hyrax/dashboard/collections_controller.rb +112 -37
- data/app/controllers/hyrax/dashboard/nest_collections_controller.rb +75 -39
- data/app/controllers/hyrax/dashboard_controller.rb +8 -0
- data/app/controllers/hyrax/file_sets_controller.rb +49 -13
- data/app/controllers/hyrax/my_controller.rb +4 -4
- data/app/controllers/hyrax/permissions_controller.rb +3 -4
- data/app/controllers/hyrax/stats_controller.rb +3 -1
- data/app/controllers/hyrax/workflow_actions_controller.rb +11 -6
- data/app/forms/hyrax/forms/administrative_set_form.rb +62 -0
- data/app/forms/hyrax/forms/collection_form.rb +9 -5
- data/app/forms/hyrax/forms/dashboard/nest_collection_form.rb +38 -6
- data/app/forms/hyrax/forms/file_set_form.rb +46 -0
- data/app/forms/hyrax/forms/pcdm_collection_form.rb +67 -0
- data/app/forms/hyrax/forms/permission.rb +23 -0
- data/app/forms/hyrax/forms/permission_template_form.rb +8 -2
- data/app/forms/hyrax/forms/resource_form.rb +34 -26
- data/app/forms/hyrax/forms/work_form.rb +5 -2
- data/app/forms/hyrax/forms/workflow_action_form.rb +4 -0
- data/app/helpers/hyrax/batch_edits_helper.rb +3 -1
- data/app/helpers/hyrax/collections_helper.rb +88 -2
- data/app/helpers/hyrax/dashboard_helper_behavior.rb +16 -5
- data/app/helpers/hyrax/embargo_helper.rb +4 -0
- data/app/helpers/hyrax/file_set_helper.rb +25 -6
- data/app/helpers/hyrax/hyrax_helper_behavior.rb +9 -0
- data/app/helpers/hyrax/lease_helper.rb +4 -0
- data/app/helpers/hyrax/url_helper.rb +4 -1
- data/app/helpers/hyrax/work_form_helper.rb +53 -0
- data/app/indexers/hyrax/administrative_set_indexer.rb +18 -0
- data/app/indexers/hyrax/pcdm_collection_indexer.rb +2 -0
- data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +3 -1
- data/app/indexers/hyrax/valkyrie_indexer.rb +3 -3
- data/app/indexers/hyrax/valkyrie_work_indexer.rb +1 -1
- data/app/inputs/controlled_vocabulary_input.rb +2 -5
- data/app/jobs/attach_files_to_work_job.rb +19 -10
- data/app/jobs/attach_files_to_work_with_ordered_members_job.rb +6 -5
- data/app/jobs/characterize_job.rb +28 -1
- data/app/jobs/ingest_local_file_job.rb +18 -2
- data/app/jobs/inherit_permissions_job.rb +9 -5
- data/app/jobs/valkyrie_ingest_job.rb +56 -0
- data/app/models/admin_set.rb +22 -30
- data/app/models/collection_branding_info.rb +25 -9
- data/app/models/concerns/hyrax/ability/admin_set_ability.rb +31 -7
- data/app/models/concerns/hyrax/ability/collection_ability.rb +35 -20
- data/app/models/concerns/hyrax/ability/collection_type_ability.rb +1 -1
- data/app/models/concerns/hyrax/ability.rb +31 -8
- data/app/models/concerns/hyrax/collection_behavior.rb +17 -44
- data/app/models/concerns/hyrax/embargoable.rb +24 -0
- data/app/models/concerns/hyrax/file_set/characterization.rb +18 -12
- data/app/models/concerns/hyrax/solr_document/metadata.rb +1 -0
- data/app/models/concerns/hyrax/solr_document_behavior.rb +11 -54
- data/app/models/concerns/hyrax/suppressible.rb +5 -0
- data/app/models/concerns/hyrax/user.rb +9 -3
- data/app/models/concerns/hyrax/work_behavior.rb +1 -1
- data/app/models/file_download_stat.rb +4 -4
- data/app/models/hyrax/administrative_set.rb +7 -1
- data/app/models/hyrax/default_administrative_set.rb +42 -0
- data/app/models/hyrax/file_set.rb +6 -0
- data/app/models/hyrax/pcdm_collection.rb +1 -0
- data/app/models/hyrax/permission.rb +1 -1
- data/app/models/hyrax/permission_template.rb +112 -12
- data/app/models/hyrax/statistic.rb +31 -4
- data/app/models/hyrax/virus_scanner.rb +27 -18
- data/app/models/hyrax/work.rb +1 -0
- data/app/models/hyrax/workflow_action_info.rb +16 -0
- data/app/models/sipity/agent.rb +1 -0
- data/app/models/sipity/comment.rb +17 -0
- data/app/models/sipity/entity.rb +30 -8
- data/app/models/sipity/workflow.rb +1 -0
- data/app/models/sipity.rb +53 -2
- data/app/presenters/hyrax/admin/dashboard_presenter.rb +8 -6
- data/app/presenters/hyrax/admin/repository_growth_presenter.rb +10 -5
- data/app/presenters/hyrax/admin/user_activity_presenter.rb +8 -12
- data/app/presenters/hyrax/admin_set_options_presenter.rb +12 -8
- data/app/presenters/hyrax/admin_set_presenter.rb +13 -4
- data/app/presenters/hyrax/admin_set_selection_presenter.rb +116 -0
- data/app/presenters/hyrax/collection_presenter.rb +34 -9
- data/app/presenters/hyrax/file_set_presenter.rb +8 -1
- data/app/presenters/hyrax/file_usage.rb +3 -2
- data/app/presenters/hyrax/menu_presenter.rb +4 -0
- data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +119 -0
- data/app/presenters/hyrax/stats_usage_presenter.rb +2 -1
- data/app/presenters/hyrax/trophy_presenter.rb +33 -4
- data/app/presenters/hyrax/user_profile_presenter.rb +11 -1
- data/app/presenters/hyrax/version_list_presenter.rb +19 -0
- data/app/presenters/hyrax/version_presenter.rb +3 -2
- data/app/presenters/hyrax/work_show_presenter.rb +37 -8
- data/app/presenters/hyrax/work_usage.rb +6 -3
- data/app/renderers/hyrax/renderers/attribute_renderer.rb +10 -2
- data/app/search_builders/hyrax/README.md +1 -1
- data/app/search_builders/hyrax/abstract_type_relation.rb +4 -2
- data/app/search_builders/hyrax/admin_set_search_builder.rb +1 -1
- data/app/search_builders/hyrax/collection_member_search_builder.rb +6 -1
- data/app/search_builders/hyrax/dashboard/collections_search_builder.rb +1 -1
- data/app/search_builders/hyrax/exposed_models_relation.rb +1 -1
- data/app/search_builders/hyrax/filter_by_type.rb +1 -2
- data/app/search_builders/hyrax/my/collections_search_builder.rb +2 -2
- data/app/search_builders/hyrax/nested_collections_parent_search_builder.rb +1 -1
- data/app/search_builders/hyrax/single_collection_search_builder.rb +1 -1
- data/app/services/hyrax/admin_set_create_service.rb +199 -53
- data/app/services/hyrax/analytics/google/events.rb +37 -0
- data/app/services/hyrax/analytics/google/events_daily.rb +72 -0
- data/app/services/hyrax/analytics/google/visits.rb +44 -0
- data/app/services/hyrax/analytics/google/visits_daily.rb +49 -0
- data/app/services/hyrax/analytics/google.rb +204 -0
- data/app/services/hyrax/analytics/matomo.rb +193 -0
- data/app/services/hyrax/analytics/results.rb +79 -0
- data/app/services/hyrax/analytics.rb +12 -82
- data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +134 -0
- data/app/services/hyrax/collection_types/permissions_service.rb +1 -1
- data/app/services/hyrax/collections/collection_member_search_service.rb +72 -0
- data/app/services/hyrax/collections/collection_member_service.rb +122 -27
- data/app/services/hyrax/collections/migration_service.rb +4 -2
- data/app/services/hyrax/collections/nested_collection_persistence_service.rb +12 -13
- data/app/services/hyrax/collections/nested_collection_query_service.rb +10 -3
- data/app/services/hyrax/collections/permissions_create_service.rb +82 -78
- data/app/services/hyrax/collections/permissions_service.rb +1 -1
- data/app/services/hyrax/contextual_path.rb +24 -1
- data/app/services/hyrax/curation_concern.rb +24 -2
- data/app/services/hyrax/custom_queries/find_file_metadata.rb +7 -5
- data/app/services/hyrax/custom_queries/navigators/parent_collections_navigator.rb +46 -0
- data/app/services/hyrax/default_middleware_stack.rb +11 -0
- data/app/services/hyrax/edit_permissions_service.rb +74 -41
- data/app/services/hyrax/ensure_well_formed_admin_set_service.rb +3 -3
- data/app/services/hyrax/find_objects_via_solr_service.rb +31 -0
- data/app/services/hyrax/listeners/acl_index_listener.rb +3 -1
- data/app/services/hyrax/listeners/active_fedora_acl_index_listener.rb +4 -1
- data/app/services/hyrax/listeners/batch_notification_listener.rb +3 -1
- data/app/services/hyrax/listeners/file_metadata_listener.rb +19 -0
- data/app/services/hyrax/listeners/file_set_lifecycle_listener.rb +6 -2
- data/app/services/hyrax/listeners/file_set_lifecycle_notification_listener.rb +6 -2
- data/app/services/hyrax/listeners/member_cleanup_listener.rb +3 -0
- data/app/services/hyrax/listeners/metadata_index_listener.rb +33 -11
- data/app/services/hyrax/listeners/object_lifecycle_listener.rb +9 -3
- data/app/services/hyrax/listeners/proxy_deposit_listener.rb +3 -1
- data/app/services/hyrax/listeners/trophy_cleanup_listener.rb +3 -0
- data/app/services/hyrax/listeners/workflow_listener.rb +3 -1
- data/app/services/hyrax/listeners.rb +8 -0
- data/app/services/hyrax/multiple_membership_checker.rb +53 -29
- data/app/services/hyrax/permission_manager.rb +4 -4
- data/app/services/hyrax/resource_status.rb +7 -0
- data/app/services/hyrax/restriction_service.rb +4 -0
- data/app/services/hyrax/search_service.rb +4 -2
- data/app/services/hyrax/solr_query_builder_service.rb +45 -8
- data/app/services/hyrax/solr_query_service.rb +224 -0
- data/app/services/hyrax/solr_service.rb +9 -2
- data/app/services/hyrax/statistics/collections/over_time.rb +2 -1
- data/app/services/hyrax/statistics/depositors/summary.rb +2 -1
- data/app/services/hyrax/statistics/users/over_time.rb +8 -5
- data/app/services/hyrax/statistics/works/over_time.rb +10 -0
- data/app/services/hyrax/visibility_intention.rb +20 -2
- data/app/services/hyrax/work_uploads_handler.rb +21 -3
- data/app/services/hyrax/workflow/abstract_notification.rb +2 -2
- data/app/services/hyrax/workflow/action_taken_service.rb +16 -4
- data/app/services/hyrax/workflow/actionable_objects.rb +70 -0
- data/app/services/hyrax/workflow/activate_object.rb +5 -4
- data/app/services/hyrax/workflow/changes_required_notification.rb +5 -4
- data/app/services/hyrax/workflow/deactivate_object.rb +7 -5
- data/app/services/hyrax/workflow/deposited_notification.rb +8 -4
- data/app/services/hyrax/workflow/grant_edit_to_depositor.rb +7 -3
- data/app/services/hyrax/workflow/grant_read_to_depositor.rb +10 -3
- data/app/services/hyrax/workflow/object_in_workflow_decorator.rb +31 -0
- data/app/services/hyrax/workflow/revoke_edit_from_depositor.rb +8 -2
- data/app/services/hyrax/workflow/status_list_service.rb +43 -13
- data/app/services/hyrax/workflow/workflow_action_service.rb +4 -1
- data/app/views/hyrax/admin/admin_sets/_form.html.erb +1 -1
- data/app/views/hyrax/admin/analytics/_date_range_form.html.erb +11 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_custom_range.html.erb +39 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_monthly_summary.html.erb +48 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_summary.html.erb +55 -0
- data/app/views/hyrax/admin/analytics/collection_reports/_top_collections.html.erb +55 -0
- data/app/views/hyrax/admin/analytics/collection_reports/index.html.erb +70 -0
- data/app/views/hyrax/admin/analytics/collection_reports/show.html.erb +94 -0
- data/app/views/hyrax/admin/analytics/work_reports/_custom_range.html.erb +43 -0
- data/app/views/hyrax/admin/analytics/work_reports/_monthly_summary.html.erb +35 -0
- data/app/views/hyrax/admin/analytics/work_reports/_summary.html.erb +60 -0
- data/app/views/hyrax/admin/analytics/work_reports/_top_file_set_downloads.html.erb +33 -0
- data/app/views/hyrax/admin/analytics/work_reports/_top_works.html.erb +40 -0
- data/app/views/hyrax/admin/analytics/work_reports/_work_counts.html.erb +18 -0
- data/app/views/hyrax/admin/analytics/work_reports/_work_files.html.erb +41 -0
- data/app/views/hyrax/admin/analytics/work_reports/index.html.erb +77 -0
- data/app/views/hyrax/admin/analytics/work_reports/show.html.erb +90 -0
- data/app/views/hyrax/admin/stats/show.html.erb +1 -1
- data/app/views/hyrax/base/_form_child_work_relationships.html.erb +1 -1
- data/app/views/hyrax/base/_form_relationships.html.erb +1 -2
- data/app/views/hyrax/base/_form_rendering.html.erb +1 -1
- data/app/views/hyrax/base/_form_representative.html.erb +1 -1
- data/app/views/hyrax/base/_form_thumbnail.html.erb +1 -1
- data/app/views/hyrax/base/_form_visibility_error.html.erb +2 -0
- data/app/views/hyrax/base/_guts4form.html.erb +3 -3
- data/app/views/hyrax/base/_relationships_parent_row.html.erb +0 -1
- data/app/views/hyrax/base/_representative_media.html.erb +1 -1
- data/app/views/hyrax/base/_show_actions.html.erb +2 -2
- data/app/views/hyrax/base/_work_button_row.html.erb +1 -1
- data/app/views/hyrax/base/show.html.erb +6 -0
- data/app/views/hyrax/batch_uploads/_form.html.erb +1 -1
- data/app/views/hyrax/collections/show.html.erb +4 -0
- data/app/views/hyrax/dashboard/_repository_growth.html.erb +5 -5
- data/app/views/hyrax/dashboard/_resource_type_graph.html.erb +41 -0
- data/app/views/hyrax/dashboard/_sidebar.html.erb +4 -1
- data/app/views/hyrax/dashboard/_tabs.html.erb +11 -0
- data/app/views/hyrax/dashboard/_user_activity.html.erb +17 -23
- data/app/views/hyrax/dashboard/_user_activity_graph.html.erb +55 -0
- data/app/views/hyrax/dashboard/_visibility_graph.html.erb +31 -0
- data/app/views/hyrax/dashboard/_work_type_graph.html.erb +41 -0
- data/app/views/hyrax/dashboard/collections/_collection_title.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_form.html.erb +6 -5
- data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_sort_and_per_page.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/edit.html.erb +4 -2
- data/app/views/hyrax/dashboard/collections/new.html.erb +4 -2
- data/app/views/hyrax/dashboard/collections/show.html.erb +1 -1
- data/app/views/hyrax/dashboard/show_admin.html.erb +24 -45
- data/app/views/hyrax/dashboard/sidebar/_activity.html.erb +22 -0
- data/app/views/hyrax/file_sets/_actions.html.erb +4 -3
- data/app/views/hyrax/file_sets/edit.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_audio.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_default.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_image.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_office_document.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_pdf.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_video.html.erb +1 -1
- data/app/views/hyrax/file_sets/show.html.erb +7 -1
- data/app/views/hyrax/homepage/index.html.erb +1 -1
- data/app/views/hyrax/my/_admin_set_action_menu.html.erb +0 -11
- data/app/views/hyrax/my/_collection_action_menu.html.erb +1 -2
- data/app/views/hyrax/my/collections/_list_collections.html.erb +1 -1
- data/app/views/hyrax/my/collections/_modal_add_subcollection.html.erb +3 -5
- data/app/views/hyrax/my/collections/_modal_collection_types_to_create.html.erb +1 -1
- data/app/views/hyrax/my/collections/index.html.erb +1 -1
- data/app/views/hyrax/stats/_downloads.html.erb +18 -0
- data/app/views/hyrax/stats/_pageviews.html.erb +18 -0
- data/app/views/hyrax/stats/work.html.erb +17 -9
- data/app/views/layouts/_head_tag_content.html.erb +7 -2
- data/app/views/layouts/hyrax/dashboard.html.erb +1 -0
- data/app/views/layouts/hyrax.html.erb +1 -0
- data/app/views/{_ga.html.erb → shared/_ga.html.erb} +3 -7
- data/app/views/shared/_matomo.html.erb +15 -0
- data/app/views/shared/_read_only.html.erb +5 -0
- data/bin/db-migrate-seed.sh +3 -1
- data/bin/hyrax-entrypoint.sh +0 -14
- data/bin/solrcloud-assign-configset.sh +11 -3
- data/bin/solrcloud-upload-configset.sh +17 -6
- data/chart/hyrax/Chart.yaml +9 -5
- data/chart/hyrax/README.md +52 -5
- data/chart/hyrax/templates/_helpers.tpl +15 -1
- data/chart/hyrax/templates/branding-pvc.yaml +2 -2
- data/chart/hyrax/templates/configmap-env.yaml +6 -2
- data/chart/hyrax/templates/deployment-worker.yaml +42 -5
- data/chart/hyrax/templates/deployment.yaml +53 -0
- data/chart/hyrax/templates/derivatives-pvc.yaml +2 -2
- data/chart/hyrax/templates/ingress.yaml +13 -4
- data/chart/hyrax/templates/secrets.yaml +8 -0
- data/chart/hyrax/templates/uploads-pvc.yaml +2 -2
- data/chart/hyrax/values.yaml +84 -2
- data/config/brakeman.ignore +2 -2
- data/config/features.rb +3 -0
- data/config/i18n-tasks.yml +2 -2
- data/config/initializers/1_healthz.rb +1 -0
- data/config/initializers/listeners.rb +5 -4
- data/config/initializers/valkryrie_storage.rb +7 -0
- data/config/locales/hyrax.de.yml +195 -1
- data/config/locales/hyrax.en.yml +192 -13
- data/config/locales/hyrax.es.yml +195 -1
- data/config/locales/hyrax.fr.yml +195 -1
- data/config/locales/hyrax.it.yml +195 -1
- data/config/locales/hyrax.pt-BR.yml +195 -1
- data/config/locales/hyrax.zh.yml +195 -1
- data/config/routes.rb +4 -0
- data/db/seeds.rb +1 -1
- data/docker-compose.yml +42 -9
- data/documentation/developing-your-hyrax-based-app.md +4 -4
- data/documentation/legacyREADME.md +4 -4
- data/hyrax.gemspec +4 -2
- data/lib/generators/hyrax/templates/catalog_controller.rb +3 -1
- data/lib/generators/hyrax/templates/config/analytics.yml +13 -7
- data/lib/generators/hyrax/templates/config/initializers/hyrax.rb +15 -13
- data/lib/generators/hyrax/templates/db/migrate/20211130181150_create_default_administrative_set.rb.erb +8 -0
- data/lib/generators/hyrax/work/templates/feature_spec.rb.erb +4 -2
- data/lib/generators/hyrax/work_resource/templates/indexer_spec.rb.erb +1 -0
- data/lib/hyrax/active_fedora_dummy_model.rb +62 -0
- data/lib/hyrax/collection_name.rb +6 -2
- data/lib/hyrax/configuration.rb +114 -4
- data/lib/hyrax/engine.rb +9 -6
- data/lib/hyrax/errors.rb +2 -0
- data/lib/hyrax/form_fields.rb +1 -0
- data/lib/hyrax/publisher.rb +16 -0
- data/lib/hyrax/resource_name.rb +1 -0
- data/lib/hyrax/resource_sync/change_list_writer.rb +2 -2
- data/lib/hyrax/resource_sync/resource_list_writer.rb +2 -2
- data/lib/hyrax/specs/capybara.rb +5 -3
- data/lib/hyrax/specs/shared_specs/hydra_works.rb +2 -0
- data/lib/hyrax/specs/shared_specs/indexers.rb +6 -0
- data/lib/hyrax/specs/shared_specs/valkyrie_storage_versions.rb +9 -0
- data/lib/hyrax/transactions/admin_set_create.rb +22 -0
- data/lib/hyrax/transactions/collection_create.rb +25 -0
- data/lib/hyrax/transactions/collection_update.rb +20 -0
- data/lib/hyrax/transactions/container.rb +58 -0
- data/lib/hyrax/transactions/file_set_destroy.rb +21 -0
- data/lib/hyrax/transactions/steps/add_file_sets.rb +3 -2
- data/lib/hyrax/transactions/steps/add_to_collections.rb +13 -1
- data/lib/hyrax/transactions/steps/add_to_parent.rb +36 -0
- data/lib/hyrax/transactions/steps/apply_collection_type_permissions.rb +29 -0
- data/lib/hyrax/transactions/steps/remove_file_set_from_work.rb +47 -0
- data/lib/hyrax/transactions/steps/save.rb +18 -6
- data/lib/hyrax/transactions/steps/set_collection_type_gid.rb +35 -0
- data/lib/hyrax/transactions/work_create.rb +2 -1
- data/lib/hyrax/valkyrie_can_can_adapter.rb +1 -0
- data/lib/hyrax/valkyrie_simple_path_generator.rb +20 -0
- data/lib/hyrax/version.rb +1 -1
- data/lib/hyrax.rb +9 -0
- data/lib/tasks/collection_type_global_id.rake +1 -1
- data/lib/tasks/default_admin_set.rake +12 -11
- data/lib/tasks/regenerate_derivatives.rake +12 -0
- data/lib/wings/active_fedora_converter/default_work.rb +15 -0
- data/lib/wings/model_transformer.rb +17 -1
- data/lib/wings/orm_converter.rb +18 -2
- data/lib/wings/setup.rb +17 -0
- data/lib/wings/valkyrie/persister.rb +16 -0
- data/lib/wings/valkyrie/storage.rb +56 -1
- data/lib/wings.rb +0 -21
- data/template.rb +1 -1
- data/vendor/assets/javascripts/morris/morris.min.js +1 -7
- data/vendor/assets/stylesheets/morris.js/0.5.1/morris.css +1 -1
- metadata +120 -17
- data/app/views/hyrax/dashboard/_repository_objects.html.erb +0 -28
@@ -21,7 +21,7 @@
|
|
21
21
|
<!-- Page tabs -->
|
22
22
|
<nav><%= render 'tabs' if @managed_collection_count > 0 %></nav>
|
23
23
|
|
24
|
-
<% if can?(:create_any,
|
24
|
+
<% if can?(:create_any, Hyrax.config.collection_class) && @collection_type_list_presenter.any? %>
|
25
25
|
<% if @collection_type_list_presenter.many? %>
|
26
26
|
<% # modal to select type %>
|
27
27
|
<button type="button"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<script>
|
2
|
+
Morris.Bar({
|
3
|
+
element: 'downloads',
|
4
|
+
data: [
|
5
|
+
<% @downloads.list.take(30).reverse.each do |result| %>
|
6
|
+
{ date: "<%= result[0] %>", metric: <%= result[1] %>},
|
7
|
+
<% end %>
|
8
|
+
],
|
9
|
+
xkey: 'date',
|
10
|
+
ykeys: ['metric'],
|
11
|
+
labels: ["<%= t('.downloads') %>"],
|
12
|
+
gridTextSize: '12px',
|
13
|
+
gridLineColor: '#E5E5E5',
|
14
|
+
gridIntegers: true,
|
15
|
+
ymin: 0,
|
16
|
+
resize: true
|
17
|
+
});
|
18
|
+
</script>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<script>
|
2
|
+
Morris.Bar({
|
3
|
+
element: 'pageviews',
|
4
|
+
data: [
|
5
|
+
<% @pageviews.list.take(30).reverse.each do |result| %>
|
6
|
+
{ date: "<%= result[0] %>", metric: <%= result[1] %>},
|
7
|
+
<% end %>
|
8
|
+
],
|
9
|
+
xkey: 'date',
|
10
|
+
ykeys: ['metric'],
|
11
|
+
labels: ["<%= t('.pageviews') %>"],
|
12
|
+
gridTextSize: '12px',
|
13
|
+
gridLineColor: '#E5E5E5',
|
14
|
+
gridIntegers: true,
|
15
|
+
ymin: 0,
|
16
|
+
resize: true
|
17
|
+
});
|
18
|
+
</script>
|
@@ -1,26 +1,34 @@
|
|
1
1
|
<!-- Adapted from jquery-flot examples https://github.com/flot/flot/blob/master/examples/visitors/index.html -->
|
2
2
|
<script>
|
3
3
|
//<![CDATA[
|
4
|
-
|
5
|
-
var hyrax_item_stats = <%= raw json_escape @stats.to_flot.to_json %>;
|
6
|
-
|
4
|
+
var hyrax_item_stats = <%= raw json_escape @pageviews.to_flot.to_json %>;
|
7
5
|
//]]>
|
8
6
|
</script>
|
9
7
|
|
10
|
-
<%= content_tag :h1, @
|
8
|
+
<%= content_tag :h1, @document, class: "lower" %>
|
11
9
|
|
12
10
|
<div class="row">
|
13
11
|
<div class="col-sm-12">
|
14
|
-
<%= content_tag :h2, "
|
12
|
+
<%= content_tag :h2, "#{t('.header')}" %>
|
15
13
|
<div class="alert alert-info">
|
16
14
|
<span class="glyphicon glyphicon-signal large-icon"></span>
|
17
|
-
|
15
|
+
<%= t('total_view', count: @pageviews.range(Hyrax.config.analytics_start_date.to_date, Time.zone.today)) %>
|
16
|
+
<%= t('download', count: @downloads.range(Hyrax.config.analytics_start_date.to_date, Time.zone.today)) %>
|
18
17
|
</div>
|
18
|
+
|
19
19
|
<div class="stats-container">
|
20
|
-
<
|
20
|
+
<h3 class="text-center"><%= t('.pageviews') %></h3>
|
21
|
+
<div id="pageviews">
|
22
|
+
<%= render 'pageviews' %>
|
23
|
+
</div>
|
21
24
|
</div>
|
22
|
-
|
23
|
-
|
25
|
+
|
26
|
+
<div class="stats-container">
|
27
|
+
<h3 class="text-center"><%= t('.downloads') %></h3>
|
28
|
+
<div id="downloads">
|
29
|
+
<%= render 'downloads' %>
|
30
|
+
</div>
|
24
31
|
</div>
|
32
|
+
|
25
33
|
</div>
|
26
34
|
</div>
|
@@ -25,8 +25,13 @@ signed in %>
|
|
25
25
|
|
26
26
|
<%= render 'shared/appearance_styles' %>
|
27
27
|
|
28
|
-
|
29
|
-
|
28
|
+
<% if Hyrax.config.analytics? %>
|
29
|
+
<% if Hyrax.config.analytics_provider == 'google' %>
|
30
|
+
<%= render partial: 'shared/ga', formats: [:html] %>
|
31
|
+
<% elsif Hyrax.config.analytics_provider == 'matomo' %>
|
32
|
+
<%= render partial: 'shared/matomo', formats: [:html] %>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
30
35
|
|
31
36
|
<!-- for extras, e.g., a favicon -->
|
32
37
|
<%= render partial: '/head_tag_extras', formats: [:html] %>
|
@@ -1,20 +1,16 @@
|
|
1
|
-
<%
|
2
|
-
if Hyrax.config.google_analytics_id?
|
3
|
-
tracking_id = Hyrax.config.google_analytics_id
|
4
|
-
%>
|
5
1
|
<script type="text/javascript">
|
6
2
|
var _gaq = _gaq || [];
|
7
|
-
_gaq.push(['_setAccount', '<%=
|
3
|
+
_gaq.push(['_setAccount', '<%= Hyrax::Analytics.config.analytics_id %>']);
|
8
4
|
<% if Rails.env.development? %>
|
9
5
|
// This allows us to look at GA data live from locahost
|
10
6
|
_gaq.push(['_setDomainName', 'none']);
|
11
7
|
<% end %>
|
12
|
-
_gaq.push(['_trackPageview']);
|
13
8
|
|
14
9
|
(function() {
|
15
10
|
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
16
11
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
17
12
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
18
13
|
})();
|
14
|
+
window.analytics = _gaq;
|
19
15
|
</script>
|
20
|
-
|
16
|
+
<meta name="analytics-provider" content="google">
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<script type="text/javascript">
|
2
|
+
var _paq = window._paq || [];
|
3
|
+
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
4
|
+
// _paq.push(['trackPageView']);
|
5
|
+
_paq.push(['enableLinkTracking']);
|
6
|
+
(function() {
|
7
|
+
var u="<%= Hyrax::Analytics.config.base_url %>";
|
8
|
+
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
9
|
+
_paq.push(['setSiteId', "<%= Hyrax::Analytics.config.site_id %>"]);
|
10
|
+
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
11
|
+
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
12
|
+
})();
|
13
|
+
window.analytics = _paq;
|
14
|
+
</script>
|
15
|
+
<meta name="analytics-provider" content="matomo">
|
data/bin/db-migrate-seed.sh
CHANGED
@@ -5,7 +5,9 @@ db-wait.sh "$DB_HOST:$DB_PORT"
|
|
5
5
|
bundle exec rails db:create
|
6
6
|
bundle exec rails db:migrate
|
7
7
|
|
8
|
-
|
8
|
+
if [ "$FCREPO_HOST" ]; then
|
9
|
+
db-wait.sh "$FCREPO_HOST:$FCREPO_PORT"
|
10
|
+
fi
|
9
11
|
db-wait.sh "$SOLR_HOST:$SOLR_PORT"
|
10
12
|
|
11
13
|
bundle exec rails db:seed
|
data/bin/hyrax-entrypoint.sh
CHANGED
@@ -1,20 +1,6 @@
|
|
1
1
|
#!/bin/sh
|
2
2
|
set -e
|
3
3
|
|
4
|
-
# Make sure common volume points have the app permission
|
5
|
-
chown -fR app:app /app/samvera/hyrax-webapp/tmp
|
6
|
-
chown -fR app:app /app/samvera/hyrax-webapp/public
|
7
|
-
|
8
|
-
if [ -v HYRAX_DERIVITIVES_PATH ]; then
|
9
|
-
mkdir -p $HYRAX_DERIVITIVES_PATH
|
10
|
-
chown -f -R app:app $HYRAX_DERIVATIVES_PATH
|
11
|
-
fi
|
12
|
-
|
13
|
-
if [ -v HYRAX_UPLOAD_PATH ]; then
|
14
|
-
mkdir -p $HYRAX_UPLOAD_PATH
|
15
|
-
chown -f -R app:app $HYRAX_UPLOAD_PATH
|
16
|
-
fi
|
17
|
-
|
18
4
|
mkdir -p /app/samvera/hyrax-webapp/tmp/pids
|
19
5
|
rm -f /app/samvera/hyrax-webapp/tmp/pids/*
|
20
6
|
|
@@ -5,17 +5,25 @@ 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=$
|
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 "$
|
15
|
-
echo "-- Collection ${
|
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
|
22
|
+
else
|
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"
|
25
|
+
curl $solr_user_settings "$solr_collection_create_url"
|
26
|
+
exit
|
19
27
|
fi
|
20
28
|
fi
|
21
29
|
echo "-- Looking for Solr (${SOLR_HOST}:${SOLR_PORT})..."
|
@@ -8,20 +8,31 @@ 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=$
|
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})..."
|
17
19
|
if nc -z "${SOLR_HOST}" "${SOLR_PORT}"; then
|
18
|
-
|
19
|
-
|
20
|
+
# shellcheck disable=SC2143,SC2086
|
21
|
+
if curl --silent --user 'fake:fake' "$solr_config_list_url" | grep -q '401'; then
|
22
|
+
# the solr pods come up and report available before they are ready to accept trusted configs
|
23
|
+
# only try to upload the config if auth is on.
|
24
|
+
if curl --silent $solr_user_settings "$solr_config_list_url" | grep -q "$solr_config_name"; then
|
25
|
+
echo "-- ConfigSet already exists; skipping creation ...";
|
26
|
+
else
|
27
|
+
echo "-- ConfigSet for ${CONFDIR} does not exist; creating ..."
|
28
|
+
(cd "$CONFDIR" && zip -r - *) | curl -X POST $solr_user_settings --header "Content-Type:application/octet-stream" --data-binary @- "$solr_config_upload_url"
|
29
|
+
fi
|
30
|
+
exit
|
20
31
|
else
|
21
|
-
echo "--
|
22
|
-
|
32
|
+
echo "-- Solr at $solr_config_list_url is accepting unauthorized connections; we can't upload a trusted ConfigSet."
|
33
|
+
echo "-- It's possible SolrCloud is bootstrapping its configuration, so this process will retry."
|
34
|
+
echo "-- see: https://solr.apache.org/guide/8_6/configsets-api.html#configsets-upload"
|
23
35
|
fi
|
24
|
-
exit
|
25
36
|
fi
|
26
37
|
COUNTER=$(( COUNTER+1 ));
|
27
38
|
sleep 5s
|
data/chart/hyrax/Chart.yaml
CHANGED
@@ -2,17 +2,21 @@ apiVersion: v2
|
|
2
2
|
name: hyrax
|
3
3
|
description: An open-source, Samvera-powered digital repository system
|
4
4
|
type: application
|
5
|
-
version: 0.
|
6
|
-
appVersion: 3.0
|
5
|
+
version: 1.0.2
|
6
|
+
appVersion: 3.1.0
|
7
7
|
dependencies:
|
8
8
|
- name: fcrepo
|
9
|
-
version: 0.
|
10
|
-
repository:
|
9
|
+
version: 0.8.0
|
10
|
+
repository: oci://ghcr.io/samvera
|
11
11
|
condition: fcrepo.enabled
|
12
12
|
- name: memcached
|
13
13
|
version: 4.2.21
|
14
14
|
repository: https://charts.bitnami.com/bitnami
|
15
15
|
condition: memcached.enabled
|
16
|
+
- name: minio
|
17
|
+
version: 6.7.2
|
18
|
+
repository: https://charts.bitnami.com/bitnami
|
19
|
+
condition: minio.enabled
|
16
20
|
- name: postgresql
|
17
21
|
version: 10.3.13
|
18
22
|
repository: https://charts.bitnami.com/bitnami
|
@@ -22,6 +26,6 @@ dependencies:
|
|
22
26
|
repository: https://charts.bitnami.com/bitnami
|
23
27
|
condition: redis.enabled
|
24
28
|
- name: solr
|
25
|
-
version: 0.
|
29
|
+
version: 1.0.1
|
26
30
|
repository: https://charts.bitnami.com/bitnami
|
27
31
|
condition: solr.enabled
|
data/chart/hyrax/README.md
CHANGED
@@ -30,11 +30,12 @@ production environments.
|
|
30
30
|
|
31
31
|
The chart populates the following environment variables:
|
32
32
|
|
33
|
-
|-------------------|--------------------------------|------------------------|
|
34
33
|
| Variable | Description | Condition |
|
35
34
|
|-------------------|--------------------------------|------------------------|
|
36
|
-
|
|
37
|
-
| DB_PORT | Postgresql service port |
|
35
|
+
| DB_PASSWORD | Postgresql password | n/a |
|
36
|
+
| DB_PORT | Postgresql service port | n/a |
|
37
|
+
| DB_HOST | Postgresql hostname | n/a |
|
38
|
+
| DB_USERNAME | Postgresql username | n/a |
|
38
39
|
| MEMCACHED_HOST | Memcached host | `memcached.enabled` |
|
39
40
|
| RACK_ENV | app environment ('production') | n/a |
|
40
41
|
| RAILS_ENV | app environment ('production') | n/a |
|
@@ -43,6 +44,7 @@ The chart populates the following environment variables:
|
|
43
44
|
| FCREPO_HOST | Fedora Commons host | n/a |
|
44
45
|
| FCREPO_PORT | Fedora Commons port | n/a |
|
45
46
|
| FCREPO_REST_PATH | Fedora Commons REST endpoint | n/a |
|
47
|
+
| SKIP_HYRAX_ENGINE_SEED | Flag to load Hyrax engine seed file | n/a |
|
46
48
|
| SOLR_ADMIN_USER | Solr user for basic auth | n/a |
|
47
49
|
| SOLR_ADMIN_PASSWORD | Solr password for basic auth | n/a |
|
48
50
|
| SOLR_COLLECTION_NAME | The name of the solr collection to use | n/a |
|
@@ -50,7 +52,6 @@ The chart populates the following environment variables:
|
|
50
52
|
| SOLR_HOST | Solr service host | n/a |
|
51
53
|
| SOLR_PORT | Solr service port | n/a |
|
52
54
|
| SOLR_URL | Solr service full URL | n/a |
|
53
|
-
|----------------- -|--------------------------------|------------------------|
|
54
55
|
|
55
56
|
## With an external SolrCloud
|
56
57
|
|
@@ -89,12 +90,58 @@ For those interested in trying out or contributing to this Chart, it's helpful
|
|
89
90
|
to setup a simple cluster locally. Various projects exist to make this easy; we
|
90
91
|
recommend [`k3d`][k3d] or [minikube][minikube].
|
91
92
|
|
92
|
-
|
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.
|
93
100
|
|
94
101
|
```sh
|
95
102
|
k3d cluster create dev-cluster --api-port 6550 -p 80:80@loadbalancer --agents 3
|
96
103
|
```
|
97
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
|
+
|
98
145
|
[containers]: ../../CONTAINERS.md#hyrax-image
|
99
146
|
[dassie]: ../../.dassie/README.md
|
100
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
|
|
@@ -82,6 +82,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
|
82
82
|
{{- printf "%s-%s" .Release.Name "memcached" | trunc 63 | trimSuffix "-" -}}
|
83
83
|
{{- end -}}
|
84
84
|
|
85
|
+
{{- define "hyrax.minio.fullname" -}}
|
86
|
+
{{- printf "%s-%s" .Release.Name "minio" | trunc 63 | trimSuffix "-" -}}
|
87
|
+
{{- end -}}
|
88
|
+
|
85
89
|
{{- define "hyrax.postgresql.fullname" -}}
|
86
90
|
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
|
87
91
|
{{- end -}}
|
@@ -174,3 +178,13 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
|
174
178
|
{{- define "hyrax.redis.url" -}}
|
175
179
|
{{- printf "redis://:%s@%s:%s" .Values.redis.password (include "hyrax.redis.host" .) "6379/0" -}}
|
176
180
|
{{- end -}}
|
181
|
+
|
182
|
+
{{- define "hyrax.sharedPvcAccessModes" -}}
|
183
|
+
{{- if .Values.worker.enabled }}
|
184
|
+
accessModes:
|
185
|
+
- ReadWriteMany
|
186
|
+
{{- else }}
|
187
|
+
accessModes:
|
188
|
+
- ReadWriteOnce
|
189
|
+
{{- end }}
|
190
|
+
{{- end -}}
|
@@ -6,9 +6,9 @@ metadata:
|
|
6
6
|
labels:
|
7
7
|
{{- include "hyrax.labels" . | nindent 4 }}
|
8
8
|
spec:
|
9
|
-
|
10
|
-
- ReadWriteMany
|
9
|
+
{{ include "hyrax.sharedPvcAccessModes" . | nindent 2 }}
|
11
10
|
resources:
|
12
11
|
requests:
|
13
12
|
storage: {{ .Values.brandingVolume.size }}
|
13
|
+
storageClassName: {{ .Values.brandingVolume.storageClass }}
|
14
14
|
{{- end }}
|
@@ -10,6 +10,7 @@ metadata:
|
|
10
10
|
data:
|
11
11
|
DB_HOST: {{ template "hyrax.postgresql.host" . }}
|
12
12
|
DB_PORT: "5432"
|
13
|
+
DB_USERNAME: {{ template "hyrax.postgresql.database" . }}
|
13
14
|
{{- if .Values.memcached.enabled }}
|
14
15
|
MEMCACHED_HOST: {{ template "hyrax.memcached.fullname" . }}
|
15
16
|
{{- end }}
|
@@ -24,13 +25,16 @@ data:
|
|
24
25
|
{{- if .Values.redis.enabled }}
|
25
26
|
REDIS_HOST: {{ template "hyrax.redis.host" . }}
|
26
27
|
{{- end }}
|
27
|
-
FCREPO_BASE_PATH: {{ .Values.fcrepoBasePathOverride | default (printf "/%s" (include "hyrax.fullname" .)) | quote }}
|
28
28
|
FCREPO_HOST: {{ template "hyrax.fcrepo.host" . }}
|
29
|
+
FCREPO_BASE_PATH: {{ .Values.fcrepoBasePathOverride | default (printf "/%s" (include "hyrax.fullname" .)) | quote }}
|
29
30
|
FCREPO_PORT: {{ .Values.fcrepo.servicePort | default 8080 | quote }}
|
30
31
|
FCREPO_REST_PATH: {{ .Values.fcrepo.restPath | default "rest" }}
|
31
32
|
REDIS_PROVIDER: SIDEKIQ_REDIS_URL
|
33
|
+
{{- if .Values.minio.enabled }}
|
34
|
+
MINIO_ENDPOINT: {{ template "hyrax.minio.fullname" . }}
|
35
|
+
{{- end }}
|
36
|
+
SKIP_HYRAX_ENGINE_SEED: {{ .Values.skipHyraxEngineSeed | default 0 | quote }}
|
32
37
|
SOLR_ADMIN_USER: {{ template "hyrax.solr.username" . }}
|
33
|
-
SOLR_ADMIN_PASSWORD: {{ template "hyrax.solr.password" . }}
|
34
38
|
SOLR_COLLECTION_NAME: {{ template "hyrax.solr.collectionName" . }}
|
35
39
|
SOLR_CONFIGSET_NAME: {{ template "hyrax.fullname" . }}
|
36
40
|
SOLR_HOST: {{ template "hyrax.solr.host" . }}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
{{- if .Values.worker.enabled }}
|
1
2
|
apiVersion: apps/v1
|
2
3
|
kind: Deployment
|
3
4
|
metadata:
|
@@ -27,17 +28,26 @@ spec:
|
|
27
28
|
name: {{ include "hyrax.fullname" . }}-env
|
28
29
|
- secretRef:
|
29
30
|
name: {{ template "hyrax.fullname" . }}
|
31
|
+
env:
|
32
|
+
{{- toYaml .Values.worker.extraEnvVars | nindent 12 }}
|
30
33
|
command:
|
31
34
|
- sh
|
32
35
|
- -c
|
33
|
-
- db-wait.sh "$
|
34
|
-
|
35
|
-
|
36
|
+
- db-wait.sh "$REDIS_HOST:6379"
|
37
|
+
{{- if .Values.worker.extraInitContainers }}
|
38
|
+
{{- toYaml .Values.worker.extraInitContainers | nindent 8 }}
|
39
|
+
{{- end }}
|
40
|
+
{{- with .Values.imagePullSecrets }}
|
41
|
+
imagePullSecrets:
|
42
|
+
{{- toYaml . | nindent 8 }}
|
43
|
+
{{- end }}
|
36
44
|
serviceAccountName: {{ include "hyrax.serviceAccountName" . }}
|
37
45
|
securityContext:
|
38
|
-
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
46
|
+
{{- toYaml .Values.worker.podSecurityContext | nindent 8 }}
|
39
47
|
containers:
|
40
48
|
- name: {{ .Chart.Name }}-worker
|
49
|
+
securityContext:
|
50
|
+
{{- toYaml .Values.worker.securityContext | nindent 12 }}
|
41
51
|
image: "{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag | default .Chart.AppVersion }}"
|
42
52
|
imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
|
43
53
|
envFrom:
|
@@ -45,6 +55,15 @@ spec:
|
|
45
55
|
name: {{ include "hyrax.fullname" . }}-env
|
46
56
|
- secretRef:
|
47
57
|
name: {{ template "hyrax.fullname" . }}
|
58
|
+
{{- if .Values.solrExistingSecret }}
|
59
|
+
- secretRef:
|
60
|
+
name: {{ .Values.solrExistingSecret }}
|
61
|
+
{{- end }}
|
62
|
+
{{- with .Values.worker.extraEnvFrom }}
|
63
|
+
{{- toYaml . | nindent 12 }}
|
64
|
+
{{- end }}
|
65
|
+
env:
|
66
|
+
{{- toYaml .Values.worker.extraEnvVars | nindent 12 }}
|
48
67
|
volumeMounts:
|
49
68
|
- name: derivatives
|
50
69
|
mountPath: /app/samvera/derivatives
|
@@ -54,8 +73,18 @@ spec:
|
|
54
73
|
- name: uploads
|
55
74
|
subPath: uploads
|
56
75
|
mountPath: /app/samvera/uploads
|
76
|
+
{{- if .Values.applicationExistingClaim }}
|
77
|
+
- name: application
|
78
|
+
mountPath: /app/samvera/hyrax-webapp
|
79
|
+
{{- end }}
|
80
|
+
{{- with .Values.worker.extraVolumeMounts }}
|
81
|
+
{{- toYaml . | nindent 12 }}
|
82
|
+
{{- end }}
|
57
83
|
resources:
|
58
84
|
{{- toYaml .Values.worker.resources | nindent 12 }}
|
85
|
+
{{- with .Values.extraContainerConfiguration }}
|
86
|
+
{{- toYaml . | nindent 10 }}
|
87
|
+
{{- end }}
|
59
88
|
volumes:
|
60
89
|
- name: "derivatives"
|
61
90
|
{{- if and .Values.derivativesVolume.enabled .Values.derivativesVolume.existingClaim }}
|
@@ -77,7 +106,14 @@ spec:
|
|
77
106
|
{{ else }}
|
78
107
|
emptyDir: {}
|
79
108
|
{{ end }}
|
80
|
-
|
109
|
+
{{- if .Values.applicationExistingClaim }}
|
110
|
+
- name: "application"
|
111
|
+
persistentVolumeClaim:
|
112
|
+
claimName: {{ .Values.applicationExistingClaim }}
|
113
|
+
{{- end }}
|
114
|
+
{{- with .Values.worker.extraVolumes }}
|
115
|
+
{{- toYaml . | nindent 8 }}
|
116
|
+
{{- end }}
|
81
117
|
{{- with .Values.worker.nodeSelector }}
|
82
118
|
nodeSelector:
|
83
119
|
{{- toYaml . | nindent 8 }}
|
@@ -90,3 +126,4 @@ spec:
|
|
90
126
|
tolerations:
|
91
127
|
{{- toYaml . | nindent 8 }}
|
92
128
|
{{- end }}
|
129
|
+
{{- end }}
|