Upgrade Rok Registry

This section describes how to upgrade Rok Registry.

What You’ll Need

Procedure

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

    root@rok-tools:~# cd ~/ops/deployments
  2. Upgrade Rok Registry PostgreSQL:

    1. Apply the latest Rok Registry PostgreSQL manifests:

      root@rok-tools:~/ops/deployments# rok-deploy --apply \ > rok/rok-external-services/postgresql/overlays/registry/deploy
    2. Ensure that Rok Registry PostgreSQL has become ready. Verify that field READY is 1/1 and field STATUS is Running:

      root@rok-tools:~/ops/deployments# watch kubectl get pods \ > -n rok-registry \ > -l app=postgresql Every 2.0s: kubectl get pods -n rok-registry -l app=postgresql rok-tools: Thu Jul 15 09:47:35 2021 NAME READY STATUS RESTARTS AGE rok-registry-postgresql-0 1/1 Running 0 1m
  3. Upgrade Rok Registry Operator:

    1. Apply the latest Rok Operator manifests:

      root@rok-tools:~/ops/deployments# rok-deploy --apply \ > rok/rok-operator/overlays/registry/deploy

      Note

      The above command also updates the RokRegistryCluster CRD.

    2. Ensure that Rok Operator has become ready. Verify that field READY is 1/1 and field STATUS is Running:

      root@rok-tools:~/ops/deployments# watch kubectl get pods \ > -n rok-registry-system \ > -l app=rok-registry-operator Every 2.0s: kubectl get pods -n rok-registry-system -l app=rok-operator rok-tools: Thu Nov 25 09:47:35 2021 NAME READY STATUS RESTARTS AGE rok-registry-operator-0 1/1 Running 0 1m
  4. Edit the rok/rok-registry-cluster/overlays/deploy/patches/rokregistrycluster-configure-social-provider.yaml patch and ensure that there is a redirect_uri entry under the spec.socialProviders.dex field that looks like the following:

    spec: socialProviders: dex: ... redirect_uri: "/registry/oidc-callback/dex"
  5. Upgrade the Rok Registry cluster:

    1. Apply the latest Rok Registry cluster manifests:

      root@rok-tools:~/ops/deployments# rok-deploy --apply \ > rok/rok-registry-cluster/overlays/deploy
    2. Ensure that Rok Registry cluster has been upgraded:

      1. Check the status of the cluster upgrade Job. Ensure that field COMPLETIONS is 1/1:

        root@rok-tools:~/ops/deployments# kubectl get job \ > -n rok-registry rok-registry-upgrade-release-2.0-l0-release-2.0.2 NAME COMPLETIONS DURATION AGE rok-registry-upgrade-... 1/1 45s 3m
      2. Ensure that Rok Registry is up and running after the upgrade Job finishes. Verify that field Health is OK and field Phase is Running:

        root@rok-tools:~/ops/deployments# kubectl describe rokregistrycluster \ > -n rok-registry rok-registry ... Status: Health: OK Phase: Running Ready Members: 2 Total Members: 2 Version: release-2.0-l0-release-2.0.2
  6. Update Dex to accept a relative redirect URI:

    1. Edit the kubeflow/manifests/common/dex/overlays/deploy/patches/config-map.yaml patch and replace the redirectURIs field of the REGISTRY_OIDC_CLIENT_ID entry, with the relative redirect URI /registry/oidc-callback/dex, so that the entry looks like the following:

      staticClients: ... - idEnv: REGISTRY_OIDC_CLIENT_ID redirectURIs: ["/registry/oidc-callback/dex"] # <-- Edit this line to point to the relative redirect URI "/registry/oidc-callback/dex" name: Fort secretEnv: REGISTRY_OIDC_CLIENT_SECRET
    2. Apply the changes:

      root@rok-tools:~/ops/deployments# rok-deploy --apply \ > kubeflow/manifests/common/dex/overlays/deploy
    3. Restart Dex for the changes to take effect:

      root@rok-tools:~/ops/deployments# kubectl delete pods -n auth -l app=dex
  7. Upgrade the rest of the Rok Registry installation components by applying the latest Rok Registry manifests:

    root@rok-tools:~/ops/deployments# rok-deploy --apply install/registry

Verify

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

    root@rok-tools:~# cd ~/ops/deployments
  2. Ensure that all Pods in the rok-registry-system namespace are up and running. Verify that field READY is 1/1 and field STATUS is Running for all Pods:

    root@rok-tools:~/ops/deployments# kubectl get pods -n rok-registry-system NAME READY STATUS RESTARTS AGE rok-registry-operator-0 1/1 Running 0 1m
  3. Ensure that all Pods in the Rok Registry namespace are up and running. Verify that field READY is N/N and field STATUS is Running for all Pods:

    root@rok-tools:~/ops/deployments# kubectl get pods -n rok-registry NAME READY STATUS RESTARTS AGE rok-registry-756589854-8jnxj 1/1 Running 0 1m rok-registry-etcd-0 1/1 Running 0 1m rok-registry-postgresql-0 1/1 Running 0 1m
  4. Ensure that Dex is up and running. Verify that field READY is 1/1:

    root@rok-tools:~/ops/deployments# kubectl get sts -n auth NAME READY AGE dex 1/1 1m

Summary

You have successfully upgraded Rok Registry.

What’s Next

The next step is to upgrade the Cluster Autoscaler.