Skip to main content
Version: 2.0.7

Configure the Development Environment

This document describes how to configure a development environment for Chaos Mesh.

Configuration requirements

Before configuring, you need to install the development tools for Chaos Mesh.

Prepare the toolchain

After installing the above tools, follow the steps below to configure the toolchain for compiling Chaos Mesh.

  1. Clone the Chaos Mesh repository to your local server.

    git clone https://github.com/chaos-mesh/chaos-mesh.git
    cd chaos-mesh
  2. Make sure that Docker is installed and running in your environment.

  3. Make sure Docker Registry is running. Set the environment variable DOCKER_REGISTRY as the address of Docker Registry:

    echo 'export DOCKER_REGISTRY=localhost:5000' >> ~/.bash_profile
    source ~/.bash_profile
  4. Make sure ${GOPATH}/bin is in your PATH.

    echo 'export PATH=$(go env GOPATH)/bin:${PATH}' >> ~/.bash_profile
    source ~/.bash_profile
  5. Check the configuration environment related to Node.js.

     node -v
    yarn -v
  6. Compile Chaos Mesh:

    make

If no error occurs, you have successfully cnofigured the toolchain.

Prepare the environment for deployment

After configuring the toolchain, you need to launch a local Kubernetes cluster to deploy Chaos Mesh. Because kind is installed in the configuration requirements section, you can directly use the following command to launch a Kubernetes cluster:

hack/kind-cluster-build.sh

When you no longer need this cluster and want to delete it, you can use the following command:

kind delete cluster --name=kind

To start Chaos Dashboard, run the following command:

cd ui && yarn
# start
yarn start:default # cross-env REACT_APP_API_URL=http://localhost:2333 BROWSER=none react-scripts start

Learn more

After finishing the above preparation, you can try to Add a New Chaos Experiment type.