Skip to content

globus/example-search-portal-with-github-action-ingest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example: Serverless Search Portal with GitHub Action Ingest

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.

Background

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.

Core Concepts

  • 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.

Pre-Requisites

Enabling GitHub Action-based Ingest

  1. Create a new Globus Service Account using the Developers section in the Globus Web App.

  2. 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]"
  1. 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.
  2. 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.
  3. 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.

About

An example search portal that uses a GitHub Action to submit local data to Globus Search.

Topics

Resources

Stars

Watchers

Forks