Working With DMS

The DMS solution does not include any Quality of Service (QoS) mechanisms by default. Running DMS - whether as a single instance or across multiple instances - can impact the overall performance of the Lightbits cluster. This potential impact should be carefully evaluated and taken into consideration when deciding to apply the DMS solution.

Logging Into the DMS Service

The following command will connect to the DMS service running on base-url:

Bash
Copy

The username and password must be configured correctly in: /etc/dms/.htpasswd. These are typically configured at the time of installation.

This will return you a JWT that you can use to access /api/v1/ on DMS service.

The result of this command will sign you into the DMS service and will update the ~/.local/dms/dms-cli.yaml file with a valid idToken to be consumed by the DMS API. example file:

Bash
Copy

Attaching/Detaching Lightbits Clusters

Once the DMS service is running and a DMS client is configured to consume it, you can attach the Lightbits clusters to the DMS service.

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

Attaching a Lightbits Cluster

Attaching a Lightbits cluster is a three-step procedure.

Step 1: Retrieve the DMS service credentials.

Bash
Copy

Output Example:

Bash
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 DMS service to interact with the cluster you want to use, we now want to upload the publicKey/credentials to the Lightbits cluster:

pubKey and pubKeyId are taken from Retrieve DMS service credentials response.

  1. Save the decoded DMS pubKey to a file, and upload them to the Lightbits server:
Bash
Copy
  1. Run the lbcli create credential command on the Lightbits server. The pubKeyId, specified in the filename from the previous step, will be used here as the id of the credential. SSH to the Lightbits server that the credentials were uploaded to, and execute the following (note that this requires system-admin privileges):
Bash
Copy

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

Step 3: Invoke the attach cluster operation.

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 DMS service side, would be adding a cluster entry to the /etc/dms/clusters.yamlfile.

A cluster entry would only be added on a successful execution of complete workflow.

Bash
Copy

Listing a Lightbits Cluster

Run the following command to list the attached clusters:

Bash
Copy

Detaching a Lightbits Cluster

Detaching a cluster can be done by specifying its ID.

Run the following command to detach a cluster:

Bash
Copy

Thick-Clone Commands

  • Cluster ID can be retrieved by running the dmsci list clusters command.
  • The size and replica-count variables are optional. If they are not provided, the src snapshot values will be used.

Thick-Clone Volume

Use this to generate a thick-cloned volume in a different project.

This operation will copy all of the data from a snapshot to a newly created volume. src parameters identify the source snapshot to copy from, and dst parameters specify attributes of the new volume. dst name/project/cluster parameters are mandatory to uniquely identify parameters. All other parameters' size/replica-count can either be optionally specified or inherited from the source snapshot.

Bash
Copy

Thick-Clone Snapshot

Use this to generate a thick-cloned snapshot in a different project.

This operation will copy all the data from a snapshot to a newly created snapshot. src parameters identify the source snapshot to copy from, and dst parameters specify attributes of the new snapshot. dst name/project/cluster parameters are mandatory to uniquely identify parameters. All other parameters' size/replica-count can either be optionally specified or inherited from the source snapshot.

Bash
Copy

Inspecting a Workflow State

A DMS operation is called a workflow. DMS operations can be long-running, so to best track the state, status, and progress of both running and completed workflows, Lightbits' DMS exposes list and get workflow APIs.

List All Workflows

Bash
Copy

By default, the page-size is set to 100, so a list workflows command will fetch the latest 100 workflows. To fetch a more limited list or a larger number of items in the list (the max is limited to 250), you should add the page-size flag. To fetch the next items in the list, you should add the next-page flag.

Get a Workflow By ID

Bash
Copy

Cancel a Workflow By ID

Some workflows could have an extended execution time. The DMS service provides support for a canceling a specified workflow.

The cancel operation executes compensation (rollback) steps as needed, cleaning up any resource that was created by this operation.

Bash
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard