cfcli attach cluster

Attaches a new Lightbits storage cluster to the CF system.

Synopsis

Bash
Copy

Once the CF service is running and a CF client is configured to work with it, you can attach the Lightbits clusters to the CF service.

The CF service can manage multiple Lightbits clusters. A cluster attach operation will update the CF service with the Lightbits cluster's information.

Attaching a Lightbits cluster is a three-step procedure:

  1. Retrieve the CF service credentials.
  2. Update these credentials on the Lightbits cluster.
  3. Invoke the attach cluster operation on the CF service.

Step 1: Retrieve the CF service credentials.

The information from this step will be needed in the next step. Run the following command on the CF host:

Bash
Copy

Output Example:

JSON
Copy

The information in this file will be needed in the next step.

Step 2: Update the credentials on a Lightbits cluster.

To authorize the CF service to interact with the Lightbits cluster you want to use, you will need to upload the publicKey/credentials to the Lightbits cluster.

Upload the CF-decoded public key to the Lightbits server. Using the pubkey file path from the previous step (~/.local/cluster-federation/<pubKeyId>.pem), upload this file to the Lightbits server:

Bash
Copy

Run the lbcli create credential command on the Lightbits server. The pubKeyId (specified in the file name from the previous step) will be used here as the id of the credential. SSH to the Lightbits server and execute the following (requires system-admin privileges):

Bash
Copy

Once the credentials have been added, the CF service that generated the credentials is authorized to operate with this Lightbits cluster.

Step 3: Invoke the attach cluster operation.

You can attach a Lightbits cluster using any of the Cluster's API endpoints.

It is mandatory to have a healthy connection between the CF host and the specified Lightbits API endpoint. Otherwise the attach operation will fail.

To attach a Lightbits cluster, run the following command on the CF service:

Bash
Copy

The output for this action will be a workflowId, describing the attach-cluster workflow state, enabling monitoring of the attach operation. The result of this action on the CF service side would be adding a cluster entry to the /etc/cf/clusters.yaml file.

Example:

YAML
Copy
FlagShortTypeDefaultDescription
--help-hboolHelp for cluster.
--api-endpointboolAPI endpoint to connect to in the form of <ip/host>:<port>.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard