In this section we will be deploying the Catalog as well as the Catalog Manager. This will create a database and two app services. To make this process easier, we'll be using an Azure Resource Manager (ARM) template, which allows us to deploy and configure all the Azure resources needed for both the Catalog and Catalog Manager.
If you have not done so already, please read the prerequisites before you get started.
Get the template and parameters file from the source.zip
here. Both will be needed to continue with this deployment option. The steps that follow will show how to deploy using the Azure CLI, but the provided template can also be deployed through the Azure portal.
Before deploying the ARM template, we need to define certain parameters.
Locate the InRule.Catalog.Service.parameters.json file you downloaded above.
Open the file with your text editor of choice and edit the parameters listed below:
Parameter | Example Values | Description |
---|---|---|
catalogServiceName | catalogAppService | Provide a name for the Azure App Service that the catalog service will run on. |
catalogManagerServiceName | catalogManagerAppService | Provide a name for the Azure App Service that the catalog manager service will run on. |
catalogServicePlanSkuName | B1 | Describes catalog services plan's pricing tier and capacity. Plan Details |
catalogSqlServerName | catalogsqldbservername | The server name for the Azure SQL server used to host the Catalog database(s). |
catalogSqlServerUsername | sqlDbServerUser | The server admin username for the Azure SQL server used to host the Catalog database(s). |
catalogSqlServerPassword | sqlDbServerPassword | The server admin password for the Azure SQL server used to host the Catalog database(s). |
catalogSqlDbName | catalogSqlDbName | The name for the Catalog database. |
catalogSqlDbEdition | Basic | The Azure SQL database edition used for the Catalog database. Use Basic for less demanding workloads, Standard for most production workloads, and Premium for IO-intensive workloads. |
catalogSqlDbPerformanceLevel | Basic | The Azure SQL database performance level for the Catalog. These correspond to the specific Azure SQL database edition. |
inRuleVersion | 5.4.1 | Provide the inRule version you wish to deploy, default value is the latest inRule version. |
catalogServicePlanName | inruleCatalogAppServicePlan | The name for the app Service Plan. Leave blank for the value to be derived as catalogServiceName + Plan |
Save copy of the parameters after deployment to refer to and use for future upgrades
Now that the ARM template is configured, we’ll deploy it to get the resources up and running. The following will detail how to use the Azure CLI to deploy the ARM template (Note, this section assumes Azure CLI has already been installed):
First, open a PowerShell prompt and use the Azure CLI to sign in to your Azure subscription:
az login
If your Azure account has access to multiple subscriptions, you will need to set your active subscription to where you create your Azure resources:
# Example: az account set --subscription "Contoso Subscription 1"
az account set --subscription SUBSCRIPTION_NAME
Create the resource group (one resource group per environment is typical) that will contain the InRule-related Azure resources with the az group create command:
# Example: az group create --name inrule-prod-rg --location eastus
az group create --name RESOURCE_GROUP_NAME --location LOCATION
Replace RESOURCE_GROUP_NAME with the name of the Azure Resource Group you want to deploy to:
az deployment group create -g RESOURCE_GROUP_NAME --template-file .\InRule.Catalog.Service.json --parameters .\InRule.Catalog.Service.parameters.json
You'll need to temporarily allow access to your local machine to deploy the schema and data for the database. This step can be found in the Catalog web app deployment guide Catalog Web App Deployment
After opening the firewall, you'll need to use the provided tool to setup the database. This step can be found in the Catalog web app deployment guide Catalog Web App Deployment
In order for Catalog Service to properly function, a valid license file must be uploaded to the web app. The simplest way to upload the license file is via FTP.
First, retrieve the FTP deployment profile (url and credentials) with the az webapp deployment list-publishing-profiles command and put the values into a variable:
# Example: az webapp deployment list-publishing-profiles --name contoso-catalog-prod-wa --resource-group inrule-prod-rg --query "[?contains(publishMethod, 'FTP')].{publishUrl:publishUrl,userName:userName,userPWD:userPWD}[0]" | ConvertFrom-Json -OutVariable creds | Out-Null
az webapp deployment list-publishing-profiles --name WEB_APP_NAME --resource-group RESOURCE_GROUP_NAME --query "[?contains(publishMethod, 'FTP')].{publishUrl:publishUrl,userName:userName,userPWD:userPWD}[0]" | ConvertFrom-Json -OutVariable creds | Out-Null
Then, upload the license file using those retrieved values:
# Example: $client = New-Object System.Net.WebClient;$client.Credentials = New-Object System.Net.NetworkCredential($creds.userName,$creds.userPWD);$uri = New-Object System.Uri($creds.publishUrl + "/InRuleLicense.xml");$client.UploadFile($uri, "$pwd\InRuleLicense.xml");
$client = New-Object System.Net.WebClient;$client.Credentials = New-Object System.Net.NetworkCredential($creds.userName,$creds.userPWD);$uri = New-Object System.Uri($creds.publishUrl + "/InRuleLicense.xml");$client.UploadFile($uri, "LICENSE_FILE_ABSOLUTE_PATH")
Using irAuthor you should now be able to connect to your catalog using the url https://catalogServiceName.azurewebsites.net/service.svc.