Upgrade Rok Registry¶
This section describes how to upgrade Rok Registry.
Fast Forward
If you have not deployed Rok Registry in your cluster, expand this box to fast-forward.
- Proceed to the What’s Next section.
Overview
What You’ll Need¶
- An upgraded management environment.
- An existing Kubernetes cluster.
- Your local clone of the Arrikto GitOps repository.
- Arrikto manifests for EKF version 2.0.2.
- An existing Rok Registry 1.5.3 deployment or later.
Procedure¶
Go to your GitOps repository, inside your
rok-tools
management environment:root@rok-tools:~# cd ~/ops/deploymentsUpgrade Rok Registry PostgreSQL:
Apply the latest Rok Registry PostgreSQL manifests:
root@rok-tools:~/ops/deployments# rok-deploy --apply \ > rok/rok-external-services/postgresql/overlays/registry/deployEnsure 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
Upgrade Rok Registry Operator:
Apply the latest Rok Operator manifests:
root@rok-tools:~/ops/deployments# rok-deploy --apply \ > rok/rok-operator/overlays/registry/deployNote
The above command also updates the
RokRegistryCluster
CRD.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
Edit the
rok/rok-registry-cluster/overlays/deploy/patches/rokregistrycluster-configure-social-provider.yaml
patch and ensure that there is aredirect_uri
entry under thespec.socialProviders.dex
field that looks like the following:spec: socialProviders: dex: ... redirect_uri: "/registry/oidc-callback/dex"Upgrade the Rok Registry cluster:
Apply the latest Rok Registry cluster manifests:
root@rok-tools:~/ops/deployments# rok-deploy --apply \ > rok/rok-registry-cluster/overlays/deployEnsure that Rok Registry cluster has been upgraded:
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 3mEnsure 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
Update Dex to accept a relative redirect URI:
Edit the
kubeflow/manifests/common/dex/overlays/deploy/patches/config-map.yaml
patch and replace theredirectURIs
field of theREGISTRY_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_SECRETApply the changes:
root@rok-tools:~/ops/deployments# rok-deploy --apply \ > kubeflow/manifests/common/dex/overlays/deployRestart Dex for the changes to take effect:
root@rok-tools:~/ops/deployments# kubectl delete pods -n auth -l app=dex
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¶
Go to your GitOps repository, inside your
rok-tools
management environment:root@rok-tools:~# cd ~/ops/deploymentsEnsure 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 1mEnsure 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 1mEnsure 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