Upgrade Rok Registry

This section describes how to upgrade Rok Registry.

Optional

This guide is optional. If you have not deployed Rok Registry in your cluster, proceed to the What’s Next section.

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. 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-develop-l0-release-2.1-pre-493-g657799a9c 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: develop-l0-release-2.1-pre-493-g657799a9c
  5. Delete old RBAC resources that have been renamed:

    1. Delete the old Role of the Rok Registry cluster:

      root@rok-tools:~/ops/deployments# kubectl delete --ignore-not-found \ > role -n rok-registry rok-registry-init role.rbac.authorization.k8s.io "rok-registry-init" deleted
    2. Delete the old RoleBinding of the Rok Registry cluster:

      root@rok-tools:~/ops/deployments# kubectl delete --ignore-not-found \ > rolebinding -n rok-registry rok-registry-init rolebinding.rbac.authorization.k8s.io "rok-registry-init" deleted
  6. Upgrade the rest of the Rok Registry installation components by applying the latest Rok Registry manifests:

    root@rok-tools:~/ops/deploymens# 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

Summary

You have successfully upgraded Rok Registry.

What’s Next

The next step is to test your upgraded deployment.