Node.js version 20 or higher is required to use ale.


Cluster Setup

Install and Run ale

1

Enter the following commands to install the `ale-run` package:

mkdir ale-run
cd ale-run
npm i @ale-run/runtime@latest
2

Run the following commands to install the Nginx Ingress Controller:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.11.2/deploy/static/provider/cloud/deploy.yaml
kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission
kubectl patch ingressclass nginx --type='merge' -p '{"metadata": {"annotations": {"ingressclass.kubernetes.io/is-default-class": "true"}}}'
3

Run the following command to install the Metrics Server:

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
4

Enter the following command to run ale in development mode:

npx aled dev
5

Select the cluster where you want to deploy services using ale. The cluster list is retrieved from the contexts registered in `~/.kube/config`.

? Select the k8s cluster to use. › Select the k8s cluster to use.
    No Cluster
    orbstack
❯   docker-desktop

When you see logs like the following, the setup is complete:

...
[INFO] [plugin:cloudtype-apps] plugin @cloudtype/apps is installed {}
[INFO] [plugin:cloudtype-apps] plugin @cloudtype/apps is activate {}
[INFO] [pde:init] plugin "@cloudtype/apps" loaded! 
[INFO] [k8s] KubernetesClusterType initialized with agent {"connection":{"context":"docker-desktop","namespace":"ale-pde"},"stat":{"db":{"url":"mongodb://127.0.0.1:64000/","dbName":"ale-pde"}}}
[INFO] [k8s] ConfigContext initialized with {"connection":{"context":"docker-desktop","namespace":"ale-pde"},"stat":{"db":{"url":"mongodb://127.0.0.1:64000/","dbName":"ale-pde"}}}
[INFO] [k8s] connect k8s to "docker-desktop" 
[INFO] [k8s] [agent] cluster agent initialized 
[WARN] [k8s] ConfigMap.get ale-pde agent-config 
[INFO] [pde:agent] Ale Agent is initialized with config  
[INFO] [pde:init] Ale Agent httpsd is listening at 127.0.0.1:9801 
[INFO] [k8s] config loaded from cluster from "ale-pde/agent-config" 
[INFO] [stat] stat controller init {"collector":{"prefix":"ale"},"db":{"url":"mongodb://127.0.0.1:64000/","dbName":"ale-pde"},"connection":{"context":"docker-desktop","namespace":"ale-pde"}}
[INFO] [stat] connect k8s to "docker-desktop" 
[INFO] [stat] stat watcher started 

If you encounter database conflicts during execution, delete existing ale data using the following command and restart:

rm -r ~/.ale-dev  

By integrating your local environment with GitHub, you can deploy source code from GitHub repositories.

Access Dashboard

Go to http://localhost:9001. On first access, you’ll be connected to the default @dev space.

Deploy

On the dashboard, click or ⌘ + K to open the deployment modal, then select the HTTPBin template.

Without changing any settings, click Deploy at the bottom.

Once deployment is complete, you can access the preview page.

You can deploy GitHub repositories by integrating your local environment with GitHub or deploy private repositories using SSH authentication. For general deployment with ale, refer to the Deploying with ale page.