Skip to content
Open
20 changes: 20 additions & 0 deletions doc/akri_connector/packaging-metadata-for-connector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# How to package connector metadata for connector images
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a .md file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, yes


In order for the user of a connector to access the metadata associated with it, the publisher of a connector must push the metadata using ORAS like:

Check warning on line 3 in doc/akri_connector/packaging-metadata-for-connector.md

View workflow job for this annotation

GitHub Actions / CI-spelling

Unknown word (ORAS) Suggestions: (oars, okas, oral, orbs, ORBS)

```bash
oras push --config <path_to_empty_file>:application/vnd.microsoft.akri-connector.v1+json <container_registry>/<connector_name>-metadata:<connector_version> <connector_metadata_file>
```

where:
- <path_to_empty_file> can be any file ("/dev/null" is a good choice for linux) as the contents won't be checked

Check warning on line 10 in doc/akri_connector/packaging-metadata-for-connector.md

View workflow job for this annotation

GitHub Actions / CI-spelling

Unknown word (linux) Suggestions: (Linux, linum, Linus, lieu, line)
- The connector metadata file is a JSON file that adheres to the schema defined [here](https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/aio-connector-metadata-9.0-preview.json) such as the examples in this folder.


for example:

```bash
oras push --config /dev/null:application/vnd.microsoft.akri-connector.v1+json someAcr.azurecr.io/akri-connectors/minimal-example-connector-metadata:1.0.0 ./minimal-example-connector-metadata.json
```

See [this doc](https://oras.land/docs/commands/oras_push/) for more options/details when using ORAS to push.

Check warning on line 20 in doc/akri_connector/packaging-metadata-for-connector.md

View workflow job for this annotation

GitHub Actions / CI-spelling

Unknown word (ORAS) Suggestions: (oars, okas, oral, orbs, ORBS)
Loading