Skip to content
forked from chuckha/capi-dev

A development repo for working on cluster api

Notifications You must be signed in to change notification settings

noamran/capi-dev

 
 

Repository files navigation

Cluster API Development Environment

This repo houses some tools to make running Cluster API v1alpha2 a little bit easier.

Repo Setup

Run ./init.sh. This will clone some basic providers for you to try.

Install Tilt

https://docs.tilt.dev/install.html

The Tiltfile uses the target parameter which was introduced in v0.10.8. Please make sure your version of Tilt is up to date.

Get a kubernetes cluster

Use kind, set up a cluster on AWS, GCP, etc. Whatever works. This will be your management cluster.

AWS (recommended for os x)

Assuming your local environment is set up for AWS access, run:

run ./devenv/setup.sh.

This will create a single node kubernetes control plane to be used as the management cluster.

This will grab the kubeconfig and put it at ./devenv/dev-kubeconfig.

kind (recommended for linux)

Install kind

Run kind with the provided config kind create cluster --config ./devenv/kind/config.yaml

Set KUBECONFIG.

Update config.json

Make sure you update the values in config.json to point to your registry

{
  "default_registry": "gcr.io/<your project>",
  "default_core_image": "gcr.io/k8s-staging-cluster-api/cluster-api-controller"
}

Modify the Tiltfile

Set the infrastructure_provider in the Tiltfile Define the necessary locations of the provider and ensure the IMAGE is set correctly.

Using the AWS provider

Please note the Tiltfile assumes clusterawsadm is in the bin directory of the AWS provider repo cloned in the init.sh phase. Before running tilt up, make sure you have clusterawsadm in the relevant path. If you don't, run make clusterawsadm from the AWS provider repo or update the Tiltfile.

Run Tilt

run tilt up

Iterate

Now you can quickly iterate on Cluster API

About

A development repo for working on cluster api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 62.4%
  • Python 37.6%