2.1 KiB
2.1 KiB
| sidebar_position |
|---|
| 3 |
Development setup
Prerequisites:
Environment description
The Turtles development environment relies on Tilt for hot-reloading and a Kind cluster with Rancher and Turtles installed. We also use ngrok to expose the Rancher server to the internet.
The environment can be provisioned using the make dev-env command. However, there are some prerequisites that need to be met before running this command. Executing the command will perform the following actions:
- Create a kind cluster with the following configuration. This cluster will be used to run Rancher and Turtles and will also be prepared to work with CAPD (CAPI Provider Docker).
- In this setup, we will install the Cluster API Operator separately from Turtles for a decentralized development environment.
The CAPI Operator will be installed using a Helm chart and will include the following providers:
- Core Cluster API
- Kubeadm Bootstrap and Control Plane Providers
- Docker Infrastructure Provider
- Cert Manager
- Install the ngrok ingress controller to expose the Rancher server to the internet.
- Install the
Rancher managerusing Helm. - Run
tilt upto install Turtles and enable hot-reloading of containers.
Create a local development environment
-
Clone the Rancher Turtles repository locally.
-
Create tilt-settings.yaml:
{
"default_registry": "ghcr.io/turtles-dev",
"debug": {
"turtles": {
"continue": true,
"port": 40000
}
}
}
- Open a terminal in the root of the Rancher Turtles repository.
- Run the following:
# Rancher hostname can be configured using ngrok.
RANCHER_HOSTNAME=my.customhost.dev NGROK_API_KEY="<api-key>" NGROK_AUTHTOKEN="<api-authtoken>" make dev-env