This guide is for organisations who have a commercial license for Speckle Enterprise, including Automate, and are deploying on their own infrastructure.If you are looking for guidance on how to use Speckle Automate features, please refer to our Automate documentation.
Speckle Enterprise Automate deployment guide
We recommend that you first familiarise yourself with Automate.Prerequisites
Before you can configure Speckle Enterprise Automate, your organization will have already completed the following steps:- Deployment: Deployed Speckle Enterprise Server on Kubernetes. See our instructions for deploying on Kubernetes and configuring Speckle Enterprise Server for more details.
- License Acquisition: Acquired a commercial license for Speckle Enterprise from Speckle Systems. This license should include permissions for deploying Automate.
- Package Registry Token: Obtained a package registry token from Speckle Systems to access the private Helm charts & Docker images for Enterprise features.
- Package Registry URL: Received the URL for the private package registry hosting the Automate Helm charts and Docker images.
Infrastructure
Speckle Enterprise Automate requires the following infrastructure components:- Kubernetes Cluster: A Kubernetes cluster to host the Automate components. This can be a managed service (e.g., EKS, AKS, GKE) or a self-hosted cluster.
- It is possible to host Automate in the same cluster as your Speckle Enterprise Server deployment, and this requires careful configuration of node taints, tolerances, and priority classes to prevent resource contention.
- We recommend using a separate cluster for better isolation, resource management, and security.
- Container Registry: Access to a container registry which will store Automate Functions which are published as Docker images. We recommend a separate registry for Automate, as it programatically writes and reads images.
- Once the registry is created, you will need to create two API tokens/credentials for Automate to authenticate with the registry.
- The first should have read-only access
- The second should have read-write access.
- Once the registry is created, you will need to create two API tokens/credentials for Automate to authenticate with the registry.
- Postgres: Two separate Postgres (version 16) databases are required for Automate; one for the Automate server and one for storing results of Automations. These can be hosted within the same server cluster as the Speckle Enterprise Server database, or in a different server cluster.
- Valkey: A Valkey (or Redis) instance is required by Automate. Due to the lack of isolated namespacing in Valkey/Redis, we recommend using a separate instance for Automate to avoid conflicts with the Valkey/Redis instance used by the Speckle Enterprise Server.
- Blob Storage: An S3-compatible blob storage service is required for Automate to store logs from Automations.
Configuration Steps
Retrieving the Helm Chart
-
To access the private Helm charts for Speckle Automate Enterprise, you need to log in to the Speckle Enterprise package registry:
-
Once authenticated, you can pull the Automate Helm chart and investigate its contents:
-
We recommend reading the
values.yamlfile included in the Helm chart to understand all the configuration options available for Automate. Ajson.schemafile is also included to provide validation and documentation for each configuration option. - We also recommend understanding the architecture of the Kubernetes resources deployed by the Helm chart. Please contact your Speckle representative if you have further questions.
-
Create an empty
values.yamlfile which we will use to configure our deployment:
Image Pull Secrets
The Helm Chart references Docker Images that are hosted in the same private registry as the Helm Chart. You will need to create an Image Pull secret in Kubernetes to allow your cluster to authenticate with the registry and pull the necessary images.-
Create a Kubernetes Secret of type dockerconfigjson:
-
Update the Helm values.yaml file to reference the image pull secret:
License Key
- Obtain your Speckle Enterprise license key from Speckle.
-
Create a Kubernetes Secret to store the license key:
-
Update the Helm values.yaml file to reference the license secret:
Configure the Database connections
Configure Automate Server Database connection
-
Create a Kubernetes secret to store the Automate Server database credentials:
The database connection (
<DB_CONNECTION_URL>) should be in the format of: -
Update the Helm values.yaml file to reference the Automate Server database secret:
-
If your PostgreSQL database TLS presents a self-signed certificate, update the Helm values.yaml file to provide the CA certificate for the Automate Server database connection. The CA certificate should be in PEM format.
Configure Automate Results database connection
The results database is used to store the results of Automations, configuration takes a slightly different format than Automate’s own database connection.-
Create a Kubernetes secret to store the Automate Results database credentials.
-
Update the Helm values.yaml file to reference the Automate Server cache secret:
Configure the Valkey (or Redis) connection
-
Create a Kubernetes secret to store the Automate Server cache (Valkey or Redis) credentials:
The cache connection (
<CACHE_CONNECTION_URL>) should be in the format of: -
Update the Helm values.yaml file to reference the Automate Server cache secret:
Configure the Container Registry connection
Automate requires a container registry to store and retrieve Automate Functions. Automate needs to be able to authenticate with the registry using both read and write credentials, so we recommend creating two separate API tokens/credentials in your container registry; one with read-only permissions and one with read-write permissions. The registry namespace (or ‘organisation’) is the area in your container registry where Automate Functions will be stored. This should be a namespace/organisation dedicated to Automate to avoid conflicts with other images in your registry.-
Create Kubernetes secrets to store the container registry credentials:
-
Update the Helm values.yaml file to reference the container registry secrets:
Configure the Blob Storage connection
Automate requires an S3-compatible blob storage service to store logs from Automations.-
Create Kubernetes secrets to store the container registry credentials:
-
Update the Helm values.yaml file to reference the container registry secrets:
(Optional) Configure Ingress
If your Speckle Enterprise server is external to the cluster where you are deploying Automate, you may need to configure an Ingress resource to allow Speckle Enterprise server to communicate with Automate. If your Speckle Enterprise server is hosted within the same cluster as Automate, you can use internal Kubernetes networking and do not need to set up an Ingress.- You should have an existing Ingress controller set up in your cluster, such as NGINX Ingress Controller or Traefik. If you do not have an Ingress controller set up, you will need to set one up before proceeding.
- You should also have a Certificate Issuer, such as cert-manager, set up in your cluster to manage TLS certificates for the Ingress. If you do not have a Certificate Issuer set up, you will need to set one up before proceeding.
-
Update the Helm values.yaml file to enable the Ingress configuration and set the appropriate host and path:
Security
Enabling your Speckle Server to access Automate
Speckle Server is responsible for triggering Automations in Automate and for displaying the results of Automations in the Speckle Server interface. To do this, Speckle Server needs to be able to communicate with the Automate API. Speckle Server establishes an HTTPS connection with Automate. Automate in turn confirms that the Speckle server is included in its allow-list of referring domains. Automate will make a new HTTPS connection back to Speckle server. Automate and Speckle Server exchange a token to validate the Speckle Server’s identity. To enable developers to test new Automate Functions in local development environments, you may wish to includespeckle.internal in the allow-list of referring domains. Developers will need to add an entry to their local hosts (/etc/hosts or similar) file to point speckle.internal to their localhost IP address (e.g. 127.0.0.1 speckle.internal).
-
To add your Speckle Server’s domain to the allow-list of referring domains in Automate, update your values.yaml file with the following configuration:
Blocking network egress
By default, Automations running within Automate have all ingress blocked. However, they have unrestricted egress. This means that, by default, Automations can make outgoing network requests to any domain on the internet and to the local cluster. We strongly recommend restricting the egress to the local Kubernetes cluster Pod and Service CIDR ranges. Due to limitations in Kubernetes Network Policies, we cannot restrict egress to specific domains, only to IP ranges (defined in CIDR notation).-
To restrict egress for Automations, update your values.yaml file with the CIDR ranges for your local Kubernetes cluster:
(Optional) Observability
Automate supports OpenTelemetry for metrics. Please speak to your Speckle representative for instructions on how to configure Automate to send metrics to your monitoring system.(Optional) Integrate with GitHub
Automate has a built-in integration with GitHub which allows you to create GitHub repositories from Speckle’s templates, and to link your GitHub repositories to Automate Functions for streamlined development and deployment. It is possible to use Automate without GitHub integration, please refer to our documentation for publishing Automate Functions without GitHub integration for more details.- Create a GitHub OAuth App in your GitHub organization to obtain a client ID and client secret. Please follow GitHub’s documentation.
- At present only OAuth Apps are supported, GitHub Apps are not currently supported.
- The Authorization Callback URL for the OAuth App should be
<AUTOMATE_CANONICAL_URL>/api/v2/functions/auth/githubapp/authorize/callback, replacing<AUTOMATE_CANONICAL_URL>with the canonical URL of your Automate instance. - Device flow is not required.
-
Create Kubernetes secrets to store the container registry credentials:
Encrypting GitHub credentials
The GitHub client is used to authenticate with GitHub. The authorization which is shared with Speckle Automate by GitHub is encrypted in the database. This means that even if an attacker were to gain read access to the database, they would not be able to decrypt the GitHub credentials without also having access to the Kubernetes Secret. The encryption uses Public-key cryptography and is achieved using X25519 and XSalsa20-Poly1305 algorithms.-
Generate a public and private key pair for encrypting the GitHub credentials:
-
Store the public and private keys in a json file in the following format:
Note, if you need to rotate keys in the future, you can generate a new key pair and add it to the array in the json file. The Automate server will attempt to decrypt GitHub credentials using each private key in the array until it finds one that works.
-
Create a Kubernetes secret to store the GitHub encryption keys:
-
Store the keys securely and delete these original
.pemand.jsonfiles, as they contain the private keys in plaintext. -
Update the Helm values.yaml file to reference the GitHub encryption keys secret:
(Optional) Function development support
Automate supports the development of new Automate Functions in developer’s local development environments, allowing them to run their Automate Functions in the Automate server. This promotes faster feedback and shortens the development cycle for new Automate Functions, increasing development productivity. Enabling this functionality requires a special allow-listing configuration in Automate, and developers will need to configure their local environments and provide an authentication token.-
Include
speckle.internalin the allow-list of referring domains, update your values.yaml file with the following configuration: - Generate a random password or token. This should be unique to your Speckle Automate deployment.
-
Add the token to your values.yaml file:
Provide Priority Classes
The Helm Chart expects two separate Kubernetes PriorityClasses to be available in the cluster, one for the Automate Server itself (namedautomate-critical) and one for the Automations running within Automate (named automate-workloads).
The priority class values in the below examples should be adjusted for your cluster’s scheme. We recommend that automate-critical is a higher value than automate-workloads.
-
Create the required PriorityClasses in your cluster:
Deploying the Helm Chart
- The Kubernetes RBAC user deploying Automate will require permissions to create namespaces, deployments, services, configmaps, secrets, and other resources required by the Helm Chart. Please ensure your user has the necessary permissions before proceeding.
-
Use Helm to deploy Speckle Enterprise Automate:
Configuring Speckle Server to use Automate
Now that you have deployed Automate, you need to configure your Speckle Enterprise Server to connect to your Automate deployment. This is done by updating theautomate configuration in your Speckle Enterprise Server’s values.yaml file with the canonical URL for your Automate deployment (the same URL you set in the automate.canonicalUrl field in the Automate Helm chart).
-
In Speckle Server’s
values.yamlfile, update the following configuration with the canonical URL for your Automate deployment: - Redeploy your Speckle Enterprise Server with the updated configuration.
- Validate that Automate is working correctly by following our Quickstart Guide.