Skip to main content
AI
  • Get started with AI

    • Red Hat AI

      Accelerate the development and deployment of enterprise AI solutions.

    • AI learning hub

      Explore learning materials and tools, organized by task.

    • AI interactive demos

      Click through scenarios with Red Hat AI, including training LLMs and more.

    • AI/ML learning paths

      Expand your Red Hat OpenShift AI knowledge using these learning resources.

    • AI quickstarts

      Focused AI use cases designed for fast deployment on Red Hat AI platforms.

    • No-cost AI training

      Foundational Red Hat AI training.

  • Featured resources

    • Red Hat OpenShift AI
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

Red Hat AI Factory with NVIDIA

Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.

Learn
  • Self-guided

    • Documentation

      Find answers, get step-by-step guidance, and learn how to use Red Hat products.

    • Learning paths

      Explore curated walkthroughs for common development tasks.

    • Guided learning

      Receive custom learning paths powered by our AI assistant.

    • See all learning
  • Hands-on

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

    • Interactive labs

      Learn by doing in these hands-on, browser-based experiences.

    • Interactive demos

      Click through product features in these guided tours.

  • Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics
  • Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
Build
  • Get started

    • Red Hat build of Podman Desktop

      A downloadable, local development hub to experiment with our products and builds.

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

  • Download products

    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products
  • Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset
  • References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
Community
  • Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions
  • Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github
  • Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

Join the Red Hat Developer program

Download Red Hat products and project builds, access support documentation, learning content, and more.

ConsoleDocsSupport Search
New For you

Recommended

We'll recommend resources you may like as you browse. Try these suggestions for now.

  • Product downloads
  • Cheat sheets
  • Red Hat Developer learning portal
  • Developer blog
  • E-books
  • Developer Sandbox
Log in

Get more with a Red Hat Developer account

  • Product downloads
  • Console access
  • Event registration
  • Training & trials
Explore more account benefitsLog in or register

A subscription may be required for some services.

Contact us

Automate Red Hat OpenShift on Alibaba Cloud

Reference implentation of OpenShift deployments on Alibaba Cloud

October 24, 2024
Julio Faerman
Related topics:
AutomationDevOps
Related products:
Red Hat OpenShift

    For many customers, running Red Hat OpenShift on Alibaba Cloud can be the architecture of choice for efficient hybrid cloud solutions. However, automating the deployment of clusters can be troublesome, as there are many alternatives to consider and some development required. This article offers a reference implementation to help you deploy Red Hat OpenShift clusters on Alibaba Cloud infrastructure using the Assisted Installer. 

    All code referenced in this article may be found here. Please review the code and configuration before executing, as described in this document. 

    Disclaimer

    This repository is maintained exclusively by its contributors as a community effort. It is not supported by Red Hat or Alibaba.

    Deployment guide

    Follow this process to provision your cloud resources and install an OpenShift Cluster automatically on Alibaba Cloud. Here’s a recorded demonstration of the entire process: Create an OpenShift cluster on Alibaba Cloud.

    Account creation

    Make sure you have access to the following cloud services:

    • Red Hat Hybrid Console
    • Alibaba Cloud

    Workspace setup

    The lab-aliyun repository on GitHub includes an example GitPod configuration, so you can start a workspace with all tools ready to work.

    If you prefer, you're welcome to clone this repository and set up your own machine. The exact dependencies and commands can be found in the GitPod container file (.gitpod.Containerfile).

    Configure the Assisted Installer CLI

    The Assisted Installer service provides us the image for our cluster pre-configured. However, instead of using the web console, we’ll automate the process using the command-line interface (CLI).

    Configure the offline token

    Obtain your Assisted Installer offline token at here and set as an environment variable named AI_OFFLINETOKEN:

    export AI_OFFLINETOKEN="YOUR_TOKEN"

    You can also use dotfiles, DirEnv, or your preferred mechanism to set up environment variables.

    Configure the pull secret

    Log in to the OpenShift Cluster Manager portal, and download your pull secret to a file named openshift_pull.json.

    Verify access to the Assisted Installer Service by listing your clusters with the following command:

    aicli list clusters

    Configure the Alibaba CLI

    Set up authentication of Alibaba CLI as described in Configure Identity Credentials. Make sure your user has access to all resources necessary for the cluster, or assign an administrator-level policy.

    Verify access to Alibaba services by checking your identity:

    aliyun sts GetCallerIdentity

    Set up Alibaba resources

    The file my_cluster_configurations.json contains settings that are going to be used by the scripts.

    Review every setting according to your environment:

    
    {
        "region": "us-east-1",
        "base_domain": "devcluster.mycompany.com",
        "cluster_name_prefix": "someone-",
        "openshift_version": "4.16.2",
        "ssh_public_key_file": "/home/gitpod/.ssh/id_rsa.pub",
        "control_plane_instance_type": "ecs.g6.xlarge",
        "compute_instance_type": "ecs.g6.large",
        "create_sno_cluster": false,
        "create_compact_cluster": false,
        "create_bastion_host": false,
        "bastion_host_image_id": "m-0xi1wndcxhwnxavcodzz",
        "bastion_host_ssh_key_pair": "openshift-dev",
        "resource_group_id": "rg-aek4mzon3le3dse"
    }

    The table below provides a brief description of each setting.

    Setting

    Description

    region

    Alibaba Cloud region where resources will be provisioned.

    base_domain

    DNS zone name where cluster will be created.

    cluster_name_prefix

    Name prefix for the cluster and its resources.

    openshift_version

    OpenShift version to use.

    ssh_public_key_file

    Key file location for server access.

    control_plane_instance_type

    ECS instance type for control plane instances.

    compute_instance_type

    ECS instance type for worker nodes.

    create_sno_cluster

    Create a cluster with control plane and worker in a single node.

    create_compact_cluster

    Create a cluster with contro-plane and workersl in the same nodes, of a three-node cluster.

    create_bastion_host

    Create an extra instance outside of the cluster.

    bastion_host_image_id

    Image to be used for bastion host.

    bastion_host_ssh_key_pair

    Keypair name for bastion host.

    resource_group_id

    Alibaba Resource Manager group ID.

    Code review

    The example scripts in this repository help you provision the cluster, download and convert the image, provision the cloud resources, and install the software. The entrypoint is the lab-aliyun.sh.aliyun script, which invokes each other in turn. The resources are created using Alibaba Resource Orchestration service (ROS), from the template infra/ros/template.ros.yaml. You may want to change that template to include other services, or add that template to your own solution.

    Cluster provisioning

    The entrypoint script lab-aliyun.sh.aliyun can be executed, and all steps should follow automatically. In the end, your cluster will be installed and set up correctly. The scripts create temporary files with logs, images, and resource identities in the root of this repository, where it's expected to execute.

    The first step is to create the cluster in the Assisted Installer service and to obtain the cluster image, so it can be uploaded to Alibaba Cloud and converted to the expected qcow2 format.

    With the image created, the networking and compute infrastructure are provisioned using the Resource Orchestration Service. You can use the Resource Orchestration Service console to verify the provisioning progress. See Figure 1.

    Alibaba Cloud Resource Orchestration Service screen showing the resources created.
    Figure 1: Alibaba Cloud Resource Orchestration Service screen with resources created.

    Cluster installation

    After the resources are provisioned, the lab script starts the cluster installation on the Assisted Installer. This process can take around an hour to complete. You can verify the progress of the installation in each node in the Red Hat Hybrid Cloud Console, as shown in Figure 2.

    Red Hat Hybrid Cloud Console showing the cluster installation process.
    Figure 2: Assisted Installer with cluster installation in progress.

    Troubleshooting

    Although this code was tested and reviewed, it’s possible that some things that may go wrong—do check the logs and console for errors.

    The first checkpoint is to verify that the stack is properly created in Alibaba Cloud Resource Orchestration Service (ROS). If the stack is rolled back, you'll find the reason in the Events tab.

    After that, the cluster will be provisioned in the assisted installer service. You can download the installer logs from the web console.

    Cleanup resources

    If you're no longer using the provisioned cluster, remember to delete the ROS stack (on the Alibaba Cloud Console) and OpenShift Cluster (on the Red Hat Hybrid Cloud Console) to avoid wasting resources or incurring costs.

    Send us your feedback!

    Let us know if this reference implementation was helpful and how it could be improved. Your discussions and contributions are more than welcome in our GitHub Repository.

    Related Posts

    • Introduction to the Red Hat OpenShift deployment extension for Microsoft Azure DevOps

    • How Kubernetes Helps to Enable DevOps

    • Red Hat technologies make open hybrid cloud a reality

    • Using containerization for modern hybrid cloud application development

    Recent Posts

    • A day in the life of an NVIDIA H100 on Red Hat OpenShift 5

    • Migrate BuildConfigs to builds for Red Hat OpenShift with one plug-in install

    • Run Red Hat Enterprise Linux CoreOS on NVIDIA BlueField DPUs

    • Agent harness engineering: Separating model capabilities from enforcement

    • What's new for developers in Red Hat Enterprise Linux 10.3 and 9.9

    What’s up next?

    The Red Hat OpenShift cheat sheet presents oc commands for managing an application’s lifecycle.

    Get the cheat sheet
    Red Hat Developers logo

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    Red Hat Developer

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility
    Ask AI