Skip to content

Install DCE Community on macOS computers via Docker and kind

This page explains how to create a single-node kind cluster using a macOS laptop, and then install DCE Community online.

Tip

This is a simplified installation experience step for beginners, macOS is rarely used in actual production, The original author is panpan0000.

Hardware environment

Confirm that the performance and resources of the MacBook meet the requirements. The minimum configuration is:

  • CPU: 8 cores
  • Memory: 16G
  • Free disk space: more than 20G

Install and tune Docker

Depending on your MacBook's chip (Intel or M1), install Docker Desktop.

Adjust the upper limit of container resources:

  1. Start Docker.
  2. Click ⚙️ in the upper right corner to open the Settings page.
  3. Click Resources on the left, adjust the resource limit of the startup container to 8C14G, and click the Apply & Restart button.

Adjust resources

install kind

According to the actual computer situation, choose one of the following to install kind. If you encounter other problems, please refer to kind official installation instructions.

[ $(uname -m) = x86_64 ]&& curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.17.0/kind-darwin-amd64
[ $(uname -m) = arm64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.17.0/kind-darwin-arm64
chmod +x ./kind
sudo mv kind /usr/local/bin/kind

Install Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

install kind

brew install kind

Finally, run the following command to confirm that kind is successfully installed:

kind version

Create kind configuration file

Expose port 32088 in the cluster to port 8888 external to kind (can be modified by yourself):

cat > kind_cluster.yaml << EOF
apiVersion: kind.x-k8s.io/v1alpha4
kind: Cluster
nodes:
- role: control-plane
   extraPortMappings:
   - containerPort: 32088
     hostPort: 8888
EOF

kind Create a K8s cluster

Taking K8s version 1.25.3 as an example, run the following command to create a K8s cluster:

kind create cluster --image docker.m.daocloud.io/kindest/node:v1.25.3 --name=fire-kind-cluster --config=kind_cluster.yaml

Confirm that the kind cluster is successfully created:

docker exec -it fire-kind-cluster-control-plane kubectl get no

Expected output:

NAME STATUS ROLES AGE VERSION
fire-kind-cluster-control-plane Ready control-plane 18h v1.25.3

Install DCE Community

  1. Install dependencies

    cat <<EOF | docker exec -i fire-kind-cluster-control-plane bash
    curl -LO https://proxy-qiniu-download-public.daocloud.io/DaoCloud_Enterprise/dce5/install_prerequisite.sh
    bash install_prerequisite.sh online community
    apt-get update && apt-get install -y wget
    EOF
    
  2. Download the dce5-installer binary

    docker exec -it fire-kind-cluster-control-plane /bin/bash
    

    Assume VERSION=v0.5.0

    export VERSION=v0.5.0;
    curl -Lo ./dce5-installer https://proxy-qiniu-download-public.daocloud.io/DaoCloud_Enterprise/dce5/dce5-installer-$VERSION
    chmod +x ./dce5-installer
    exit
    
  3. Install DCE Community

    1. Get the local IP first

      myIP=$(ip r get 1.1.1.1| awk '{print $NF}')
      

      If the error zsh: command not found: ip is reported, there are 2 solutions:

      • Run myIP=$(ifconfig en0| grep "inet[ ]" | awk '{print $2}')
      • Or install iproute2mac with a command like brew install iproute2mac and try again.
    2. Start the installation, it will take about 30 minutes, depending on the network speed of the image pull

      docker exec -it fire-kind-cluster-control-plane bash -c "./dce5-installer install-app -z -k $myIP:8888"
      
  4. During the installation process, you can open another terminal window and run the following command to observe the pod startup.

    docker exec -it fire-kind-cluster-control-plane kubectl get po -A -w
    

    When you see the following prompt, it means the installation of DCE Community is successful.

    success

  5. After entering the default user and password (admin/changeme) to log in, the system will prompt Request License Key.

Experience using

After applying for a license, you will enter the main interface of DCE 5.0, displaying information such as currently installed components, clusters/nodes/resources, and alerts.

You can try:

uninstall

  1. Uninstall DCE Community.
  2. Delete the kind cluster.

    kind delete cluster --name=fire-kind-cluster
    
  3. Uninstall kind itself.

    rm -f $(which kind)
    
  4. Uninstall Docker in the application list.

At this point your MacBook is back to its original state 😄

Comments