Azure Kubernetes Service with Launchpad
This chapter discusses preparing Azure Kubernetes Service (AKS) for use with Launchpad.
Page Contents
Overview
You can use Azure Kubernetes Service (AKS) to run Stardog and interact with Launchpad.
Our goal in this tutorial is to do the following:
-
Show the commands needed to prepare Azure Kubernetes Service for use with Stardog Launchpad.
-
Show the commands help to show when automating in a CI/CD pipeline.
This page only covers how to set up Azure Kubernetes Service via the CLI.
Prerequisites
Commands:
Dependencies:
Setup
Setting up the environment
Log in to Azure using the instructions found here.
We need to set the following environment variables:
Environment Var | Description |
---|---|
$RESOURCE_GROUP | Resource Group to assoicate the AKS cluster with |
$AKS_NAME | The name of your AKS Cluster |
$SYSTEM_POOL_NODES | The number of nodes in the system pool |
$SYSTEM_POOL_VM | The VM to use for the System Pool |
$STARDOG_POOL_NODES | The maximum number of nodes in the Stardog Pool |
$STARDOG_POOL_VM | The VM to use for the Stardog Pool |
$ZK_POOL_NODES | The number of zookeeper nodes. Only set if you want to deploy a Stardog cluster |
$ZK_POOL_VM | The VM for the Zookeeper nodes. Only set if you want to deploy a Stardog cluster |
$ACR_NAME | The name of you Azure Container Registry (ACR) |
Environment Example
Example variables for a 1-node cluster:
For a 3-node cluster, replace the last line with:
Creating a resource group
If you do not have a resource group, you can create one with the following command:
You can check if a resource group already exists with:
This command does the following:
az group list
: Gets a list of all the resource groups for the logged-in account.jq -r --arg name $AKS_RESOURCE_GROUP 'any(.[]; .name == $name)'
: Checks if there is a resource group whose name matches$AKS_RESOURCE_GROUP
.
If you have not already register with Azure monitoring providers, you can do so with the following commands:
These commands are idempotent, so they can be safely rerun.
Creating the pools
Creating the AKS cluster - System pool
You can create a system pool in an AKS cluster using the following command:
If you are not using ACR, simply drop the --attach-acr
argument.
You can check whether the cluster already exists with:
This command does the following:
az aks list
: Lists all the clusters in our Azure subscription.jq -r --arg aks_name $AKS_NAME '.[] | select(.name == $aks_name)'
: Checks to see if any of the clusters have a name that matches $AKS_NAME, which is what we named our cluster in the previous step.
Creating the Stardog pool
We recommend creating a dedicated pool for Stardog servers. You can do so with this command:
The options --node-taints
and --labels
ensure only Stardog workloads are assigned to these nodes.
You can check whether the node pool already exists with:
This command does the following:
az aks nodepool list --resource-group $RESOURCE_GROUP --cluster-name $AKS_NAME
: Lists all the node pools in our AKS cluster.jq -r --arg pool 'sdpool' '.[] | select(.name == $pool)
: Checks to see if any of the pools have the name “sdpool”, which is what we named our pool in the previous step.
Creating the ZooKeeper pool
This step is only required if you’re running a Stardog cluster of 2 or more nodes. If you start with a single-node deployment and later upgrade to a cluster, you can simply add the ZooKeeper pool when you do so.
Like the Stardog pool, we recommend creating a dedicated pool for the ZooKeeper cluster.
The options --node-taints
and --labels
ensure only ZooKeeper workloads are assigned to these nodes.
You can check whether the node pool already exists with:
Getting the AKS credentials
The last thing to do is to get the credentials for AKS so you can use kubectl
and helm
when installing other components. You can do so with the following command:
Cleaning up
You can now delete your Azure resource group via the following command: