Read about our partnership with Cohesity

How to Easily Migrate Your OpenShift Apps to the Public Cloud

Author

Table of Contents

In this blog post, you are going to learn what the OpenShift Hybrid cloud approach is, and how to make migrations (also known as application mobility) easy.

I will show you how to migrate an application in Trilio’s console, and if you are really enjoy working with Ansible, you’ll find great insights to automate the whole process, even a video demonstrating a migration of a Minecraft Helm-based app from ROSA to ARO!

Please enjoy!

Hybrid Cloud Deployment with OpenShift

As more and more businesses embrace cloud computing, the hybrid cloud has become a solution that combines the best of private and public clouds. 

What exactly is a hybrid cloud? Simply put, it’s an environment that brings together on premises infrastructure with one or more public cloud providers. By bridging these two environments, businesses gain flexibility and agility in their IT operations.

With hybrid cloud deployments organizations can enjoy the scalability and cost effectiveness of the public cloud while retaining control over sensitive data and applications in their private cloud.

When it comes to deploying applications in a cloud environment, Red Hat OpenShift (RHOCP) stands out as an efficient platform. Red Hat® OpenShift® is a unified platform to build, modernize, and deploy applications at scale.

A logo of Redhat Openshift logo with a black background.

 

One of the advantages of using Red Hat OpenShift (RHOCP) for hybrid cloud deployment is its ability to leverage Kubernetes orchestration. Kubernetes is an open source platform that orchestrates containers making it easier to deploy, scale and manage applications automatically. With OpenShift’s Kubernetes based architecture combined with Trilio for Kubernetes, and Trilio’s native integration with Red Hat Advanced Cluster Manager, businesses can effectively expand their applications within a cloud setup.

This comprehensive approach does not only simplify the management of applications but also enhances data protection and backup capabilities contributing to a stronger hybrid cloud strategy.

Moreover, OpenShift equips organizations with tools and capabilities to effectively oversee their cloud deployments. It provides an interface for administrators and end users to monitor and control applications across cloud environments ensuring seamless integration and robust security.

Additionally, OpenShift empowers organizations to develop applications. By embracing practices and utilizing OpenShifts features like S2I, and microservices architecture businesses can expedite their application development and delivery process.

To sum up, deploying in a cloud environment using OpenShift offers organizations the flexibility and scalability required to thrive in today’s cloud world. With OpenShift, businesses can effortlessly deploy applications across cloud environments while leveraging the advantages offered by both public and private clouds.

Developing a Cloud Strategy with OpenShift Across Multiple Providers

Ensuring flexibility and resilience in the cloud requires an approach to your strategy. Embracing a cloud strategy, which involves deploying applications across multiple cloud providers can offer several benefits. These include avoiding dependency on a provider, optimizing expenses and mitigating risks. With OpenShift, implementing your cloud strategy becomes effortless allowing you to unleash the full potential of your applications.

Defining and Exploring the Advantages of a Multi Cloud Strategy

A cloud strategy entails distributing workloads of applications across various cloud providers instead of relying solely on one. This approach empowers organizations to leverage the strengths and features offered by cloud platforms resulting in enhanced reliability, scalability and performance.

One significant advantage of adopting a hybrid cloud strategy is steering clear from vendor lock in. By not being tied down to one provider, you gain flexibility in selecting services and pricing options that best suit your needs. Furthermore, this approach mitigates the risk of service interruptions or outages since your applications can seamlessly transition between cloud providers when necessary.

Additionally, embracing a cloud strategy allows you to optimize costs by capitalizing on diverse pricing models and discounts offered by various cloud providers.It also gives you the ability to deploy applications closer to your end users, which reduces delays and enhances their experience.

How OpenShift facilitates application deployment across cloud providers

OpenShift is a container platform that empowers organizations to effortlessly build, deploy and manage applications across diverse cloud providers. It offers the flexibility to deploy and manage your applications across clouds using a unified set of tools and processes.

With OpenShift you can define your application once. Then easily deploy it across cloud environments like Google Cloud Platform, Amazon Web Services, Microsoft Azure and more. This allows you to leverage the features and capabilities from each provider tailoring a solution that perfectly fits your needs.

OpenShift simplifies multi cloud deployment management through its control plane. It provides a dashboard that offers a view of your applications regardless of the underlying cloud provider they are hosted on. This streamlines monitoring, scaling and troubleshooting tasks for your cloud infrastructure.

In addition, OpenShift seamlessly integrates with Kubernetes orchestration ensuring that your applications achieve scalability and resilience levels. It automatically adjusts your application instances based on demand patterns, while optimizing resource utilization, in the cloud environment.

This integration along with Trilio designed for Kubernetes not only improves scalability and resilience but also strengthens data protection and backup capabilities. This comprehensive approach allows for management of applications, in a dynamic cloud environment.

In summary, utilizing OpenShift empowers you to develop an adaptable cloud strategy. It allows you to leverage the benefits offered by cloud providers while simplifying administration and ensuring the scalability and resilience of your applications. Embrace OpenShift to elevate your cloud deployment experience.

Application Mobility in OpenShift

If you run containerized apps in OpenShift, you know that Red Hat makes building and managing Kubernetes applications simpler. That’s the case, no matter where you deploy those applications—on-prem, in the public or hybrid cloud, or at the edge.

But regardless of your infrastructure, there might be times when you need more availability, want to switch your cloud, or are looking for operational help via a managed service. There’s just one problem: Migrating your OpenShift applications across cloud infrastructure isn’t easy.

Thankfully, you have options. Below, we break down the challenges of moving cloud-native applications, how Trilio makes this process seamless, and an example that shows just how easy OpenShift migration can be.

OpenShift Migration Challenges Across the Cloud

While the benefits of running applications in the cloud are vast, there are still challenges with things like security, observability, and compliance. Another challenge? The ability to migrate across clouds.

For example, you might decide to switch from OpenShift on-prem to a public cloud to take advantage of on-demand elasticity. Depending on how you deploy your apps, this process can cost you time, money, and performance. If done incorrectly, it could even result in downtime or data loss.

Here’s how:

    •  Time: Moving your OpenShift apps to different infrastructures can be time-consuming, especially if you’re unable to move all of their components. If you can’t migrate your application metadata and other associated objects, you’ll lose data or have to manually reconstruct your application in your new environment.

    •  Cost: If you’re currently running your OpenShift apps on the cloud, beware of the cost of switching clouds. Cloud providers don’t make it cheap to swap, introducing the dreaded vendor lock-in.

    •  Performance: Your apps might not work the same in one cloud vs. another or on-prem vs. a public cloud, requiring you to re-architect them. That can result in performance issues ranging from speed to availability.

While the cloud migration process is tricky, it’s not impossible. It just requires you to have the right tools in place. But what are they?

Cloud-Native Migration for OpenShift Apps

With the rise of cloud-native applications, there’s also been a rise of platforms that help solve the challenges of the cloud. These solutions make it easy to migrate entire workloads across the infrastructure with ease and speed, reducing the costly implications on your business.

Looking to move your OpenShift applications across the cloud? Here are some things you need in a solution.

  • Comprehensive protection: Look for a platform that protects your entire application. This includes both what your application consists of (data, metadata, and all associated objects) and how you manage it (by Helm, Operators, Labels, or Namespaces).

  • Infrastructure agnostic: Migrating your OpenShift apps across the infrastructure with ease depends on the capabilities of your tool. Choose one that can work with any cloud or storage, so you can select the vendors that fit your cost, security, and performance needs.

  • Red Hat certified: Don’t trust just anyone with your OpenShift migration needs. Instead, find a platform that’s certified with Red Hat and natively integrated and optimized for OpenShift. That way, compatibility is never a problem and management is easy.

Trilio for Kubernetes (T4K) offers all of these features and more, and it’s specifically designed to support OpenShift in any environment. For example, AWS and Microsoft both vetted T4K, so you can migrate between OpenShift and the public cloud.

Want to see it in action? Let’s take a look at how easy OpenShift migration is by moving an application from on-prem to OpenShift running in any public cloud for example Red Hat OpenShift Service on AWS (ROSA) or OpenShift on Azure (ARO) using Trilio for Kubernetes.

Ready to See Trilio in Action?

And now, the step by step process to do an application migration using our UI.

Certainly you could use our Ansible Certified Collection to automate this, be bold!

Ansible for Kubernetes Application Mobility Part 1

Ansible for Kubernetes Application Mobility Part 2

Trilio’s Ansible Certified Collection For this one you need an account, but you can always use the Ansible Galaxy one here

 

Migrating an Application using Ansible and Trilio

How to Migrate from OpenShift On-Prem to OpenShift on AWS with Trilio

With Trilio for Kubernetes, you can migrate OpenShift on-prem applications to ROSA, easily. Here are step-by-step instructions for migrating a MySQL Helm application from an on-prem OpenShift (OCP) cluster to a ROSA cluster running on the AWS cloud.

1. Before you get started:

  1. Install the latest version of Trilio for Kubernetes  into your OCP and ROSA clusters.
  2. Ensure that your OCP and ROSA clusters have access to the same Target repository where the backup files will be stored by T4K.
  3. Be able to access the Web UI for both OCP and ROSA clusters.
  4. Install the Container Storage Interface (CSI) driver, if needed, which has volume snapshot capability, on both clusters.

2. Access Trilio from the OCP cluster and login into the Trilio Management Console

  1. Log in to the OCP user interface (UI) and navigate to the Installation T4K operator.
  2. Under the Networking section, go to routes and find the k8s-triliovault-web route. Then, copy the URL under the Location column to access TVK’s UI.
  3. Open the URL in a new browser tab to access the T4K UI login page.
  4. Log in to T4K using kubeconfig or using your OpenShift credentials. Click on Sign-in via the OpenShift option to login into T4K’s UI.

3. Use Trilio to Autodiscover Your Namespace and Application

  1. Once you log in, you can see the T4K instance name and Cluster Provider name with status. You can only see the license expiration date after you apply for your T4K license number.
  2. Click on the Backup and Recovery option on the left panel to go into auto-discovered namespaces.
  3. On the left side panel, click on Applications to see the cluster’s auto-discovered objects.
  4. Select the namespace from the dropdown at the top to view the object only for the Cockroach application that you installed previously.
  5. Go to the second tab “Helm & Operator” to view the Helm release “cockroachdb-app” that is deployed through a Helm chart.
  6. Now, you can back up the Helm application.
helma app trilio

4. Back Up Your Application on the Demo-Backup Namespace on the OpenShift Cluster

  1. Click on “Create Backup” on the right for the cockroachdb-app application name. This will show a pop-up window to provide one-time details of the backup plan
  2. If there’s no backup plan created for this application, click “Create New” on the top right corner of the pop-up window.
  3. Follow the steps in this doc to create a target before creating a backup plan.
  4. Then, provide the Namespace, Backupplan Name, and Target name as mandatory parameters and Encryption secret, Hook Configuration, Scheduling Policies, and Retention policies as optional parameters. Click next. Check out this doc to learn more about the options related to the backup plan.
  5. On the next screen, click on the Helm Release tab to verify that the “coackroachdb-app” Helm release will be captured as part of the backup.
  6. Click “Create” to create the backup plan and then click “Finish.”
  7. Once you successfully create the backup plan, it will be visible and automatically selected on the backup pop-up windows.
  8. Click “Next” to provide the backup name.
  9. Click “Create” to start the backup operation. As the backup process starts, it will also show the status log on the same pop-up window.
  10. When the process is complete, the backup will be marked as successful. Click “Finish” to close the popup window.
helm backup plan animated

Once the backup is launched, you will see the result in the up coming window:

Helm Backup Finished with Trilio

5. Migrate Your Red Hat OpenShift Application to ROSA Running on AWS

  1. To migrate, make sure that you’ve installed T4K through OperatorHub on the ROSA cluster.
  2. Then, launch the T4K UI following the same steps as OCP and log in to T4K using Kubeconfig or the “Sign In Via OpenShift” option.
  3. Go to the “Backup & Recovery” option and select “Namespace” from the top dropdown where the cockroachdb-app application is to be restored.
  4. The new target will be created in the same namespace where the application is located.
  5. Then, create the same AWS S3 or NFS target that you’ve used to store the backup on the OCP cluster. Here are the instructions.
  1. Enable the “Browsing” option on the target since you need it to browse the earlier backup stored on the target to be used to perform the restore.
  2. Once the Browsing status is shown as “Enabled,” click on the download arrow option “Launch Browser”.
  3. Select the “Backup Plan Name” with the “Backup Plan Type“ as “Helm” or search for the Backup Plan name.
  1. Click on the Backup plan name, which will open a pop-up window that shows the backups associated with the backup plan.
  2. Click on “Restore” to start the process to perform a restore, which will open a pop-up. Provide the Restore name and select the restore namespace from the dropdown where you want to restore the cockroachdb-app Helm application.
  3. Click on “Next” to see different options of “Transform Components”, “Exclude Resources”, and “Hook Configuration.” You can use these options as needed during the restore operation. Find more details about the restore workflow in this document.
  4. Click on “Create” to start the restore process.
  5. Once the restore operation completes, you can click “Finish.”
  6. Close the “Backups” pop-up window and the “Target Browser” window.
  7. Go back to the “Trilio Monitoring” page to see the “Backup Summary” and “Restore Summary”.
  8. Click on the “Details” button in the “Restore Summary” to view details of all the restores that you’ve performed from the Target Browser.
  9. Congrats! You’ve completed the restore operation of the Cockroaddb-app Helm application on the ROSA cluster successfully from the backup taken on the on-prem OCP cluster.

6. Validate the restore

  1. Once the restore is complete and checked on the Monitoring page, you can go to the “Backup & Recovery” page and select the “Applications” option to view all auto-discovered label-based objects present on the ROSA cluster.
  2. Now, select the namespace where you’ve restored the cockroach Helm application and select the second tab “Helm & Operator” to view the MySQL Helm chart.
  3. Since T4K restored the Helm chart as a Helm chart, the cockroach release name will be changed during the restore.

Want to migrate an application on ROSA to EKS or OpenShift on-prem to AWS? Simply follow the same process.

Conclusion

OpenShift Migration: Break the Barriers of the Cloud

Make sure your OpenShift applications are easily movable to any environment, and unlock a world of opportunity for your organization—from greater elasticity to reduced cloud costs.

So where will your OpenShift applications go, and more importantly, what will they do for your business when they get there?

Learn more about the ease of OpenShift migration with Trilio for Kubernetes.

Ready to See Trilio in Action?