This repository is an example of the @globus/template-search-portal
You can create your own portal with similar functionality by following the Creating Your Own Research Search Portal section in the template repository and then referencing the sections below.
This example combines Globus and GitHub concepts to create a search-based portal where the portal configuration and index data are managed in the same repository. For smaller datasets, this can be a simple way of introducing change and access controls to the data in your Globus Search index.
- Your search portal is hosted on GitHub Pages, referencing a Globus Search index you manage.
- By editing a file (
/data/ingest.json
) an ingest request is submitted to your Globus Search index, making new or updated data available in your portal.
It should be noted that this example is more of a proof-of-concept. Manually managing the data in your search index in this way won't meet the requirements for many use cases, and may present issues at larger scales, but the concepts introduced here can be used as a starting point.
- A Globus Search Index you administer.
- A GitHub repository you administer, created following Creating Your Own Research Search Portal.
-
Create a new Globus Service Account using the Developers section in the Globus Web App.
-
Update your search index to include a
writer
role for the new service account.
# Example using the Globus CLI
globus search index role create "<INDEX_ID>" writer "<SERVICE_ACCOUNT>"
# globus search index role create "0d22571f-4126-4fa0-8796-be78617c366c" writer "[email protected]"
-
Add the following secrets to your repositories GitHub Actions secrets:
GLOBUS_CLIENT_ID
- The client ID of the service account.GLOBUS_CLIENT_SECRET
- A client secret of the service account.
-
Add the GitHub Action workflow to your repository by copying the contents of the
.github/workflows/ingest.yml
file in this repository to your repository at.github/workflows/ingest.yml
.- The workflow file in this repository is annotated with comments to help you understand how it works.
-
Add a file in your repository at
/data/ingest.json
matching one of the supported Globus Search request schemas.- Most commonly, you will want this file to represent an
ingest_type: "GMetaList"
, allowing the repository to act as a management system for the records in your search index.
- Most commonly, you will want this file to represent an