Merge pull request #27258 from Nikunj0601/feature/azure-blob-storage-catalog-provider
feat: azure blob storage entity provider for catalog
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
---
|
||||
id: discovery
|
||||
title: Azure Blob Storage Discovery
|
||||
sidebar_label: Discovery
|
||||
# prettier-ignore
|
||||
description: Automatically discovering catalog entities from an Azure Blob Storage account
|
||||
---
|
||||
|
||||
:::info
|
||||
This documentation is written for [the new backend system](../../backend-system/index.md) which is the default since Backstage [version 1.24](../../releases/v1.24.0.md).
|
||||
:::
|
||||
|
||||
The Azure Blob Storage account integration has a special entity provider for discovering catalog
|
||||
entities located in a storage account container. If you have a container that contains multiple
|
||||
catalog files, and you want to automatically discover them, you can use this
|
||||
provider. The provider will crawl your Blob Storage account container and register entities
|
||||
matching the configured path. This can be useful as an alternative to static
|
||||
locations or manually adding things to the catalog.
|
||||
|
||||
To use the entity provider, you'll need an Azure Blob Storage account integration
|
||||
[set up](locations.md) with `accountName` and either `aadCredential`, `sasToken`, or `accountKey`
|
||||
|
||||
At production deployments, you likely manage these with the permissions attached
|
||||
to your instance.
|
||||
|
||||
In your configuration, you add a provider config per bucket:
|
||||
|
||||
```yaml
|
||||
# app-config.yaml
|
||||
|
||||
catalog:
|
||||
providers:
|
||||
azureBlob:
|
||||
providerId:
|
||||
accountName: ${ACCOUNT_NAME}
|
||||
containerName: ${CONTAINER_NAME}
|
||||
schedule: # same options as in TaskScheduleDefinition
|
||||
# supports cron, ISO duration, "human duration" as used in code
|
||||
frequency: { minutes: 30 }
|
||||
# supports ISO duration, "human duration" as used in code
|
||||
timeout: { minutes: 3 }
|
||||
```
|
||||
|
||||
For simple setups, you can omit the provider ID at the config
|
||||
which has the same effect as using `default` for it.
|
||||
|
||||
```yaml
|
||||
# app-config.yaml
|
||||
|
||||
catalog:
|
||||
providers:
|
||||
azureBlob:
|
||||
accountName: ${ACCOUNT_NAME}
|
||||
containerName: ${CONTAINER_NAME}
|
||||
schedule: # same options as in TaskScheduleDefinition
|
||||
# supports cron, ISO duration, "human duration" as used in code
|
||||
frequency: { minutes: 30 }
|
||||
# supports ISO duration, "human duration" as used in code
|
||||
timeout: { minutes: 3 }
|
||||
```
|
||||
|
||||
As this provider is not one of the default providers, you will first need to install
|
||||
the Azure catalog plugin:
|
||||
|
||||
```bash title="From your Backstage root directory"
|
||||
yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-azure
|
||||
```
|
||||
|
||||
Then updated your backend by adding the following line:
|
||||
|
||||
```ts title="packages/backend/src/index.ts"
|
||||
backend.add(import('@backstage/plugin-catalog-backend'));
|
||||
/* highlight-add-start */
|
||||
backend.add(import('@backstage/plugin-catalog-backend-module-azure'));
|
||||
/* highlight-add-end */
|
||||
```
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
id: locations
|
||||
sidebar_label: Locations
|
||||
title: Azure Blob Storage account Locations
|
||||
# prettier-ignore
|
||||
description: Setting up an integration with Azure Blob Storage account
|
||||
---
|
||||
|
||||
The Azure Blob Storage account integration supports loading catalog entities from an blob storage account container.
|
||||
Entities can be added to
|
||||
[static catalog configuration](../../features/software-catalog/configuration.md),
|
||||
or registered with the
|
||||
[catalog-import](https://github.com/backstage/backstage/tree/master/plugins/catalog-import)
|
||||
plugin.
|
||||
|
||||
## Configuration
|
||||
|
||||
To use this integration, add configuration to your `app-config.yaml`:
|
||||
|
||||
Using Azure active directory credentials:
|
||||
|
||||
```yaml
|
||||
integrations:
|
||||
azureBlobStorage:
|
||||
- accountName: ${ACCOUNT_NAME} # required
|
||||
endpoint: ${CUSTOM_ENDPOINT} # custom endpoint will require either aadCredentials or sasToken
|
||||
aadCredential:
|
||||
clientId: ${CLIENT_ID}
|
||||
tenantId: ${TENANT_ID}
|
||||
clientSecret: ${CLIENT_SECRET}
|
||||
```
|
||||
|
||||
Using Azure storage account SAS token:
|
||||
|
||||
```yaml
|
||||
integrations:
|
||||
azureBlobStorage:
|
||||
- accountName: ${ACCOUNT_NAME} # required
|
||||
endpoint: ${CUSTOM_ENDPOINT} # custom endpoint will require either aadCredentials or sasToken
|
||||
sasToken: ${SAS_TOKEN}
|
||||
```
|
||||
|
||||
Using Azure storage account access key:
|
||||
|
||||
```yaml
|
||||
integrations:
|
||||
azureBlobStorage:
|
||||
- accountName: ${ACCOUNT_NAME} # required
|
||||
endpoint: ${CUSTOM_ENDPOINT} # custom endpoint will require either aadCredentials or sasToken
|
||||
accountKey: ${ACCOUNT_KEY}
|
||||
```
|
||||
Reference in New Issue
Block a user