How to deploy GraphDB in Azure¶
What’s in this document?
GraphDB can be deployed on Microsoft Azure by following the general installation instructions. You can find information regarding the costs of running a GraphDB instance on the Azure website.
Tip
We strongly recommend using the provided Terraform module, as it automates the procedure for deploying GraphDB on Azure and mitigates challenges commonly encountered during deployment. You can find the module in our GitHub repository. The Terraform module is also available in the Terraform registry.
See also
Architecture¶
The GraphDB architecture diagram showcases the deployment architecture for GraphDB on VM scale set instances in Azure cloud platform. The diagram illustrates the key components, and their interactions to provide a high-level understanding of the system’s architecture and how it should be deployed.
Note
There are no third-party integration points on the default GraphDB deployment.
Prerequisites¶
There are several prerequisites for running a GraphDB instance on Azure:
Access to an Azure account and an active Azure subscription.
Active GraphDB license required to use the Enterprise functionalities of the database.
Create a shell script used to initialize the VM scale set instances.
Accept a GraphDB BYOL offer.
Note
We highly recommend you use the the GraphDB Terraform module to deploy GraphDB on Azure. The module contains Terraform scripts that fully setup the GraphDB cluster and handle DNS records registration, and more. If you use these template files on their own, you will need to replace the placeholder values of all variables with your actual values. Please note that the scripts are template files and are therefore escaped.
Technical requirements¶
The following Azure services are required to complete the GraphDB deployment on Azure:
Service |
Description |
|---|---|
Container that holds closely related Azure resources and services that forms a solution. |
|
Private virtual network that enables Azure resources to communicate securely with each other. |
|
Scalable compute service for creating and managing load balanced VM instances. Used to deploy GraphDB VM images build with GraphDB Azure Packer scripts that packages GraphDB and GraphDB external cluster proxy. |
|
Block level storage for persistent data attached to VM instances. Used for persistent storage of GraphDB instance data, configurations and log files. |
|
Scalable layer 7 web load balancer managing traffic to applications in Azure. Used to load balance requests to GraphDB’s external cluster proxies running in the VM scale set. |
|
Gateway for private outbound connectivity to the internet from VM instances. Provides GraphDB VM scale set instances with NAT based internet connectivity without directly exposing them. |
|
Secure storage for secret keys and certificates. |
|
Service for central storage and management of application settings and feature flags. Used to store GraphDB configurations and license. |
|
Secure storage for files and objects. Used for scheduled GraphDB backups that are stored as BLOBs in a storage container. |
|
Monitoring service that collects and aggregates data, metrics and service logs from different Azure resources. |
|
Secure DNS service for private DNS resolution between Azure resources. Used to establish stable network identifiers for GraphDB VM scale set instances. |
|
Dedicated IP address exposing Azure resources on the internet. Used to expose the Application Gateway and NAT gateway on the internet. |
|
Security rules restricting the network traffic between Azure resources in an Azure Virtual Network. Used to restrict the traffic between the Virtual Network subnets. |
Required skills¶
Note
Deploying GraphDB on Azure requires a combination of skills in Azure infrastructure management, database administration, and system troubleshooting. Acquiring these skills may involve hands-on experience, self-study, online resources, and formal training programs provided by Azure like Azure Fundamentals or other educational platforms.
The following skills and knowledge are typically required in order to successfully deploy GraphDB on Azure:
Azure Fundamentals |
Familiarity with Microsoft Azure and understanding of its core concepts, such as subscriptions and resource groups, VM instances, virtual networks, security groups and RBAC roles. Knowledge of how to navigate the Azure Portal and interact with Azure resources is essential. |
|---|---|
Azure Virtual Networks |
Understanding network fundamentals and security, subnets and network security groups. Knowledge of how to set up inbound and outbound traffic rules with NSGs to allow communication with GraphDB. |
Azure VM scale sets |
Proficiency in creating and managing Azure VM instances. This includes selecting the appropriate machine size, configuring security settings, managing storage (Managed Disks), and understanding VM instance lifecycle management. |
Monitoring and Troubleshooting |
Proficiency in monitoring the health and performance of GraphDB instances on Azure. Understanding of logging, monitoring and troubleshooting techniques using Azure Monitor, VM instance logs, and GraphDB diagnostic tools. |
Linux Administration |
Proficiency in Linux command-line interface (CLI) and basic administration tasks. This includes SSH access to the VM instances using Azure Bastion, navigating the file system, managing permissions, installing packages, and configuring system settings. |
Database Management |
Knowledge of GraphDB and its deployment requirements. Understanding of how to configure GraphDB settings, including database storage, memory allocation, and repository creation. |
Database Backup and Recovery |
Familiarity with backup and recovery strategies for GraphDB on Azure. Knowledge of Azure services like Storage Account for data backups and restoration processes. |
High Availability and Scalability |
Knowledge of implementing high availability and scalability for GraphDB on Azure. This may involve using features like VMSS Auto Scaling, load balancers, and multi-Availability Zone (AZ) deployments. |
Infrastructure as Code (IaC) |
Familiarity with Infrastructure as Code principles and tools like Terraform. This enables automating the provisioning and configuration of GraphDB infrastructure. |
Security Best Practices |
Understanding of security best practices for Azure deployments, including data encryption, access controls, identity and access management, and compliance considerations. |
Creating a Resource Group¶
Before you start deploying your resources, you need to create a resource group to contain them.
Go to the .
Click on .
Search for and select it, then click on .
Fill in the required information:
Click on , and then on .
Creating a Virtual Network¶
Navigate to the Resource Group you just created.
Click on .
Search for and select it, then click on .
Fill in the required information:
Click on , and then on .
Creating the two subnets¶
Inside the Virtual Network you just created, you need to create two subnets. One of the subnets will be used for the Virtual machine scale set, and the other will be used for the Application gateway.
Navigate to the tab inside the Virtual Network you just created.
Click on .
Provide a unique and .
Click on .
Under , search for the endpoint you need, and select it:
When creating the Gateway subnet, select .
When creating the VMSS subnet, select .
Scroll down to , and under , select both and .
Click , then repeat the process one more time for the second subnet.
Creating an Application Security Groups (ASG)¶
Navigate to your Resource Group and click on .
Search for and select it, then click on .
Provide a unique name for your ASG.
Click on , and then on .
Creating the two Network Security Groups (NSG)¶
You need to create two Network Security Groups (NSGs) — one for the VMSS, and one for the Gateway.
Navigate to your Resource Group and click on .
Search for and select it, then click on .
Provide a unique name for your NSG.
Click on , and then on .
Repeat the process one more time for the second NSG.
After both NSGs have been deployed, you need to associate each one of them with their respective subnet.
Navigate to the newly deployed NSG, and go to .
Click on .
Select the virtual network you created earlier from the drop-down menu, and then select the respective subnet.
Configuring the security rules for the VMSS NSG¶
After you create the NSGs, you also need to configure the security rules for both of them. The VMSS NSG has both Inbound and Outbound security rules. You can use the table below for reference for each individual rule.
Source |
Source configuration |
Source port ranges |
Destination |
Destination configuration |
Service |
Destination port ranges |
Protocol |
Action |
Recommended priority |
|
|---|---|---|---|---|---|---|---|---|---|---|
Inbound rule #1 |
IP Addresses |
IP Address: 10.0.0.0/16 |
7200-7201 |
Application security group |
Custom |
7200-7201 |
TCP |
Allow |
100 |
|
Inbound rule #2 |
Application security group |
* |
Application security group |
Custom |
7200-7201 |
TCP |
Allow |
200 |
||
Inbound rule #3 |
Application security group |
* |
Application security group |
Custom |
7300-7301 |
TCP |
Allow |
210 |
||
Outbound rule #1 |
Application security group |
* |
Service tag |
Destination service tag: Internet |
Custom |
* |
Any |
Allow |
100 |
|
Outbound rule #2 |
Application security group |
* |
Application security group |
Custom |
7200-7201 |
TCP |
Allow |
200 |
||
Outbound rule #3 |
Application security group |
* |
Application security group |
Custom |
7300-7301 |
TCP |
Allow |
210 |
Configuring the security rules for the Gateway NSG¶
After you configure the security rules for the VMSS NSG, you also need to configure the security rules for the Gateway NSG. It requires only Inbound rules. You can use the table below for reference for each individual rule.
Source |
Source service tag |
Source port ranges |
Destination |
Destination configuration |
Service |
Destination port ranges |
Protocol |
Action |
Recommended priority |
|
|---|---|---|---|---|---|---|---|---|---|---|
Inbound rule #1 |
Service tag |
GatewayManager |
* |
Any |
N/A |
Custom |
65200-65535 |
TCP |
Allow |
100 |
Inbound rule #2 |
Service tag |
AzureLoadBalancer |
* |
IP Addresses |
IP Address: 10.0.0.0/24 |
Custom |
8080 |
TCP |
Allow |
110 |
Inbound rule #3 |
Service tag |
Internet |
* |
IP Addresses |
IP Address: 10.0.0.0/24 |
HTTP |
80 |
TCP |
Allow |
120 |
Inbound rule #4 |
Service tag |
Internet |
* |
IP Addresses |
IP Address: 10.0.0.0/24 |
HTTPS |
443 |
TCP |
Allow |
130 |
Inbound rule #5 |
Any |
N/A |
* |
IP Addresses |
IP Address: 10.0.0.0/24 |
Custom |
8080 |
Any |
Deny |
4000 |
Creating the two Public IP addresses¶
You need to create two public IP addresses — one for the Application gateway, and one for the NAT gateway.
Navigate to your Resource Group and click on .
Search for and select it, then click on .
Fill in the required information:
Name: Provide a unique name.
Zone: Zone redundant (recommended).
Assignment: Static or Dynamic (depending on your needs).
Click on , and then on .
Repeat the process one more time for the second Public IP address.
Note
The idle connection timeout is 5 minutes (the Azure default is 4 minutes). To prevent timeouts, we recommend the inclusion of Keep-Alive messages with your requests.
Creating the NAT gateway¶
Navigate to your Resource Group and click on .
Search for and select it, then click on and provide a unique name.
Under , select the public IP you just created.
Under , select the virtual network created earlier from the drop-down menu, then select the VMSS subnet.
Click on , and then on .
Creating a User-Assigned Managed Identity¶
Navigate to your Resource Group and click on .
Search for and select it, then click on .
Provide a unique name for the User-assigned managed identity.
Click on , and then on .
Note
Make sure that Identity has enough rights to “Create” and “Read”
You will need to assign identity to DNS Private Zone.
Creating the Storage Account¶
Navigate to your Resource Group and click on .
Search for and select it, then click on .
Under , select the virtual network and choose the VMSS subnet.
Under :
Check , with 31.
Check , with 31.
Check , and select 31.
Uncheck everything else.
Click on , and then on .
After the Storage Account has been deployed:
Navigate to the newly created Storage Account, and go to .
Create containers for backup.
Creating the Application Gateway¶
Navigate to your Resource Group and click on .
Search for and select it, then click on .
Set the following instance details:
Under , select the gateway subnet.
Under , select the gateway IP created earlier.
Under , add a backend pool with targets.
Note
Once you create and properly configure the VMSS, Azure should automatically add it as a target to the backend pool.
Under , define the , and .
Configurations for the Listener:
Configurations for the :
Set a high priority for the rule.
Tip
We recommend a value of 100.
Review and create the resource.
Warning
Deploying the application gateway can take longer than most of the other resources.
Creating the Virtual Machine Scale Set (VMSS)¶
Now that all other required resources have been deployed, the next step is to create the Virtual Machine Scale Sets (VMSS), where each instance functions as a cluster node. VMSS enables the deployment and management autoscaled, identical virtual machines, allowing you to dynamically scale in or out.
Additionally, this is where you can add a custom user data script if you want to use one.
Tip
You can use the custom user data script that is part of the Terraform module for reference when creating your script.
Navigate to your Resource Group and click on .
Search for and select it, then click on .
Under , provide a unique name and select all necessary availability zones.
Under , choose Uniform.
Under , click on and search for the GraphDB image in the .
For each availability zone, add a managed disk — the recommended disk is Premium SSDv2 with 7500 IOPS and 250 throughput, 500GB.
Add to the earlier created virtual network and select the VMSS subnet.
Under , select the created earlier.
Under add the user-assigned managed identity you created earlier.
If you want to use a cluster, we recommend a value of 3, 5 or 7 under .
Enable health monitoring with the following configuration:
Application health extension
HTTP
: 7200
/rest/cluster/node/status
If you want to use a user data script, you can add it under .
Tip
You can use the custom user data script that is part of the Terraform module available on the Ontotext-AD github repo for reference when creating your script.
Review and create the resource.
Attaching the managed disks¶
After you have deployed your VMSS, you need to attach a disk to each of your VMSS instances.
Hint
The disk management script from the Terraform module can be used as a reference for attaching your managed disks.
Navigate to the newly created VMSS, and go to .
Open the instance you want to attach a managed disk to.
Under , click on .
Add the disk you created earlier with 2.
Setting up and managing your cluster¶
Once all the resources are installed and configured correctly, you can create a cluster by accessing Bastion and using the REST API.
Warning
If one of your instances dies or becomes unavailable, you will need to manually remove the node and add a new replacement node.
Accessing the Workbench through the Application Gateway¶
After all the resources are installed, the cluster has been created and all the instances are healthy, the Workbench can be accessed from the Application Gateway.
Warning
You cannot use the Workbench interface to create clusters in an Azure deployment. If you haven’t created a cluster yet, Workbench would not be loaded.
Scaling out and back in VMSS¶
Navigate to the containing your VMSS in the .
Go inside the and select in the navigation pane.
Under , choose or based on your preference.
Under , select the .
Adjust the to the desired number of instances.
Note
If you require a GraphDB Cluster, the instance count is recommended to be 3, 5 or 7.
Click on to apply the scaling configuration.
Required manual maintenance of instances¶
If the Terraform script is not used, some manual maintenance of the instances will be required.
In case of a cluster failure, once the VMs are recreated, you will need to manually handle:
Volume attaching and mounting
DNS address updates
Provisioning of GraphDB configurations and backup scripts.


















