Skip to content

Deploying Spotfire on Azure Kubernetes Service (AKS)

This page provides an overview of the main steps needed to prepare an environment in Azure and to deploy the Spotfire Platform ⧉ on Azure Kubernetes Service (AKS) ⧉, using the Spotfire CDK ⧉.

You will deploy the Spotfire Platform on Azure using the following services:

This is a quickstart guide. For more information, see the official documentation. Always follow the documentation and recommended best practices from the vendor.

Remember to change the provided example values to adapt them to your own environment and needs.

Prerequisites

Note: The Azure CLI (az) is used in the examples below, but you can use the Azure web interface, REST API, libraries or any other available methods.

Steps

1. Prepare a resource group, virtual network and subnets

  1. Create your resource group:

    export RESOURCE_GROUP=spotfire-quickstart
    export LOCATION=swedencentral
    az group create --name $RESOURCE_GROUP --location $LOCATION
    

  2. Create a virtual network and subnets for your AKS cluster and Azure database. For example:

    export SPOTFIRE_VNET=spotfire-vnet
    export K8S_SUBNET=k8s-subnet
    export DB_SUBNET=db-subnet
    
    az network vnet create \
        --resource-group $RESOURCE_GROUP \
        --name $SPOTFIRE_VNET \
        --address-prefixes 10.10.0.0/16
    
    az network vnet subnet create \
        --resource-group $RESOURCE_GROUP \
        --vnet-name $SPOTFIRE_VNET \
        --name $K8S_SUBNET \
        --address-prefixes 10.10.1.0/24
    
    az network vnet subnet create \
        --resource-group $RESOURCE_GROUP \
        --vnet-name $SPOTFIRE_VNET \
        --name $DB_SUBNET \
        --address-prefixes 10.10.2.0/24
    

  3. Save the AKS subnet resource ID for later:

    export K8S_SUBNET_ID=$(az network vnet subnet show \
        --resource-group $RESOURCE_GROUP \
        --vnet-name $SPOTFIRE_VNET \
        --name $K8S_SUBNET \
        --query id --output tsv)
    

For more information, see the Azure Virtual Network documentation ⧉.

2. Create an Azure Kubernetes Service (AKS) cluster

  1. Define the variables for your cluster:

    export CLUSTER_NAME=my-aks
    export NODE_SIZE=Standard_D8_v4
    export NODE_COUNT=3
    export AUTH_IP_ADDRESSES=123.45.0.0/16
    

    Note: In this example we create a 3-nodes cluster using the Standard_D8_v4 virtual machine type (8 vCPUs, 32 GB). See the Azure virtual machine sizes ⧉ to understand which SKU you need for your K8s nodes. The Azure D-Family of VM-sizes are general purpose VMs for Enterprise-grade applications.

    Note: See the Spotfire system requirements ⧉ for the minimum and recommended sizing. Observe your K8s resource utilization to understand which node size and how many nodes do you need.

  2. Create the AKS cluster:

    az aks create \
        --resource-group $RESOURCE_GROUP \
        --name $CLUSTER_NAME \
        --location $LOCATION \
        --node-count $NODE_COUNT \
        --node-vm-size $NODE_SIZE \
        --enable-addons monitoring \
        --generate-ssh-keys \
        --vnet-subnet-id $K8S_SUBNET_ID \
        --api-server-authorized-ip-ranges $AUTH_IP_ADDRESSES
    

    It will take ~5-10 minutes to create the K8s cluster.

  3. Configure kubectl to use the new AKS cluster:

    az aks get-credentials \
        --resource-group $RESOURCE_GROUP \
        --name $CLUSTER_NAME
    

  4. Verify that you can connect to the cluster using kubectl:

    kubectl get nodes -o wide
    

For more information, see the Azure Kubernetes Service (AKS) Documentation ⧉.

You can learn about reference architectures, diagrams, and best practices in Azure Architecture Center: Best practices ⧉.

See also AKS best practices ⧉.

3. Deploy Spotfire

  1. Create a namespace for your deployment:

    export NAMESPACE=spotfire-quickstart
    kubectl create namespace $NAMESPACE
    

  2. Create a pull secret for the Spotfire container registry:

    export REGISTRY_SERVER=oci.spotfire.com
    export REGISTRY_SECRET=spotfire-oci-secret
    export REGISTRY_USERNAME=<username>
    export REGISTRY_PASSWORD=<password>
    
    kubectl create secret docker-registry $REGISTRY_SECRET \
        --namespace $NAMESPACE \
        --docker-server=$REGISTRY_SERVER \
        --docker-username=$REGISTRY_USERNAME \
        --docker-password=$REGISTRY_PASSWORD
    
    The secret is used by the Kubernetes cluster to pull the Spotfire container images from the Spotfire OCI registry.

  3. Log in to the Spotfire Helm charts registry:

    helm registry login -u $REGISTRY_USERNAME oci.spotfire.com/charts
    
    This is needed to access the Spotfire Helm charts in the Spotfire OCI registry.

  4. Deploy the Spotfire Platform using the spotfire-platform Helm chart. For example:

    export MY_SPOTFIRE_RELEASE=vanilla-spotfire
    
    helm upgrade --install $MY_SPOTFIRE_RELEASE \
        oci://$REGISTRY_SERVER/charts/spotfire-platform \
        --version 2.0.0 \
        --namespace=$NAMESPACE \
        --set global.spotfire.acceptEUA=true \
        --set global.spotfire.image.registry=$REGISTRY_SERVER \
        --set global.spotfire.image.pullSecrets[0]=$REGISTRY_SECRET \
        --set spotfire-server.configuration.site.publicAddress=http://spotfire.example.com \
        --set spotfire-server.postgresql.enabled=true \
        ...
    
    For more information, see the spotfire-platform Helm chart.

You have now deployed the Spotfire platform on Azure, using Azure Kubernetes Service (AKS).

4. Next steps

You can now continue with:

Cleanup

To avoid unneeded resource usage, once you have completed these tutorials, delete any created resources:

az aks delete --name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --yes --no-wait
...
For more information, see Delete an AKS cluster ⧉.

You can also remove all the resources within a resource group with a single command:

az group delete --name $RESOURCE_GROUP --yes --no-wait