How to: Deploy with Azure DevOps
Promotion of Spark services from one tenant to another using the ImpEx APIs can be integrated with Azure DevOps Pipelines facilitated by PowerShell scripting.
Prerequisites
Client Credentials configured in both the source and destination tenants with access to the source and destination targets.
All referenced services must have a compiled Neuron WebAssembly module.
Any destination folders need to already exist and be accessible with the provided authorization.
Information flow

Azure DevOps Pipelines is used to execute the attached PowerShell script.
The PowerShell script performs the following steps:
Acquires client access tokens for both the source and destination tenants via using Client Credentials grant (OAuth 2.0).
Initiates the Export API package generation job in the source tenant.
Checks the GET export status API for the completed job.
Once completed, it downloads the package.
The package is then uploaded to the destination tenant and deployed using the Import API.
PowerShell script parameters
The parameters for the PowerShell script are aligned with those from the Export and Import APIs. It is recommended to understand the capability there before defining the parameters of the script.
exportEndpoint
importEndpoint
serviceUriSource
and
serviceUriDestination
Reference Export Request body inputs.services and Import Request body
inputs.services_modify
Example: myfolder/myservice
sourceSystem
Reference Export Request body source_system
Example: mycicd
correlationId
Reference Export Request body correlation_id
Example: 456
servicesExisting
Reference Import Request body servicesExisting
Example: add_version
sourceKeycloakMetadataUri
and
destinationKeycloakMetadataUri
Source of the Keycloak OpenID endpoint configuration.
https://keycloak.{ environment}.coherent.global/auth/realms/{tenant}/protocol/openid-connect/token
sourceKeycloakClientId
and
destinationKeycloakClientId
The client ID for the source Keycloak client.
Example: client-credentials
sourceKeycloakClientSecret
and
destinationKeycloakClientSecret
The client secret for the source Keycloak client.
Example: 9Oh1nscDtPzMehwA3ejKJFAar3RRktHY
Setup the pipeline in Azure DevOps
Read the article Use a PowerShell script to customize your pipeline and follow the appropriate instructions for your Azure instance.
Push the PowerShell script
ImpEx.ps1to the root of the project repository.Add the completed YAML code to the pipeline file.
Empty templateSample
Last updated
