Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
After you have developed and tested a Microservice in your local environment. You will have to publish the microservice to azure to deploy the necessary files.
You can publish the microservice using the publish workflow.
You can publish the microservice using the PowerShell script included in this article.
Note |
---|
Publishing the microservice using PowerShell requires you to have the appropriate ZIP file for the microservice. Once you have build and published the microservice locally, you can find the deployment zip of your microservices in ..\EmpowerID\WFS\_microservices folder. |
Publish the microservice using the workflow
Log in to EmpowerID as a person with the necessary access to initiate the Microservice Publishing workflow.
On the navbar, expand Azure License Manager and click Configuration.
Select the Tenants tab and then click the Publish Azure App Service action link.
For Application Type select Microservices and then click SUBMIT.
For Microservice Application select the appropriate microservice you want to deploy and then click SUBMIT. In the screenshot below we have selected Azure AD SCIM Microservice v5 for deployment.
Click Choose File and browse for the App Service Publisher Profile Settings file you downloaded from Azure.
Image RemovedOnce you have selected the file, click Submit.
Click Vote Yes to confirm that you want to publish the Microservice and then click Submit to close the publish results message.
. |
Publish the microservice using PowerShell
Copy the below PowerShell script into the text editor of your choice and save it as
zipdeploy_appService.ps1
.Code Block language powershell param( $pubProfileFilePath ,$zipFilePath ) $ErrorActionPreference = "Stop" $pubProfile = [xml](gc $pubProfileFilePath) $zipPubProfile = $pubProfile.publishData.publishProfile | where { $_.publishMethod -eq "zipdeploy" } $userAgent = "powershell/1.0" $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $zipPubProfile.userName, $zipPubProfile.userPWD))) $zipdeployUrl = "https://$($zipPubProfile.publishUrl)/api/zipdeploy" $deploymentsUrl = "https://$($zipPubProfile.publishUrl)/api/deployments" Invoke-RestMethod -Uri $zipdeployUrl -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -UserAgent $userAgent -Method Post -InFile $zipFilePath Invoke-RestMethod -Uri $deploymentsUrl -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -UserAgent $userAgent -Method Get
Open an administrative PowerShell session.
Navigate to the directory where you saved the script and execute the script, passing in the values of the
pubProfilePath
andzipFilePath
parameters via the command line, where the value ofpubProfilePath
is the path to the App Service Publisher Profile Settings file you downloaded from Azure, and the value ofzipFilePath
is the path to the microservice ZIP file you developed.The command to execute the script should look similar to that shown in the below image.
The Microservice is now published to your app service.
Div | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
IN THIS ARTICLE
|