Configure Default Rok Registry URL

This guide will walk you through configuring the default Rok Registry URL. This is the URL that the Rok UI will be suggesting when you are publishing a bucket or subscribing to one.

What You’ll Need

Procedure

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

    root@rok-tools:/# cd ~/ops/deployments
  2. Specify the URL that will act as the default Rok Registry URL:

    root@rok-tools:~/ops/deployments# export ROK_REGISTRY_URL=<URL>

    Replace <URL> with the new Rok Registry URL, for example:

    root@rok-tools:~/ops/deployments# export ROK_REGISTRY_URL=https://arrikto-cluster.apps.example.com/registry
  3. Render the patch template:

    root@rok-tools:~/ops/deployments# j2 \ > rok/rok-cluster/overlays/deploy/patches/rok-registry-url-configvars.yaml.j2 \ > -o rok/rok-cluster/overlays/deploy/patches/rok-registry-url-configvars.yaml
  4. Edit rok/rok-cluster/overlays/deploy/kustomization.yaml and uncomment the patches/rok-ui-configvars.yaml patch:

    ... # Apply patches patches: - path: patches/storage.yaml - path: patches/configvars.yaml - path: patches/image-pull-secrets.yaml #- path: patches/kf-configvars.yaml - path: patches/rok-registry-url-configvars.yaml # <-- Uncomment this line.
  5. Commit your changes:

    root@rok-tools:~/ops/deployments# git commit \ > -am "Configure Default Rok Registry URL"
  6. 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?}/release-1.5/sync-url \ > -m "Configure Default Rok Registry URL"
  7. Reapply the Rok Cluster deploy overlay:

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

Verify

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

    root@rok-tools:~# cd ~/ops/deployments
  2. Choose one of the following options, based on your cloud provider.

    Restore the required context from previous sections.

    root@rok-tools:~/ops/deployments# source deploy/env.cloudidentity
    root@rok-tools:~/ops/deployments# export ROK_CLUSTER_NAMESPACE

    Set the namespace in which you deployed Rok:

    root@rok-tools:~/ops/deployments# export ROK_CLUSTER_NAMESPACE=rok

    Set the namespace in which you deployed Rok:

    root@rok-tools:~/ops/deployments# export ROK_CLUSTER_NAMESPACE=rok
  3. Verify that the Rok UI shows the updated Rok Registry URL:

    root@rok-tools:~/ops/deployments# kubectl get rokcluster \ > -n ${ROK_CLUSTER_NAMESPACE?} \ > -o yaml \ > | grep "gw.ui.default_registry_url: ${ROK_REGISTRY_URL?}" \ > -o \ > && echo OK || echo FAIL gw.ui.default_registry_url: https://arrikto-cluster.apps.example.com/registry OK
  4. Switch to the EKF dashboard and refresh it.

  5. Select Snapshots from the left-side menu.

    ../../_images/menu-snapshots1.png
  6. Select Publish on any bucket.

    ../../_images/rok-publish.png
  7. Verify that you see the updated URL.

    ../../_images/rok-publish-dialog.png

Summary

You have successfully configured the default Rok Registry URL.

What’s Next

The next step is to make your Rok sync daemon accessible from other Rok clusters and registries.