Deploy Rok Disk Manager

This section will guide you through deploying Rok Disk Manager (RDM).

Choose one of the following options to deploy Rok:

What You’ll Need

Option 1: Deploy Rok Disk Manager Automatically (preferred)

Choose one of the following options, based on your platform.

Deploy Rok Disk Manager by following the on-screen instructions on the rok-deploy user interface.

If rok-deploy is not already running, start it with:

root@rok-tools:~# rok-deploy --run-from rdm
../../../_images/rdm.png

Proceed to the Summary section.

Rok does not currently support automatic deployment on Azure Cloud. Please follow the instructions in the Option 2: Deploy Rok Disk Manager Manually section to deploy Rok manually.
Rok does not currently support automatic deployment on Google Cloud. Please follow the instructions in the Option 2: Deploy Rok Disk Manager Manually section to deploy Rok manually.
Rok does not currently support automatic deployment on premises. Please follow the instructions in the Option 2: Deploy Rok Disk Manager Manually section to deploy Rok manually.

Option 2: Deploy Rok Disk Manager Manually

If you want to deploy Rok Disk Manager manually, follow the instructions below.

Procedure

  1. Go to your GitOps repository, inside your rok-tools management environment:

    root@rok-tools:~# cd ~/ops/deployments
  2. Create the Rok namespaces, rok and rok-system, that will host Rok and its system components:

    root@rok-tools:~/ops/deployments# rok-deploy --apply rok/rok-namespaces/overlays/deploy
  3. Edit the kustomization manifest. Choose one of the following options, based on your platform:

    Edit rok/rok-disk-manager/overlays/deploy/kustomization.yaml to use the eks overlay as base:

    bases: - ../eks

    Edit rok/rok-disk-manager/overlays/deploy/kustomization.yaml to use the aks overlay as base:

    bases: - ../aks

    Edit rok/rok-disk-manager/overlays/deploy/kustomization.yaml to use the gke overlay as base:

    bases: - ../gke
    1. Specify the disk-script to use. Choose one of the following options based on which disks you want to use for Rok.

      Follow these steps if you know the IDs of the available disks:

      1. Edit rok/rok-disk-manager/overlays/on-prem/disks and specify all available devices across all nodes. Use one by-id persistent name per line, for example:

        /dev/disk/by-id/nvme-SAMSUNG_MZ1LB1T9HALS-00007_S436NA0N305221 /dev/disk/by-id/scsi-3600605b00a317e701f33cf1c30ff82c5

        Note

        You can also use globs, for example /dev/disk/by-id/nvme-SAMSUNG*.

      2. Store the list in an env var:

        root@rok-tools:~/ops/deployments# export ROK_DISKS=$(xargs < rok/rok-disk-manager/overlays/on-prem/disks)
      3. Render the disk-script template to use your disks:

        rook@rok-tools:~/ops/deployments# rok-j2 \ > rok/rok-disk-manager/overlays/on-prem/patches/configmap.yaml.j2 \ > -o rok/rok-disk-manager/overlays/on-prem/patches/configmap.yaml
      4. Optional

        Edit rok/rok-disk-manager/overlays/on-prem/patches/configmap.yaml to set the LV sizes for Rok and Local Path Provisioner based on your needs.

      This section is a work in progress.

    2. Edit rok/rok-disk-manager/overlays/deploy/kustomization.yaml to use the on-prem overlay as base:

      bases: - ../on-prem
  4. Save your state:

    root@rok-tools:~/ops/deployments# rok-j2 deploy/env.rdm.j2 -o deploy/env.rdm
  5. Commit your changes:

    root@rok-tools:~/ops/deployments# git commit -am "Deploy Rok Disk Manager"
  6. Deploy RDM:

    root@rok-tools:~/ops/deployments# rok-deploy \ > --apply rok/rok-disk-manager/overlays/deploy
  7. Mark your progress:

    root@rok-tools:~/ops/deployments# export DATE=$(date -u "+%Y-%m-%dT%H.%M.%SZ")
    root@rok-tools:~/ops/deployments# git tag \ > -a deploy/${DATE?}/develop/rdm \ > -m "Deploy Rok Disk Manager"

Verify

  1. From inside your management environment, verify that the Rok Disk Manager Pods are up-and-running. Check the Pod status and verify that field STATUS is Running and field READY is 1/1 for all Pods:

    root@rok-tools:~# kubectl -n rok-system get pods NAME READY STATUS RESTARTS AGE rok-disk-manager-tmwqz 1/1 Running 0 1m rok-disk-manager-c4w7n 1/1 Running 0 1m

    Note

    The number of Pods you are seeing in the above output should be equal with the number of nodes you have in your cluster.

Summary

You have successfully deployed Rok Disk Manager.

What’s Next

The next step is to configure persistent storage.