The EDB Postgres Ark image is available on the Microsoft Azure Marketplace. To create an Ark virtual machine, log in to the Microsoft Azure management console, and click the green plus sign in the upper-left hand corner to navigate to the Azure Marketplace.When the Azure Marketplace opens, enter EDB Postgres Ark in the search box. Select the EDB Postgres Ark (published by EnterpriseDB Corp.) icon from the search results, and click Create to continue.Use fields on the Basics panel (see Figure 3.55) to provide general information about the new VM:
• Provide a name for the VM in the Name field.
• Use the VM disk type field to select the disk type for the root volume.
• Provide an operating system user name in the User name field.
• Use the Authentication type switch to select an authentication type.
• If you elect to enable SSH public key authentication, provide the key in the SSH public key field.
• If applicable, use the Resource group field to specify a resource group.
• If prompted, use the Location field to specify a location.Click OK to continue.Use options on the Size panel (see Figure 3.56) to specify your preferences about the size of the VM instance:
• Use the Supported disk type drop-down listbox to select the disk type for the machine.
• Use the Minimum cores slider to specify the minimum number of cores allotted for the machine.
• Use the Maximum memory slider to specify the maximum memory allotted for the machine.
• Click Select to continue.Use fields on the Settings panel (see Figure 3.57) to specify your configuration preferences for the virtual machine. When configuring an Azure virtual machine to use the Ark console, you should:
• Open the Network security group pane and select the security group that you wish to use for the virtual machine.
• Use the Extensions pane to identify a script that contains the password that allows access to the Ark console. Create a file named startup-password.sh that contains the following text:#!/bin/sh
rm -f /var/ppcd/startup-password.txt
echo "console_password" > /var/ppcd/startup-password.txt chown ppcd:ppcd /var/ppcd/startup-password.txt
chmod 600 /var/ppcd/startup-password.txtWhere console_password is replaced with the password you will provide when prompted for a password by the Ark setup dialog.To provide the location of the script to the virtual machine, open the Extensions pane, and click Add extension; when the New resource pane opens, select Custom Script For Linux.Use the Install extension pane (see Figure 3.58) to identify the script file:
• Use the button to the right of the Script files field to open a file browser and upload the script file.
• Enter the command that will invoke your script in the Command field; for example, sh startup-password.sh.Click OK to continue and return to the Settings panel; when you've finished updating the settings with your preferences, click OK to continue to the Summary panel.The Summary panel (see Figure 3.59) displays a detailed description of the configuration of the virtual machine that will host the Ark console. Select OK to begin deploying the virtual machine.You can monitor the virtual machine's deployment from the Azure Operations page, the Resource group activity log, or the Virtual machine page. A notification will be generated when the deployment completes.While the virtual machine deploys, you can register your application in the Azure Active Directory. You will need the Public IP address or DNS name of your server for the registration. To copy the IP address, click the copy icon to the right of the Public IP address on the VM Essentials panel (see Figure 3.60).After copying the public IP address or DNS name of your server, select App registrations from the Active Directory page. Click the New application registration button located on the App registrations detail panel (see Figure 3.61).Use fields on the Create panel (see Figure 3.62) to provide information about your application:
• Click Create to register your application.After creating the virtual machine and registering the application, you must adjust the required permissions, allowing the Windows Azure Service Management API to connect to your application. This will give the Ark server permission to control Azure services via the Service Management API.Please note that you must be an Azure Global Administrator to grant permissions required by Ark. Navigate to the Required permissions page for the application, and select +Add from the Required permissions panel (see Figure 3.63).Click Select an API, and then highlight Windows Azure Service Management API (see Figure 3.64).Click Select permissions, and then Access Azure Service Management (see Figure 3.65); then, click Select.Then, click Grant Permissions (see Figure 3.66).When prompted, click Yes to confirm that you wish to grant access permissions (see Figure 3.67).Repeat the process, adding permissions for Microsoft Graph. When adding permissions for Microsoft Graph, select a scope of Read all users' full profiles.When you're finished granting permissions, the Required permissions list (see Figure 3.68) should include: