Deploy Rok

At this point, you have configured everything and you are ready to install Rok. In this section we will guide you through deploying Rok. More specifically, you will create the Rok namespaces and then deploy Rok Operator, Rok kmod, external services, and RokCluster CR.

Choose one of the following options to deploy Rok:

Option 1: Deploy Rok Automatically (preferred)

In this section you will deploy Rok in an automated manner, using the rok-deploy CLI.

Procedure

Choose one of the following options, based on your cloud provider.

To deploy Rok, follow the on-screen instructions.

Once rok-deploy completes successfully, your Rok cluster will be up-and-running shortly.

You may now proceed to the Verify section.

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

Option 2: Deploy Rok Manually

If you want to deploy Rok manually, follow this section.

Procedure

Follow the next steps to deploy Rok and the necessary external services.

  1. Go inside your clone of the GitOps repo:

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

    root@rok-tools:~/ops/deployments# rok-deploy --apply rok/rok-namespaces/overlays/deploy
    
  3. Deploy the Rok Operator:

    root@rok-tools:~/ops/deployments# rok-deploy --apply rok/rok-operator/overlays/deploy
    
  4. Deploy Rok Disk Manager.

    1. Edit the kustomization manifest. Choose one of the following options, based on your cloud provider:

      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
      
    2. Commit changes:

      root@rok-tools:~/ops/deployments# git commit -am "Configure Rok Disk Manager"
      
    3. Apply the manifests:

      root@rok-tools:~/ops/deployments# rok-deploy --apply rok/rok-disk-manager/overlays/deploy
      
  5. Deploy Rok kmod:

    root@rok-tools:~/ops/deployments# rok-deploy --apply rok/rok-kmod/overlays/deploy
    
  6. Deploy Istio CRDs and resources in the istio-system namespace:

    root@rok-tools:~/ops/deployments# rok-deploy --apply install/istio
    
  7. Deploy etcd.

    1. Edit the kustomization manifest. Choose one of the following options, based on your cloud provider:

      Edit rok/rok-external-services/etcd/overlays/deploy/kustomization.yaml to use the eks overlay as base:

      bases:
      - ../eks
      

      Edit rok/rok-external-services/etcd/overlays/deploy/kustomization.yaml to use the aks overlay as base:

      bases:
      - ../aks
      
    2. Commit your changes:

      root@rok-tools:~/ops/deployments# git commit -am "Configure etcd for our cloud provider"
      
    3. Apply the manifests:

      root@rok-tools:~/ops/deployments# rok-deploy --apply rok/rok-external-services/etcd/overlays/deploy
      
  8. Deploy PostgreSQL.

    1. Edit the kustomization manifest. Choose one of the following options, based on your cloud provider:

      Edit rok/rok-external-services/postgresql/overlays/deploy/kustomization.yaml to set the eks overlay as base:

      bases:
      - ../eks
      

      Edit rok/rok-external-services/postgresql/overlays/deploy/kustomization.yaml to set the aks overlay as base:

      bases:
      - ../aks
      
    2. Commit your changes:

      root@rok-tools:~/ops/deployments# git commit -am "Configure PostgreSQL for our cloud provider"
      
    3. Apply the manifests:

      root@rok-tools:~/ops/deployments# rok-deploy --apply rok/rok-external-services/postgresql/overlays/deploy
      
  9. Deploy Redis.

    1. Edit the kustomization manifest. Choose one of the following options, based on your cloud provider:

      Edit rok/rok-external-services/redis/overlays/deploy/kustomization.yaml to set the eks overlay as base:

      bases:
      - ../eks
      

      Edit rok/rok-external-services/redis/overlays/deploy/kustomization.yaml to set the aks overlay as base:

      bases:
      - ../aks
      
    2. Commit your changes:

      root@rok-tools:~/ops/deployments# git commit -am "Configure Redis for our cloud provider"
      
    3. Apply the manifests:

      root@rok-tools:~/ops/deployments# rok-deploy --apply rok/rok-external-services/redis/overlays/deploy/kustomizat
      
  10. Deploy S3Proxy (Azure only):

    root@rok-tools:~/ops/deployments# rok-deploy --apply rok/rok-external-services/s3proxy/overlays/deploy
    
  11. Deploy Dex in the auth namespace:

    root@rok-tools:~/ops/deployments# rok-deploy --apply rok/rok-external-services/dex/overlays/deploy
    
  12. Deploy AuthService in the istio-system namespace:

    root@rok-tools:~/ops/deployments# rok-deploy --apply rok/rok-external-services/authservice/overlays/deploy
    
  13. Deploy the RokCluster CR:

    root@rok-tools:~/ops/deployments# rok-deploy --apply rok/rok-cluster/overlays/deploy
    

Verify

  1. Verify that the Rok cluster is up and running:

    root@rok-tools:/# kubectl get rokcluster -n rok rok
    NAME   VERSION                     HEALTH   TOTAL MEMBERS   READY MEMBERS   PHASE     AGE
    rok    v0.15-pre-1004-g7943b112f   OK       3               3               Running   2m4s
    
  2. View events related to the newly deployed Rok cluster:

    root@rok-tools:/# kubectl describe rokcluster -n rok rok
    

Important

If, for any reason, the cluster initialization failed, read the Rok Cleanup section to delete the existing Rok cluster along with its state. Then, you re-deploy Rok starting from step 5 (Deploy external services).

Summary

You have successfully deployed Rok on Kubernetes. You can consume Rok’s storage through the rok StorageClass, take instant snapshots of your applications, and restore applications to an earlier state. You can create a time machine for your applications and travel back in time!

What’s Next

The Next step is to set up Rok’s monitoring stack.