AusDTO / disco_layer

Code, outputs and Information relevant to the discovery layer.
1 stars 5 forks source link

use REST api for service catalogue data #59

Open monkeypants opened 9 years ago

monkeypants commented 9 years ago

currently, disco_service/govservices/management/commands/.. is a messy contraption that interfaces a local git repo of the service catalogue repository.

It would be much better if it accessed an API on the node.js for things like fetching lists of things that need to be synced in the DB. Better to only have one codebase for processing/manageing that json graph.

nokout commented 9 years ago

@monkeypants Would an action associated with a git web trigger be suitable (eg on pull approval do x). That is what I had in mind.

monkeypants commented 9 years ago

Yes, see #46.

This ticket is not about how the job gets triggered, it's about how the configuration data gets accessed. Right now it's parsing the json, therefore duplicating code/logic also present in the service_catalogue component. This ticket is to access a REST API on the service_catalogue component instead.

So the workflow would be:

  1. service catalogue changes are committed
  2. callback triggers update (either jenkins or directly, see #46)
  3. task interrogates service_catalogue via API
  4. task updates metadata

This ticket is a change to how step 3. above would work. It requires the service_catalogue to actually furnish the required REST API, as well as new configuration data telling the job the address of that microservice.