Skip to content

difli/mission-control-local-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Setup DataStax Mission Control on your local computer with Kind

This guide walks you through setting up DataStax Mission Control on a local Kubernetes cluster using Kind (Kubernetes in Docker) on macOS.

With this setup, you can explore, test, and demo Mission Control-managed Cassandra, DataStax Enterprise (DSE), and Hyperconverged Database (HCD) clusters directly on your local machine.


๐Ÿ“š Workshop Materials


Prerequisites

Ensure you have the following installed on your Mac:

  • Docker
    Configure sufficient resources for Docker. While it works with fewer resources, I allocated 30 GB RAM and 12 CPUs for optimal performanceโ€”if you have the resources, why not use them?
  • kubectl
  • Helm
  • Kind

1. Create a Kind Cluster

1.1 Define the Kind Cluster Configuration

Use the file kind.yaml with the following contents to create a local Kubernetes Kind cluster:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
  apiServerPort: 45451
nodes:
- role: control-plane
  image: kindest/node:v1.32.2
  labels:
    mission-control.datastax.com/role: platform
  extraPortMappings:
    - containerPort: 30880
      hostPort: 30880
      listenAddress: "0.0.0.0"
      protocol: tcp
    - containerPort: 30081
      hostPort: 30081
      listenAddress: "0.0.0.0"
      protocol: tcp
    - containerPort: 30001
      hostPort: 30001
      listenAddress: "0.0.0.0"
      protocol: tcp

- role: worker
  image: kindest/node:v1.32.2
  labels:
    mission-control.datastax.com/role: platform
- role: worker
  image: kindest/node:v1.32.2
  labels:
    mission-control.datastax.com/role: platform
- role: worker
  image: kindest/node:v1.32.2
  labels:
    mission-control.datastax.com/role: platform

1.2 Deploy the Kind Cluster

Run the following command to create the cluster:

kind create cluster --config kind.yaml

Verify that the cluster is running:

kubectl get nodes

2. Install Cert-Manager

Cert-Manager is required for issuing TLS certificates in the cluster.

2.1 Add the Jetstack Helm Repository

helm repo add jetstack https://charts.jetstack.io --force-update
helm repo update

2.2 Install Cert-Manager

helm install \
  cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --version v1.16.1 \
  --set crds.enabled=true

3. Install DataStax Mission Control

3.1 Install KOTS (Kubernetes Off-The-Shelf)

KOTS is required for managing Mission Control installations.

Run the following command to install KOTS:

curl https://kots.io/install | REPL_INSTALL_PATH=/DEFINE_YOUR_PATH bash

Verify that KOTS is installed:

kubectl kots version

3.2 Deploy Mission Control

kubectl kots install mission-control --namespace mission-control

or, install a specific version mission-control version

kubectl kots install mission-control --namespace mission-control --app-version-label=v1.9.0

3.3 Configure Mission Control

  1. Enter a password for the Admin Console when prompted.

  2. Open your browser and go to:
    ๐Ÿ”— http://localhost:8800

  3. Enter the password you created.

    KOTS Login

  4. Register for a community edition license at:
    ๐Ÿ”— DataStax Mission Control Download

  5. Upload your license file in the UI.

    KOTS License

  6. Click "Download Mission Control from the Internet."

    KOTS MC from Internet

  7. Review and confirm the configuration.

    KOTS MC Configuration

  8. Click "Continue" and then "Deploy."

  9. Preflight checks validate

    KOTS Preflight checks

  10. Click "Deploy."


4. Access the Mission Control Admin Console

If the port forwarding session stops, restart it using:

kubectl kots admin-console -n mission-control

4.1 Open in Browser

Once running, access Mission Control UI in your browser:

๐Ÿ”— https://localhost:30880/

Log in with the email address and password you created earlier.

MC Login


5. Create an HCD Cluster Using Mission Control UI

5.1 Create a Project

Click Create a Project. This creates a Kubernetes namespace where all clusters will be deployed.

MC Project

Check available namespaces:

kubectl get namespaces

Namespaces

5.2 Deploy a New Cluster

  1. Click "Create a New Cluster"
    MC Cluster Config
  2. Click "Expert Mode" to see the YAML configuration. MC Cluster Config Expert
  3. Click "Deploy"
  4. Select your cluster and monitor its creation. MC Cluster Creation Progress

5.3 Monitor Cluster Creation

Check progress using:

kubectl get pods -n demo-1wx3a235 -w

kubectl Cluster Creation Progress

Once the cluster is running, you can manage it via the Mission Control UI.

kubectl Cluster Creation Progress

5.4 Deploy Multiple Database Clusters

Find the YAML files:

By default, only one database node per Kubernetes worker node is allowed.
To deploy multiple nodes per worker node, enable softPodAntiAffinity and configure CPU & memory requests/limits:

softPodAntiAffinity: true
resources:
  requests:
    cpu: "1000m"
    memory: "2Gi"
  limits:
    cpu: "1000m"
    memory: "3Gi"

6. Troubleshooting

Check Pod Status

kubectl logs -n <NAMESPACE> <POD_NAME>

Example:

kubectl logs -n demo-1wx3a235 hcd-dc-1-0

Restart Port Forwarding

kubectl kots admin-console -n mission-control

Delete the Kind Cluster

If needed, delete the cluster:

kind delete cluster

If kind delete cluster is unresponsive, remove Docker containers manually:

docker rm -f $(docker ps -aq --filter "name=kind")
docker network rm kind

Conclusion

You have successfully set up DataStax Mission Control on macOS using Kind. ๐ŸŽ‰
You can now manage Cassandra clusters using the Mission Control UI.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors