Create Deployment Files
How to create the admins file, the domains file and the YAML deployment pipeline files that define where and how Integration Hub is deployed.
The deployment files are kept in the Business Unit directory of the Integration Hub repository. The integration definitions are kept separately, in the interfaces directory.
| File | Required | What it defines |
|---|---|---|
admins.json | No, but recommended | The Integration Hub Portal administrators for each environment. |
domains.json | Yes | The Domains to deploy in each environment, and their settings. |
{environment}.yaml | Yes, one for each environment | The deployment pipeline for the environment, for example staging.yaml and production.yaml. |
Create each file as described in the steps below.
Create the Admins File
The admins file defines the administrators of the Integration Hub Portal for each environment. Administrators can see every Domain, and can manage all other portal users on the User Admin page. This is the recommended way to manage portal access.
The file is optional, but without it nobody can use the User Admin page. Create it in the Business Unit directory.
The file has one property for each environment. The property name must be the same as the value of the environment variable for that environment, for example staging or production. Each environment has an IntegrationHub list of administrators, with these properties:
| Property | Description |
|---|---|
email | The email address of the administrator's Entra ID account. Required. |
name | The name to show in the portal. |
{
"staging": {
"IntegrationHub": [
{ "email": "admin.user@example.com", "name": "Admin User" }
]
},
"production": {
"IntegrationHub": [
{ "email": "admin.user@example.com", "name": "Admin User" },
{ "email": "another.admin@example.com", "name": "Another Admin" }
]
}
}On each deployment of the Integration Hub Portal:
- Each administrator listed for the environment gets a portal account with the
Adminaccess level, if they do not already have it. - An administrator who was added from this file, but is no longer listed, loses the
Adminaccess level. Their account stays, so any Domain access that they were given in another way stays too. - An environment that has no property in the file is not changed. To remove all administrators from this file for an environment, keep the property with an empty
IntegrationHublist.
Administrators from this file are read-only on the User Admin page. To change them, change the file and run the deployment again.
Other Klevr products can also use this file, with their own lists (for example IdentityDNA). Integration Hub uses only the IntegrationHub list.
Create the Domains File
In Integration Hub, the mid-level of the organisational structure is called a Domain.
In the Business Unit directory, create a domains.json file that contains the Domain details for the Integration Hub instance.
The file needs to contain the Domain configuration for each environment that will be deployed. This makes it possible to have different configurations for a given Domain by environment.
The file needs to be a JSON file, not a Bicep file.
The deployMode, apiManagementDeployMode, and logicAppDeployMode options are used for all Domains in the Business Unit. If you need to deploy integrations using different deployment modes, you will need to deploy these integrations in different Business Units.
When specifying the deployment mode, please either:
- Set only the
deployModeparameter; or - Set both the
apiManagementDeployModeandlogicAppDeployModeparameters.
{
"deployMode": "Standard | Consumption",
"apiManagementDeployMode": "Basic | Consuption",
"logicAppDeployMode": "Standard | Consumption",
"staging": [
{
"code": "dm1",
"name": "Domain 1",
"portalUsers": [
"name1@example.com"
],
"keyVaultAdmins": [
{
"objectId": "00000000-0000-0000-0000-000000000001",
"name": "Integration Consultants (Entra group)"
}
],
"smsReceivers": [],
"emailReceivers": [
{
"name": "Name 1",
"emailAddress": "name1@example.com"
}
],
"deployStorageServices": true,
"cosmosDBs": [
{
"sqlDBName": "CosmosDbName",
"containers": [
{
"containerName": "CosmosContainerName",
"partitionKey": "/SomeKey",
"TTL": -1
}
]
}
]
},
{
"code": "dm2",
"name": "Domain 2",
"portalUsers": [],
"smsReceivers": [],
"emailReceivers": [
{
"name": "Name 2",
"emailAddress": "name2@example.com"
}
],
"deployStorageServices": false,
"cosmosDBs": []
}
],
"production": [
{
"code": "dm1",
"name": "Domain 1",
"portalUsers": [
"name1@example.com",
"another.name@example.com"
],
"smsReceivers": [
{
"name": "Name 1",
"countryCode": "+61",
"phoneNumber": "0415111111"
}
],
"emailReceivers": [
{
"name": "Name 1",
"emailAddress": "name1@example.com"
},
{
"name": "Another Name",
"emailAddress": "another.name@example.com"
}
],
"deployStorageServices": false,
"cosmosDBs": []
}
]
}Portal Users
The portalUsers property is optional. It lists the email addresses of users who can see the Domain in the Integration Hub Portal, with the User access level.
- Each email address must be the email address of the user's Entra ID account.
- A user removed from the list loses access to the Domain at the next deployment.
- These users are read-only on the portal User Admin page. Change them in this file.
- A deployment that uses
ONLYDEPLOYDOMAINSdoes not change the access of users to Domains that it does not deploy.
Using portalUsers to manage portal users is no longer the recommended approach. Instead:
- Use the admins file to define a small, fixed set of administrators for each environment.
- Have those administrators manage all other users, and the Domains that each user can see, on the portal User Admin page.
You do not need to list administrators in portalUsers, because administrators can see every Domain. The portalUsers property is still supported, so existing domains.json files keep working.
Key Vault Admins
The keyVaultAdmins property is optional. It lists the Entra ID users, groups or service principals that can manage secrets in the Domain's Key Vault, for example the consultants who create the Key Vault secrets that stages read with $kv: tokens.
| Property | Description |
|---|---|
objectId | The Entra ID object ID of the user, group or service principal, from the tenant that owns the Azure subscription. Required. |
name | A name that tells you who the entry is for. |
- Each entry can get, list, set, delete, recover, back up and restore secrets. It cannot purge secrets.
- Use an Entra group where you can, so that people can be added or removed in Entra ID without a deployment.
- The deployment replaces all access policies on the Key Vault. An access policy that is added by hand is removed by the next deployment, so list it here instead.
- An entry removed from the list loses its access at the next deployment.
- Pre-flight validation stops the deployment when an
objectIdis missing, is not a GUID, or is listed more than once.
Deploy Storage Services
The deployStorageServices property is optional and defaults to false. Set it to true for a Domain to deploy these Azure resources for the Domain:
- A Cosmos DB account.
- A Storage Account with an associated Azure CDN profile and endpoint.
The Cosmos DB account is required by the Cosmos DB stages:
- Inbound Cosmos DB Stage
- Store Cosmos DB Query Stage
- Store Cosmos DB Upsert Stage
- Webhook Push Alerts for Cosmos DB
The Storage Account and associated Azure CDN profile are only required by the useCDN option of the Store Cosmos DB Upsert Stage. No other stage supports useCDN.
When deployStorageServices is false, the cosmosDBs list for the Domain is ignored.
Cosmos DB Settings
The cosmosDBs property lists the Cosmos DB databases, and the containers inside them, to create in the Domain's Cosmos DB account. It is only used when deployStorageServices is true.
| Property | Description |
|---|---|
sqlDBName | The name of the Cosmos DB database. Stages refer to this value with cdb.databaseId. |
containers | The list of containers to create in the database. |
containerName | The name of the container. Stages refer to this value with cdb.containerId. |
partitionKey | The partition key path for the container, for example /SomeKey. Documents stored in the container must include a top-level property with this name. The path cannot be changed after the container is created. |
TTL | The default time to live, in seconds, for documents in the container. Use -1 to keep documents with no expiry. |
A stage that uses Cosmos DB must match the Domain's domains.json file:
- The
cdb.databaseIdvalue must match asqlDBNamevalue in the Domain. - The
cdb.containerIdvalue must match acontainerNamevalue in that database. - If the stage sets
cdb.partitionKey, it must match thepartitionKeyvalue of the container.
These checks are case-insensitive. The pre-deployment tests report a mismatch before the deployment starts.
For each container, Integration Hub also creates a <containerName>Webhooks container (partition key /callbackUrl) and a <containerName>Lease container (partition key /id). These containers support webhook registration and use the same TTL value as the main container. You do not need to define them in domains.json.
Create YAML Deployment Pipeline Files
Create a YAML deployment pipeline for each environment required.
Generally, just a staging and production environment are required.
The staging environment is where updates to integrations are tested.
The production environment is where actual production integrations run.
Take care to review and update the file appropriately.
# Set the name as per the "Business Unit" and environment.
name: infra-wsc-ih-staging-$(Date:yyyyMMdd)$(Rev:.r)
variables:
# Set the group name as per the "Business Unit" and environment.
- group: S-WSC-IH
trigger:
batch: true
branches:
include:
# Set the trigger to use the branch name that matches the environment
- staging
resources:
repositories:
- repository: klv-ih-core
type: git
name: Klevr Apps/klv-ih-core
endpoint: Customer_Klevr_Service_Connection
ref: refs/heads/main
- repository: klv-ih-portal
type: git
name: Klevr Apps/klv-ih-portal
endpoint: Customer_Klevr_Service_Connection
ref: refs/heads/main
stages:
# Use the common "deploytemplate.yml" to deploy the Integration Hub
- template: pipeline/deploytemplate.yml@klv-ih-core
parameters:
# Set the variable group name as per the "Business Unit" and environment.
variableGroupName: S-WSC-IHUsing Specific Integration Hub Versions
As a general rule, an Integration Hub instance should use the latest release of the core Klevr Integration Hub service code, which will be in the klv-ih-core repository's main branch, and the latest release of the core Klevr Integration Hub Portal service code, which will be in the klv-ih-portal repository's main branch.
However, there may be instances where an Integration Hub instance needs to use something other than the latest release.
In this case, update the ref section in the YAML deployment pipeline file to select the specific branch or commit of the core Klevr Integration Hub service code that is needed.
Last updated on