Skip to main content

Install Cosmonic Control

Cosmonic Control makes it easy for enterprises to manage and observe distributed environments and applications with wasmCloud.

Access token required

Cosmonic Control is available for Cosmonic customers—you will need an organization access token from Cosmonic to follow these instructions. If you'd like to try Cosmonic Control, please book a demo with our team.

Requirements

Installation

Create a secret on your Kubernetes cluster:

kubectl create secret docker-registry registry-credential --docker-username cosmonic --docker-password <organization access token> --docker-server docker.io

Note: This secret must be in the namespace where you want to install the Cosmonic Control chart—if this is not the default, you will need to create your desired namespace prior to creating the secret.

Authenticate to the Docker Hub registry through Helm:

helm registry login -u cosmonic registry-1.docker.io

When prompted for a password, enter your organization access token provided by Cosmonic.

Once authenticated, you can install the chart from Docker Hub:

helm install cosmonic-control oci://registry-1.docker.io/cosmonic/cosmonic-control --version 0.1.0 --set cosmonic-nats.imagePullSecrets={"registry-credential"}

Helm will confirm a successful installation:

Pulled: registry-1.docker.io/cosmonic/cosmonic-control:0.1.0
Digest: sha256:<hash>
NAME: cosmonic-control
LAST DEPLOYED: <date>
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Congratulations! You have sucessfully installed Cosmonic Control!

!!!!!!!!!
IMPORTANT
!!!!!!!!!
In this release you *must* backup the cosmonic-nats-hierarchy-keys secret. This secret contains the keys used to bootstrap NATS authentication for your cluster. If you lose this secret, you will not have a backup of the secret keys and may need to re-bootstrap authentication for your cluster.

####################
Generated NATS users:
####################
wasmCloud Hosts:    secret/cosmonic-nats-wasmcloud-host
Secrets NATS KV:    secret/cosmonic-nats-secrets-nats-kv
wadm:               secret/cosmonic-nats-wadm
$SYS credentials:   secret/cosmonic-nats-sys

Declarative values configuration

The Cosmonic Control Helm chart uses the values.yaml file below.

global:
  nameOverride: ""
  fullnameOverride: ""

cosmonic-nats:
  enabled: true
  generatedSecretPrefix: "cosmonic-nats"
  nameOverride: "cosmonic-nats"
  fullnameOverride: "cosmonic-nats"
  imagePullSecrets: []

  headlessService:
    name: "cosmonic-nats-headless"

  service:
    name: "cosmonic-nats"
  # Configure the exposed service ports if needed, ex.
  # ports:
  #   monitor:
  #     enabled: true

  # Configure the NATS cluster
  #config:
  #  cluster:
  #    enabled: true
  #    replicas: 5
  #  leafnodes:
  #    enabled: true
  #  monitor:
  #    enabled: true
  #    port: 8222
  #  websocket:
  #    enabled: true
  #    port: 4223
  #  jetstream:
  #    enabled: true

cosmonic-cluster-observability:
  enabled: true

wadm:
  enabled: true
  wadm:
    name: wadm
    replicas: 1
    config:
      nats:
        server: "nats://cosmonic-nats-headless:4222"
        jetStreamDomain: "default"
        creds:
          secretName: "cosmonic-nats-wadm"
          key: "user.creds"
surveyor:
  enabled: true
  config:
    # This must match the {{ .Values.cosmonic-nats.headlessService.name }} value defined above
    servers: "nats://cosmonic-nats-headless:4222"
    credentials:
      secret:
        # This must match the {{ .Values.cosmonic-nats.generatedSecretPrefix }} value defined above
        name: "cosmonic-nats-sys"
        key: "user.creds"
 # Customize these if needed
 # See https://github.com/nats-io/k8s/blob/main/helm/charts/surveyor/values.yaml for available options.
 # image:
   #repository: natsio/nats-surveyor
   #tag: 0.7.1
   #pullPolicy: IfNotPresent
   #repository: docker.io

You can declaratively customize values and override the chart defaults as needed by running (from your working directory):

helm install cosmonic-control oci://registry-1.docker.io/cosmonic/cosmonic-control --version 0.1.0 -f values.yaml

Frequently asked questions

Can I install the chart with a Helm 3 version prior to v3.8.0?
In versions of Helm 3 prior to Helm v3.8.0, OCI support was an experimental feature. You can run export HELM_EXPERIMENTAL_OCI=1 to enable support, but some OCI functionality may perform differently. See the Helm documentation for more information.