Simplify migration from OpenShift 3 to OpenShift 4

So, the official launch of the Red Hat OpenShift 4 platform took place. Today we will tell you how to switch to it with the OpenShift Container Platform 3 as quickly and simply as possible.

In the framework of this article, we are primarily interested in new OpenShift 4 clusters that use the capabilities of a smart and immutable (immutable - the same for all deployment environments) infrastructure based on RHEL CoreOS and automation tools. Below we show how to upgrade to OpenShift 4 without too much trouble.

Learn more about the differences between the new version and the old one here .

Cluster migration from OpenShift 3 to OpenShift 4 using the certified Red Hat Appranix platform

Appranix and Red Hat have worked hard to streamline the migration of cluster resources from OpenShift 3 to OpenShift 4 using a special service running on top of the Appranix Site Reliability Automation for Kubernetes.

Appranix solution (found in the Red Hat Container Catalog ) allows you to create backups of all OpenShift 3 clusters and restore them to OpenShift 4 in just a few clicks.

Why migration using Appranix for OpenShift 4 is good

Resiliency for OpenShift Applications

After migrating from 3rd to 4th version of OpenShift, Appranix can be used to provide Continuous App Resilience, in which there are three options. Level 1 Resiliency allows you to restore applications without changing the region and cloud provider. It can be used to roll back applications or recover after a local failure at the regional level, for example, in the case of an unsuccessful application deployment, or in a situation in which you need to quickly create a test environment in the same region, but in a separate OpenShift cluster.

Level 2 allows you to transfer applications to another region without changing the provider. At the same time, you can save the primary data infrastructure in the main region, but run applications in another cluster in a different region. This option is useful when a cloud region or zone fails, or you need to transfer applications to another region due to a cyber attack. And finally, Level 3 allows you to change not only the region, but also the cloud provider.

How Appranix SRA Works
The multi-level fault tolerance of OpenShift applications in Appranix is ​​achieved through the functionality of the “time machine”, which automatically creates copies of the application environment. To use this functionality and increase application security, just add one line of code to the DevOps pipeline.
The infrastructure services of cloud providers also have problems, so the ability to quickly switch to another provider is useful in order to avoid dependence on a single service provider.

As shown in the figure below , backups of the application environment can be created in Appranix not only automatically at specified intervals, but also by command from the pipeline of continuous integration and CI / CD delivery. Moreover, the "time machine" provides:

With Appranix, you can organize application-level protection and recovery entirely for scenarios such as chaos engineering, disaster recovery, extortion protection, and business continuity. We will not dwell on this in detail and further consider how to use Appranix to migrate from OpenShift 3 to OpenShift 4.

How to migrate OpenShift 3 to OpenShift 4 using the Appranix Site Reliability Platform

The process includes three steps:

  1. We configure OpenShift 3 and OpenShift 4 to automatically detect all components to be migrated.
  2. Create policies and set namespaces for migration.
  3. Restore all namespaces on OpenShift 4 in one click.

Configure OpenShift 3 and 4 Clusters for Autodiscover

Appranix believes that you already have OpenShift 3 and OpenShift 4 clusters running. If you don't have OpenShift 4 clusters yet, create them using the Red Hat documentation on deploying OpenShift 4 . Setting up the primary and target clusters in Appranix is ​​the same and involves just a few steps.

Install the Appranix Controller Agent for cluster detection

To detect cluster resources, you need a small sidecar controller agent. To deploy it, just copy and paste the appropriate curl command, as shown below . After the agent is installed in OpenShift 3 and OpenShift 4, Appranix will automatically detect all cluster resources to be migrated, including namespaces, deployments, pods, services, as well as hosts with other resources.

Migrating Large Distributed Applications
Now we’ll look at an example of how to transfer a distributed microservice SockShop application from OpenShift 3 to OpenShift 4 without undue effort (click here for a detailed description of this application and its microservice architecture ). As you can see from the figure below , the SockShop architecture contains many components.

Appranix discovers all the resources for which it is necessary to provide protection and migration to OpenShift 4, including PoDs, deployments, services and cluster configurations.

OpenShift 3 with a running SockShop app

Create Protection Policies for Migration

Policies can be set flexibly depending on how the migration should be conducted. For example, based on several criteria or backup once an hour.

Migrate multiple OpenShift 3 clusters using Protection Plans

Depending on the features of the application or namespace, policies can be applied to OpenShift 3 clusters that are executed once per hour, once a week, or even once a month.

Appranix allows you to migrate all cluster namespaces to OpenShift 4, or only selected spaces.

Migrate to OpenShift 4 in one click

Migration is the restoration of selected namespaces to the target OpenShift 4 cluster. This operation is performed in one click. Appranix itself does all the work of collecting configuration data and resources of the source environment and then restores it on the OpenShift 4 platform on its own.

Checking applications after migration to OpenShift 4

Log in to the OpenShift 4 cluster, upgrade projects, and verify that all applications and namespaces are in order. Repeat the migration procedure for other namespaces, creating new Protection Plans or changing existing ones.

Launch migrated applications on OpenShift 4

After migrating applications using the Appranix recovery procedure, it is important not to forget to configure the routes - they must indicate OpenShift 4. It is possible that before transferring production completely from OpenShift 3, you will want to conduct a test recovery. When several running applications appear in OpenShift 4 in their respective namespaces, it becomes necessary to migrate other applications using this process.

After migrating all namespaces, you can protect all OpenShift clusters for continuous disaster recovery, protection from extortion, ensuring business continuity, or for subsequent migration, as Appranix Site Reliability Automation automatically updates as new versions of OpenShift are released.


OpenShift 4 is a big step forward, primarily due to the new unchanged architecture and Operator-platform model for automating complex configurations of applications and platforms operating in cluster environments. Appranix offers OpenShift users a simple and convenient way to upgrade to OpenShift 4 with their cloud-based disaster recovery solution Site Reliability Platform.

Appranix can be used directly from the Red Hat Container Catalog .


All Articles