Tutorial: Self-Hosting Windmill on Ubicloud for Production
Windmill is an open-source platform that transforms scripts into UIs, APIs, and workflows. Supporting languages like Python and TypeScript, it simplifies internal tool creation, automation, and scaling for teams. This guide will help you set up Windmill on Ubicloud, with Ubicloud managed Kubernetes and PostgreSQL services.
Preparing the Ubicloud Environment
To prepare the Ubicloud environment for running Windmill, follow the steps outlined in the Ubicloud documentation:
- Setup your Ubicloud account and enter your billing details.
- Create a Managed PostgreSQL server: Start with a burstable compute option and scale your database as needed.
- Set up a Managed Kubernetes cluster: Configure one control plane node and three worker nodes as a good initial setup.
Preparing Your Environment
Step 0: Ensure that your shell environment has kubectl and helm installed.
Use the commands to verify that kubectl
and helm
are installed:
Step 1: Obtain the kubeconfig File
- Download the kubeconfig: Access the Kubernetes cluster in the Ubicloud console and download the kubeconfig file.
- Copy the file to the default kubeconfig location (
$HOME/.kube/config
) or set theKUBECONFIG
environment variable to configure your Kubernetes client (e.g., kubectl).
Step 2: Create a Namespace for Windmill
Create a namespace for the Windmill deployment:
Step 3: Store the Database Connection String in a Secret
Retrieve the connection string for your PostgreSQL database from the Ubicloud console and create a secret:
Deploying Windmill
Add Windmill Helm repo:
Download the values.yaml
file for the Windmill chart:
Disable the built-in PostgreSQL database in values.yaml
:
Set the secret name for the database connection string:
Install the Windmill chart with the modified values.yaml file:
Wait for all pods to start running:
Exposing Windmill to the Internet
By default, Windmill chart restricts the windmill-app service to internal cluster access. To access the Windmill UI via a browser, expose the service externally using a load balancer:
Wait for the service to get an external host assigned:
Connecting to Windmill
The application will be accessible via your cluster’s load balancer URL at port 8000 a few minutes after the EXTERNAL-IP
is assigned. Run the following command to retrieve the address for your Windmill deployment.
Congratulations—Windmill is now running on Ubicloud!
Configuring TLS for Secure Access
To expose Windmill securely via HTTPS, we’ll employ cert-manager
, ingress-nginx
, and Let’s Encrypt.
Installing and Setting Up ingress-nginx
& cert-manager
Use the following commands to install ingress-nginx
and cert-manager
:
Next, create an issuer in the windmill
namespace to obtain certificates from Let’s Encrypt:
Setting Up DNS Records for Traffic Routing
Retrieve the external IP address of the ingress-nginx controller service:
You should get a result in the form u8ic10u08e-services.k8s.ubicloud.com
. We will use this address in the following step to route traffic to the cluster securely.
windmill.yourdomain.com
, create a CNAME record with your DNS provider to route windmill.yourdomain.com
to the EXTERNAL-IP
associated with the ingress-nginx-controller
service and use that address in the following steps.Updating Windmill Chart Values for TLS
Modify values.yaml
file as follows:
Apply the updated values to the Windmill installation:
Verifying the Certificate Status
Check the readiness of the TLS certificate for the Windmill application:
Once the certificate is ready, you can access your Windmill application securely at https://xxxxxxxxxx-services.k8s.ubicloud.com or https://windmill.yourdomain.com.