Skip to content

Managing an OSD Cluster

Sam Barker edited this page Jun 8, 2022 · 3 revisions

Managing OSD clusters

Creating

Cluster definition:

{
  "display_name": "<NAME>",
  "ccs": {
    "enabled": true
  },
  "aws": {
    "access_key_id": "<ACCESS_KEY>",
    "secret_access_key": "<SECRET_KEY>",
    "account_id": "<ACCOUNT_ID>"
  },
  "managed": true,
  "multi_az": true,
  "name": "<NAME>",
  "nodes": {
    "compute": 6,
    "compute_machine_type": {
      "id": "m5.2xlarge"
    }
  },
  "region": {
    "id": "us-east-1"
  },
  "expiration_timestamp": "<NOW -> End of working week>",
  "api": {
    "listening": "external"
  }
}

Notes:

  • Naming cluster name is limited to 16 (?) characters, hence the additional of display name. The kafka-integrations team generally prefix resources with user names. e.g. sbarker-osd.
  • The expiry time stamp is an ISO 8601 timestamp at second precision. So when provisioning on a Monday morning I do
SOURCE_JSON=ocm/cluster.json \
DESTINATION_JSON=${SOURCE_JSON} \ 
jq ".expiration_timestamp = \"$(date --iso-8601=seconds -d '+5 days')\"" ${SOURCE_JSON} > "${tmp}" && mv ${tmp} ${DESTINATION_JSON}

Creating

There are many ways to provision a cluster as the process has evolved organically.

  • delorean from a delorean checkout run make ocm/cluster/create cluster.json needs be at ocm/cluster.json
  • ocm ocm post /api/clusters_mgmt/v1/clusters --body=cluster.json
  • osd-provision.sh osd-provision.sh -cluster-conf-file cluster.json

There is also ocm create cluster but that doesn't support json configuration.

hibernating

ocm hibernate cluster <CLUSTER_NAME|CLUSTER_ID>

Please remember to hibernate your own cluster when stopping work for a prolonged period, to avoid the cloud provider charges for idle instances while you're not using it.

resuming

ocm resume cluster <CLUSTER_NAME|CLUSTER_ID>

The strimzi & fleet shard operators often exhibit issues after the cluster is resumed. If you see issues after resuming, restart the the operator pods.