cedadev / search-futures

Future Search Architecture
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Containerise STAC Vocab API #98

Open rsmith013 opened 2 years ago

rsmith013 commented 2 years ago

Application Repo: https://github.com/cedadev/stac-vocab-api

Background:

The STAC Vocab API is a FastAPI application which can be used to search for vocabularies. This satisfies two use cases:

  1. During indexing. "I have found a term (e.g. evapsbl), does it belong to any other namespaces other than the current context?"
  2. From a UI. "I see this term 'evapsbl' but I have no idea what it means." Hover over term a popup reveals additional information about the term, possibly including a long name, description, and URLs to other resources.

The Vocab API reads rdf files into memory and serves from there. There is a helm-chart for FastAPI applications which should serve as a good base for the deployment step.

In the first stage, we can use the XML file provided in stac_vocab_api/data/ceda.xml. This provides the vocabularies for the server.

Helpful links

Task:

agstephens commented 2 years ago

@ellesmith88: how are you doing with this issue?

ellesmith88 commented 2 years ago

@agstephens I have successfully deployed stac-vocab-api in staging and have implemented an initContainer which is set up here: https://breezy.badc.rl.ac.uk/stac/stac-vocabs.

The deploy repository is here https://breezy.badc.rl.ac.uk/stac/stac-vocab-api-deploy

The vocabs used at the moment are just the ceda.xml file provided in https://github.com/cedadev/stac-vocab-api/tree/changes-for-kubernetes. The next step would be to build the vocabs using https://github.com/cedadev/stac-vocab, and set this up in the gitlab-ci.yml file of stac-vocabs: https://breezy.badc.rl.ac.uk/stac/stac-vocabs/-/blob/master/.gitlab-ci.yml but I don't think stac-vocab can do this yet.

agstephens commented 2 years ago

Hi @ellesmith88, Thanks for getting this done. Tagging @rhysrevans3 @watucker @Mahir-Sparkess What do you mean by "I don't think stac-vocab can do this yet." ? Please let us know what the constraints are so that we can work out who needs to do what.

ellesmith88 commented 2 years ago

Hi @agstephens, I'm referring to the first check box in this issue: https://github.com/cedadev/search-futures/issues/99.

I didn't speak to Richard much about this part of the task much at all, so I'm kind of guessing.

I think that building the ceda.xml file is done by stac-vocab, when I last looked I don't think the functionality to do this had been developed in stac-vocab, although perhaps now it has? I've had another look, but I can't understand the workflow and how this would work.

Then a CI job could be written to use stac-vocab to bulid a new ceda.xml file when needed.

agstephens commented 2 years ago

Thanks @ellesmith88,

I'll review with @rhysrevans3 so that we can work out what else needs doing.