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.
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.1-pre-493-g657799a9c.
- An existing Rok Registry 2.0.1 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
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-develop-l0-release-2.1-pre-493-g657799a9c 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: develop-l0-release-2.1-pre-493-g657799a9c
Delete old RBAC resources that have been renamed:
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" deletedDelete 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
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¶
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 1m