{"id":24093229,"url":"https://github.com/umd-lib/archelon","last_synced_at":"2025-05-07T05:05:48.023Z","repository":{"id":13188612,"uuid":"64938606","full_name":"umd-lib/archelon","owner":"umd-lib","description":"UMD Libraries Fedora 4 Repository Administration Tool","archived":false,"fork":false,"pushed_at":"2025-04-02T21:35:19.000Z","size":9054,"stargazers_count":2,"open_issues_count":7,"forks_count":5,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-05-07T05:05:36.209Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umd-lib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-04T13:51:11.000Z","updated_at":"2024-08-12T19:29:45.000Z","dependencies_parsed_at":"2024-02-09T16:29:57.038Z","dependency_job_id":"ba96c75c-9beb-4037-b6ac-53ae14bd133f","html_url":"https://github.com/umd-lib/archelon","commit_stats":null,"previous_names":[],"tags_count":87,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Farchelon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Farchelon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Farchelon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Farchelon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umd-lib","download_url":"https://codeload.github.com/umd-lib/archelon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252817010,"owners_count":21808705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-10T09:26:17.934Z","updated_at":"2025-05-07T05:05:48.009Z","avatar_url":"https://github.com/umd-lib.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# archelon\n\nArchelon is the Web front-end for a [Fedora 4][fedora] repository-based set of\napplications known collectively as \"umd-fcrepo\". The umd-fcrepo system consists\nof the following parts:\n\n* [umd-fcrepo-docker][umd-fcrepo-docker] - a set of Docker images for running\n  the Fedora repository platform\n* [Plastron][plastron] - a utility application for performing batch operations\n   on the Fedora repository\n* Archelon - a web GUI providing an administrative interface for\n  Fedora\n\nWhile Archelon is technically able to run without access to any other\napplication, its functionality is extremely limited without Plastron or\nthe applications provided by umd-fcrepo-docker.\n\n## Archelon Components\n\nArchelon consists of the following components when run in a production\nenvironment:\n\n* A Rails application providing an administrative interface to the Fedora\nrepository. It uses the [Blacklight][blacklight] gem for providing Solr\nsearch functionality.\n* A STOMP listener application for communicating with Plastron using the\n[STOMP messaging protocol][stomp] via ActiveMQ\n* An SFTP server, used to upload files for inclusion in import jobs\n\n## Interactions with other umd-fcrepo components\n\nArchelon interacts directly with the following umd-fcrepo components:\n\n* [ActiveMQ] - Archelon communicates to Plastron using STOMP messaging mediated by\nActiveMQ queues.\n* [Solr] - Archelon communicates directly with the Solr instance in the\n\"umd-fcrepo-docker\" stack for metadata search and retrieval.\n* [Plastron] - Archelon uses the HTTP REST interface provided by Plastron to\nretrieve information about export and import jobs (some export/import status\ninformation is also provided via STOMP messaging).\n\n## Quick Start\n\nSee [Installing Prerequisites](docs/Prerequisites.md) for information on\nprerequisites on a local workstation.\n\n### Setup\n\nThere are several ways to setup the umd-fcrepo system -- see\n[umd-lib/umd-fcrepo/README.md][umd-fcrepo]\nfor information about setting up a local development environment for Archelon.\n\n### Archelon Setup (Currently not working, use the VSCode Dev Container Setup below instead)\n\nThe following are the basic steps to run the Archelon Rails application.\nArchelon requires other components of the umd-fcrepo system to enable most\nfunctionality.\n\n1. Checkout the code and install the dependencies:\n    ```bash\n    git clone git@github.com:umd-lib/archelon.git\n    cd archelon\n    yarn\n    bundle install\n    ```\n2. Create a `.env` file from the `env_example` file and fill in appropriate\n   values for the environment variables.\n3. Set up the database:\n    ```bash\n    rails db:migrate\n    ```\n4. *(Optional)* Load sample \"Download URL\" data:\n    ```bash\n    rails db:reset_with_sample_data\n    ```\n5. In three separate terminals:\n   1. Start the STOMP listener:\n       ```bash\n      rails stomp:listen\n      ```\n   2. Start the Delayed Jobs worker:\n       ```bash\n      rails jobs:work\n       ```\n   3. Run the web application:\n       ```bash\n       rails server\n       ```\n\nArchelon will be available at \u003chttp://archelon-local:3000/\u003e\n\n### Archelon Setup (VSCode Dev Container)\nArchelon requires other components of the umd-fcrepo system to enable most\nfunctionality.\n\n1. Checkout the repo, and open the codebase in VSCode:\n    ```bash\n    git clone git@github.com:umd-lib/archelon.git\n    cd archelon\n    code .\n2. When opening the codebase, there will be a notification to reopen the directory in a dev container, select \"Reopen in Container\"\n\n    ℹ️ **Note:** If there isn't a notification, you can also open the command palette (cmd+shift+p) and type “Dev Containers: Rebuild and Reopen in Container”\n\n    The dev container will take a moment to build the docker image, and install the javascript and ruby dependencies.\n\n2. Create a `.env` file from the `env_example` file, and adding these environment variables:\n    - LDAP_BIND_PASSWORD (Obtained from LastPass)\n    - FCREPO_AUTH_TOKEN (Obtained from generating a JWT token from the local fcrepo stack)\n\n3. Run yarn install\n    ```bash\n    yarn install\n    ```\n    \u003c!-- https://umd-dit.atlassian.net/browse/LIBHYDRA-540 --\u003e\n\u003c!-- 4. *(Optional)* Load sample \"Download URL\" data:\n    ```bash\n    rails db:reset_with_sample_data\n    ``` --\u003e\n4. Open three separate terminals in VSCode and run these respectively in each:\n   - Start the STOMP listener:\n       ```bash\n      rails stomp:listen\n      ```\n   - Start the Delayed Jobs worker:\n       ```bash\n      rails jobs:work\n       ```\n   - Run the web application:\n       ```bash\n       rails server\n       ```\n\nArchelon will be available at \u003chttp://archelon-local:3000/\u003e\n\n**Note:** If a 403 Not Authorized Error occurs when visiting, visit the page in a private window.\n\n## Logging\n\nBy default, the development environment for Archelon will log at the DEBUG level,\nwhile all other environments will log at the INFO level. To change this, set the\n`RAILS_LOG_LEVEL` environment variable in your `.env` file.\n\nIn the development environment, the log will be sent to standard output and\nthe `log/development.log` file, as is standard in Rails application.\n\nIn production, set the `RAILS_LOG_TO_STDOUT` environment variable to `true` to\nsend the log to standard out.\n\n## Access Restriction\n\nIn general, Archelon requires a CAS login to access the application,\nand the user must have been added to the system by an administrator.\n\nTwo notable exceptions are the \"ping\" endpoint and \"public keys\" endpoint\n(there are also some other minor endpoints, such as import/export status\nupdates).\n\nThe \"ping\" endpoint is unrestricted, and is suitable for monitoring the\nhealth of the application.\n\nThe \"public keys\" endpoint returns a JSON list of the public keys allowed to SFTP\nto the Archelon server. While these are _public_ keys, and hence not\ntechnically a security issue, current SSDR policy is to limit access to this\nendpoint to \"localhost\", or nodes in the Kubernetes cluster.\n\n## Docker\n\nArchelon uses the [boathook] gem to provide [Rake tasks](lib/tasks/docker.rake)\nfor building and pushing Docker images, as described in the following Dockerfiles:\n\n|Dockerfile                        |Image Name                        |Application|\n|----------------------------------|----------------------------------|-----------|\n|[Dockerfile](Dockerfile)          |`docker.lib.umd.edu/archelon`     |main Rails application|\n|[Dockerfile.sftp](Dockerfile.sftp)|`docker.lib.umd.edu/archelon-sftp`|SFTP server for import/export|\n\nUsage:\n\n```bash\n# list the images that would be built, and the metadata for them\nrails docker:tags\n\n# builds the images\nrails docker:build\n\n# pushes to docker.lib.umd.edu hub\nrails docker:push\n```\n\nSee [umd-lib/umd-fcrepo/README.md][umd-fcrepo] for information about setting up\na local development environment for Archelon using Docker.\n\nWhen running locally in Docker, the Archelon database can be accessed using:\n\n```bash\n# Archelon database backing the Archelon Rails app\npsql -U archelon -h localhost -p 5434 archelon\n```\n\n### Multi-Platform Docker Builds\n\nIt is possible to build a multi-platform Docker image using the `docker buildx`\ncommand and targeting both the `linux/amd64` and `linux/arm64` platforms. As\nlong as there is a `local` builder configured for buildx, the following will\nbuild and push a multi-platform image:\n\n```bash\ndocker buildx build \\\n    --builder local \\\n    --platform linux/amd64,linux/arm64 \\\n    --tag docker.lib.umd.edu/archelon:latest \\\n    --push .\n```\n\n## Rake Tasks\n\nSee [Rake Tasks](docs/RakeTasks.md)\n\n## File Retrieval configuration\n\nArchelon has the ability to create one-time use URLs, which allow a Fedora\nbinary file to be downloaded. The random token used for the URLs, and other\ninformation, is stored in the DownloadUrl model.\n\nIn production, the URL that patrons use to retrieve the files does not reference\nthe Archelon server directly, relying instead on a virtual host, which proxies\nback to Archelon.\n\nThe base URL of the virtual host (i.e., the entire URL except for the random\ntoken, but including a trailing slash) should be set in the `RETRIEVE_BASE_URL`\nenvironment variable. This base URL should be proxied to the\n`\u003cARCHELON_SERVER_URL\u003e/retrieve/` path.\n\n## File downloads and concurrent operation\n\nArchelon has the ability to create one-time use URLs for downloading files from\nFedora. Since downloading files may take considerable time, it is necessary that\nthe production Archelon server support concurrent operations.\n\nFile downloads are sent as a \"streaming\" response, so file downloads should\nstart almost immediately, regardless of the size of the file. If large file\ndownloads take a long time to start, it might be being buffered by the Rails\nserver.\n\n### Concurrent operation in the development environment\n\nRails disables concurrent operation when using the development environment.\n\nEdit the \"config/development.rb\" file, and add the following line inside\nthe `Rails.application.configure` block:\n\n```\nconfig.allow_concurrency=true\n```\n\n## Batch Export\n\nThe batch export functionality relies on a running [Plastron] instance.\n\n## Batch Import\n\nSee [BatchImport](docs/BatchImport.md).\n\n## Content Model Definitions\n\nSee [ContentModelDefinitions](docs/ContentModelDefinitions.md).\n\n## Vocabulary\n\nFor information about the controlled vocabularies used when editing metadata,\nsee [Vocabulary](docs/Vocabulary.md).\n\n## LDAP Override\n\nBy default, Archelon determines the user type for a user (\"admin\", \"user\" or\n\"unauthorized\") using the list of Grouper groups in the `memberOf` attribute\nreturned from an LDAP server for that user.\n\nThe local development environment (or Docker container) can be run without\nconnecting to an LDAP server by setting the `LDAP_OVERRIDE` environment variable.\nThe `LDAP_OVERRIDE` environment variable should contain a space-separated list\nof Grouper group DNs that any authenticated user should receive.\n\nThe `LDAP_OVERRIDE` environment variable only works in the `development`\nRails environment.\n\n## About CVE-2015-9284\n\nGitHub (or a vulnerability scanner such as \"bundler-audit\"), may report that\nthis application is vulnerable to CVE-2015-9284, due to its use of the\n\"omniauth\" gem. More information about this vulnerability can be found at:\n\n[https://github.com/omniauth/omniauth/wiki/Resolving-CVE-2015-9284][cve-2015-9284]\n\nAs configured, this application uses CAS for authentication. As the application\ndoes not use OAuth it is not vulnerable to CVE-2015-9284.\n\n## Action Cable\n\nThe Rails \"Action Cable\" functionality is used to provide dynamic updates to\nthe GUI.\n\nSee [ActionCable](docs/ActionCable.md) for more information.\n\n## ActiveJob and Delayed::Job\n\nArchelon is configured to use the [Delayed::Job][delayed_job] queue adapter, via\nthe [delayed_job_active_record][delayed_job_active_record] gem to store jobs\nin the database.\n\n## Cron Jobs\n\nThe [delayed_cron_job][delayed_cron_job] gem is used to schedule jobs to run on\na cron-like schedule.\n\nThe \"CronJob\" class [app/cron_jobs/cron_job.rb](app/cron_jobs/cron_job.rb)\nshould be used as the superclass, and all implementations should be placed in\nthe \"app/cron_jobs\" directory.\n\nCronJob implementations in the \"app/cron_jobs\" directory are automatically\nscheduled when the \"db:migrate\" Rails task is run, via the \"db:schedule_jobs\"\nRake task (see [lib/tasks/jobs.rake](lib/tasks/jobs.rake)).\n\n### Changing the schedule for a CronJob\n\nThe \"Changing the schedule\" section of the \"delayed_cron_job\" README.md file\nindicates that when the \"cron_expression\" of a CronJob is changed, any\npreviously scheduled instances will need to be manually removed.\n\nIn this implementation, the \"db:schedule_jobs\" task removes existing CronJob\nimplementations from the database before adding them back in. Therefore, it\nshould *not* be necessary to manually delete existing CronJobs from the database\nafter modifying the \"cron_expression\" for a CronJob (as long as\n\"db:schedule_jobs\" or \"db:migrate\" is run after the modification).\n\n## React Components\n\n### Interactive Demo\n\nAn interactive demo displaying the React components provided by the application\nis available at:\n\nhttp://archelon-local:3000/react_components\n\n### Documenting React Components\n\nReact components are documented using \"React Styleguidist\"\n[https://react-styleguidist.js.org/][react-styleguidist]\n\nIn the development environment, web-based interactive documentation can be\naccessed by running:\n\n```\n\u003e yarn styleguidist server\n```\n\nand then accessing the documentation at http://localhost:6060/\n\nSee the \"Documenting Components\" page on the \"React Styleguidist\" website\n[https://react-styleguidist.js.org/docs/documenting][react-styleguidist-documenting],\nfor information about writing documentation for the React components.\n\n## License\n\nSee the [LICENSE](LICENSE.md) file for license rights and limitations\n(Apache 2.0).\n\n[ActiveMQ]: https://github.com/umd-lib/umd-fcrepo-messaging\n[blacklight]: https://github.com/projectblacklight/blacklight\n[cve-2015-9284]: https://github.com/omniauth/omniauth/wiki/Resolving-CVE-2015-9284\n[delayed_cron_job]: https://github.com/codez/delayed_cron_job\n[delayed_job]: https://github.com/collectiveidea/delayed_job\n[delayed_job_active_record]: https://github.com/collectiveidea/delayed_job_active_record\n[fedora]: https://duraspace.org/fedora/\n[plastron]: https://github.com/umd-lib/plastron\n[react-styleguidist]: https://react-styleguidist.js.org/\n[react-styleguidist-documenting]: https://react-styleguidist.js.org/docs/documenting\n[Solr]: https://github.com/umd-lib/umd-fcrepo-solr\n[stomp]: https://stomp.github.io/\n[umd-fcrepo]: https://github.com/umd-lib/umd-fcrepo\n[umd-fcrepo-docker]: https://github.com/umd-lib/umd-fcrepo-docker\n[boathook]: https://github.com/umd-lib/boathook\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumd-lib%2Farchelon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumd-lib%2Farchelon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumd-lib%2Farchelon/lists"}