Guide for configuring Kubernetes (k3s) on AWS EC2 and installing ale.
This guide demonstrates Kubernetes cluster configuration using k3s. However, ale can be used with clusters configured through other methods such as kubeadm, kubespray, etc.
After SSH connecting to EC2, run the following command to install k3s.
Copy
curl -sfL https://get.k3s.io | sh -s - server \ --bind-address=0.0.0.0 \ --advertise-address=[EC2 Public IP Address] \ --tls-san=[EC2 Public IP Address] \ --node-external-ip=[EC2 Public IP Address] \ --disable=traefik \ --docker
2
To use kubectl as a non-root user, run the following commands.
The K3s installed according to this guide includes Metrics Server by default, so installation is not necessary. For clusters without Metrics Server, check the command below to install it.
If no specific Kubernetes cluster name was specified, it is typically created with the name default and can be checked using the kubectl config current-context command.
3
The setup is complete when the logs from pm2 display the following.
Copy
pm2 log ale-run
Copy
...[INFO] [plugin:loader] searching plugins at /home/ubuntu/ale-run/node_modules/@ale-run/runtime/dist[INFO] [plugin:loader] 2 plugin detected in /home/ubuntu/ale-run/node_modules/@ale-run/runtime/dist[INFO] [plugin:loader] plugin @ale-run/plugin-essentials has been added[INFO] [plugin:loader] plugin @ale-run/plugin-file-store has been added[INFO] [plugin:loader] searching plugins at /home/ubuntu/ale-run/node_modules[INFO] [plugin:loader] 1 plugin detected in /home/ubuntu/ale-run/node_modules[INFO] [plugin:loader] plugin @ale-run/plugin-ai-assistant has been added[INFO] [plugin:essentials] plugin @ale-run/plugin-essentials is installed {}[INFO] [plugin:essentials] plugin @ale-run/plugin-essentials is activate {}[INFO] [plugin:file-store] plugin @ale-run/plugin-file-store is activate {}[INFO] [plugin:file-store] working dir is /home/ubuntu/.ale[INFO] [plugin:file-store] storage type is direct[INFO] [plugin:file-store] upload dir is /home/ubuntu/.ale/files[INFO] [plugin:file-store] temp dir is /home/ubuntu/.ale/temp[INFO] [plugin:file-store] endpoint is (none)[INFO] [plugin:file-store] max file size is 10MB[INFO] [plugin:ai-assistant] plugin @ale-run/plugin-ai-assistant is activate {}[WARN] [plugin] [@ale-run/plugin-ai-assistant] activate failed: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).[INFO] [runtime:init] api server listening on 0.0.0.0:9009
If you encounter database conflicts during execution or want to reset settings, delete existing ale data using the following command and restart: