Simplifying the 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 from OpenShift Container Platform 3 as quickly and easily as possible.

Simplifying the migration from OpenShift 3 to OpenShift 4

In this article, we are primarily interested in the 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 will show you how to migrate to OpenShift 4 without any hassle.

You can learn more about the differences between the new version and the old one. here.

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

Appranix and Red Hat have worked hard to make it easy to migrate cluster resources from OpenShift 3 to OpenShift 4 with a custom service that runs on top of Appranix Site Reliability Automation for Kubernetes.

Appranix solution (it can be found in Red Hat Container Catalog) allows you to backup all OpenShift 3 clusters and restore them to OpenShift 4 in just a few clicks.

Simplifying the migration from OpenShift 3 to OpenShift 4

Benefits of migrating with Appranix for OpenShift 4

  • Fast start. Since the Appranix solution is built on SaaS principles, there is no need to set up any infrastructure and configure or use separate specialized migration solutions.
  • The scalability of Appranix makes it easy to migrate large clusters.
  • Automatic backup of complex OpenShift 3 cluster configurations with subsequent transfer to OpenShift 4 simplifies the migration process itself.
  • The ability to test how applications from an OpenShift 3 enterprise infrastructure behave on the OpenShift 4 platform in the AWS cloud.
  • Migration of RBAC access settings along with cluster resources.
  • Selective or full migration of all projects to new OpenShift 4 clusters.
  • Optional - the organization of several levels of fault tolerance for container applications with the appropriate subscription.

Simplifying the migration from OpenShift 3 to OpenShift 4

Multilayer resiliency for OpenShift applications

After migrating from version 3 to version 4 of OpenShift, the Appranix solution can be used to provide continuous application fault tolerance (Continuous App Resilience), in which three options are possible. Level 1 stability (Level 1 Resiliency) allows you to restore applications without changing the region and cloud provider. It can be used to rollback applications or recover from a local region-wide failure, such as when an application deployment fails, or in a situation where 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. In this case, you can keep the primary (primary) data infrastructure in the main region, but run applications in a different cluster in a different region. This option is useful when a cloud region or zone goes down, or applications need to be moved to another region due to a cyberattack. And finally Level 3 allows you to change not only the region, but also the cloud provider.

Simplifying the migration from OpenShift 3 to OpenShift 4

How Appranix SRA works
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 enable this functionality and increase the security of applications, it is enough to add just one line of code to the DevOps pipeline.
Cloud provider infrastructure services also face challenges, so being able to quickly switch to another provider is useful in avoiding dependency on a single service provider.

As shown in the picture below, application environment backups can be created in Appranix not only automatically at a specified frequency, but also on command from the continuous integration and CI / CD delivery pipeline. At the same time, the "time machine" provides:

  • GitHub-style incremental logging of namespaces and application environments.
  • Easy application rollback.
  • Versioning cloud and container configurations.
  • Automated data lifecycle management.
  • Automate the management of infrastructure as code (IaC).
  • Automated IaC state management.

Simplifying the migration from OpenShift 3 to OpenShift 4

With Appranix, you can provide full application layer protection and recovery for scenarios such as chaos engineering, disaster recovery, ransomware protection, and business continuity. We will not dwell on this in detail and will now look at 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. Set up OpenShift 3 and OpenShift 4 to auto-detect all components to be migrated.
  2. Create policies and set namespaces for migration.
  3. Restore all namespaces on OpenShift 4 in one click.

Simplifying the migration from OpenShift 3 to OpenShift 4

Configuring OpenShift 3 and 4 Clusters for Autodiscovery

Simplifying the migration from OpenShift 3 to OpenShift 4

Appranix thinks that you already have working OpenShift 3 and OpenShift 4 clusters. If there are no OpenShift 4 clusters yet, create them using Red Hat documentation on deploying OpenShift 4. Setting up the primary (primary) and target (target) clusters in Appranix is ​​the same and includes only a few steps.

Install Appranix Controller Agent to discover clusters

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

Simplifying the migration from OpenShift 3 to OpenShift 4

Migrating Large Distributed Applications
Now we will use an example to analyze how to easily transfer a distributed microservice SockShop application from OpenShift 3 to OpenShift 4 (link - a detailed description of this application and its microservice architecture). As seen from picture below, the SockShop architecture contains many components.

Simplifying the migration from OpenShift 3 to OpenShift 4

Appranix discovers all resources that need to be secured and migrated to OpenShift 4, including PoDs, deployments, services, and cluster configurations.

OpenShift 3 with SockShop running

Simplifying the migration from OpenShift 3 to OpenShift 4

Simplifying the migration from OpenShift 3 to OpenShift 4

Creating Protection Policies for Migration

Policies can be set flexibly depending on how the migration is to be performed. For example, based on several criteria or a backup once an hour.

Simplifying the migration from OpenShift 3 to OpenShift 4

Migrating Multiple OpenShift 3 Clusters Using Protection Plans

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

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

Simplifying the migration from OpenShift 3 to OpenShift 4

Migration to OpenShift 4 in one click

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

Simplifying the migration from OpenShift 3 to OpenShift 4

Simplifying the migration from OpenShift 3 to OpenShift 4

Checking applications after migrating to OpenShift 4

Log in to the OpenShift 4 cluster, update the projects, and check that all applications and namespaces are in order. Repeat the migration process for other namespaces by creating new Protection Plans or modifying existing ones.

Simplifying the migration from OpenShift 3 to OpenShift 4

Run migrated applications on OpenShift 4

After migrating applications using the Appranix restore procedure, it is important to remember to set up routes - they should point to OpenShift 4. You may want to do a test restore before fully migrating production from OpenShift 3. Once OpenShift 4 has several running applications in their respective namespaces, it will be necessary to migrate the rest of the applications using this process.

Once all namespaces have been migrated, you can secure all OpenShift clusters for continuous disaster recovery, ransomware protection, business continuity, or future migration, as Appranix Site Reliability Automation is automatically updated as new versions of OpenShift are released.

Simplifying the migration from OpenShift 3 to OpenShift 4

Total

OpenShift 4 is a big step forward, primarily due to the new immutable architecture and Operator-platform model for automating complex configurations of applications and platforms running in clustered environments. Appranix offers OpenShift users an easy and convenient way to migrate to OpenShift 4 with its cloud-based Site Reliability Platform disaster recovery solution.

The Appranix solution can be used directly from Red Hat Container Catalog.

Source: habr.com

Add a comment