docs

package
v2.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 8 Imported by: 0

README

Catalog importer

Jump to Getting started if you want to begin from an example configuration or just want to experiment.

Otherwise check-out the rest of our documentation for details on how the importer works:

If you can't find an answer to your question, please open an issue with your request and we'll be happy to help out.

Getting started

The easiest way to get started is to copy one of the examples and tweak it to match your needs, which will depend on whether you already use a catalog and the type of catalog data you have available.

You can run catalog-importer init, which will give you a fresh copy of one of the templates in a local directory.

Choose from:

  • Simple, for anyone starting from scratch and wanting to load catalog data into incident.io directly from importer config.
  • Backstage, for those already using Backstage as a service catalog and want to import existing catalog-info.yaml files.

Once you've created a importer.jsonnet, visit your incident dashboard to create an API key with permission to:

  • View catalog types and entries
  • Manage catalog types and edit catalog data

Then set that token as your INCIDENT_API_KEY environment variable.

You can check your config is valid by running:

$ catalog-importer validate --config=importer.jsonnet

Then you can run a sync with:

$ catalog-importer sync --config=importer.jsonnet

✔ Loaded config (3 pipelines, 3 sources, 3 outputs)
✔ Connected to incident.io API (https://api.incident.io)
✔ Found 16 catalog types, with 3 that match our sync ID (incident-io/catalog)
Where this will be followed by progress output as entries are synced into the catalog:
↻ Creating catalog types that don't yet exist...
  ✔ Custom["Feature"] (id=01GYZMPSJPBE1ZFDF1ESEWFYZF)
  ✔ Custom["Integration"] (id=01GYZMPSV08SYE4RF49C3JZT76)
  ✔ Custom["Team"] (id=01GYZMPT7C692DXCEVHFHVKZAQ)

↻ Syncing catalog type schemas...
  ✔ Custom["Feature"] (id=01GYZMPSJPBE1ZFDF1ESEWFYZF)
  ✔ Custom["Integration"] (id=01GYZMPSV08SYE4RF49C3JZT76)
  ✔ Custom["Team"] (id=01GYZMPT7C692DXCEVHFHVKZAQ)

↻ Syncing pipeline... (Custom["Feature"])

  ↻ Loading data from sources...
    ✔ inline (found 30 entries)

  ↻ Syncing entries...

    ↻ Custom["Feature"]
      ✔ Building entries... (found 30 entries matching filters)
      ✔ No entries to delete
      ✔ Creating new entries in catalog... (30 entries to create)
      ✔ No existing entries to update

↻ Syncing pipeline... (Custom["Integration"])

  ↻ Loading data from sources...
    ✔ inline (found 21 entries)

  ↻ Syncing entries...

    ↻ Custom["Integration"]
      ✔ Building entries... (found 21 entries matching filters)
      ✔ No entries to delete
      ✔ Creating new entries in catalog... (21 entries to create)
      ✔ No existing entries to update

↻ Syncing pipeline... (Custom["Team"])

  ↻ Loading data from sources...
    ✔ inline (found 3 entries)

  ↻ Syncing entries...

    ↻ Custom["Team"]
      ✔ Building entries... (found 3 entries matching filters)
      ✔ No entries to delete
      ✔ Creating new entries in catalog... (3 entries to create)
      ✔ No existing entries to update

And that's it! Your data will now be loaded into your catalog.

Note that we only support up to 50,000 entries for each catalog type. Please contact us if you'd like to explore options for larger lists.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Content embed.FS

Functions

func EvaluateJsonnet

func EvaluateJsonnet(wd, file string) ([]byte, error)

EvaluateJsonnet returns the JSON document produced when evaluating a Jsonnet file within the docs directory.

Types

type Template

type Template struct {
	Name        string // e.g. backstage
	Label       string // e.g. Backstage
	Description string // e.g. This template is ...
}

func GetTemplates

func GetTemplates() ([]Template, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL