피드 구독

I was involved in a demo of Red Hat Enterprise Linux (RHEL) for Edge, using MicroShift and ImageBuilder, and I experienced some problems with the network driver for Raspberry Pi 4 in RHEL 8. To solve this problem, I decided to create a custom image based on RHEL 9 instead, and in my previous article, I explain how I did that. If you haven't read that article, please read it before continuing with this article.

(Note: This is not an officially supported configuration.

Also, At the time of this writing, there is no RHEL version for Raspberry Pi. RHEL for ARM is available only for larger 64-bit ARMv8 platforms. However, this is based on a demo, and if you need a supported Linux system, try Fedora on Raspberry Pi. Fedora 29 and later supports the Raspberry Pi Model 2B- and 3-series of devices, including the 3B, 3B+, 3A+, 3CM and 3CM+.) 

In this article, I demonstrate how to generate your own RHEL 9 image with MicroShift.

MicroShift is an exploratory project created by Red Hat's edge computing team. Its goal is to tailor OpenShift for field-deployed devices, providing a consistent development and management experience across all footprints.

[ You might also be interested in reading How MicroShift and Kubernetes help manage edge devices at scale. ]

Key technologies

For this challenge, I relied primarily on three key technologies:

  • EC2 Graviton: The AWS Graviton chips are Arm-based 7nm processors designed by AWS and custom-built for cloud workloads. Graviton processors include dedicated cores and caches for each vCPU.
  • Image builder: RHEL's image builder creates installer media that embeds the OSTree commit. This is perfect for disconnected environments requiring an ISO, thumb drive, or some form of media that doesn't depend on network access. In this case, I used the RAW format to ensure compatibility with AWS.
  • MicroShift: This is OpenShift for the Edge and the software the image will run.

[ Free download: Advanced Linux commands cheat sheet. ]

Run an EC2 instance of your RHEL 9 AMI

First, you must run the RHEL 9 AMI you built in the first part of this series:

$ aws ec2 run-instances \
--image-id ami-[the-id-of-your-ami] \
--instance-type t4g.medium \
--subnet-id subnet-[the-id-of-your-subnet] \
--security-group-ids sg-[the-id-of-you-security-group] \
--associate-public-ip-address \
--key-name [the-name-of-your-ssh-key] \
--block-device-mappings "[{\"DeviceName\":\"/dev/xvda\",\"Ebs\":{\"VolumeSize\":60,\"DeleteOnTermination\":true}}]" \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=image-builder}]'

Install image builder

Next, install the image builder package and start it:

$ sudo dnf install -y osbuild-composer
$ sudo systemctl enable --now osbuild-composer.socket

You need to configure image builder with a repository override so that you can add custom repositories (or repositories that are different from the default repositories).

[ Learn how to modernize your IT with managed cloud services. ]

I've already created a configuration for this, so clone my Git repository to get the necessary JSON and TOML files.

  1. Create a configuration directory structure:

    $ mkdir -p /etc/osbuild-composer/repositories
  2. Copy the utils/rhel-90.json to the config directory:

    $ sudo cp utils/rhel-90.json /etc/osbuild-composer/repositories
  3. Add the new repositories (the TOML files in my Git repo) to the server:

    $ composer-cli sources add utils/transmission.toml
    $ composer-cli sources add utils/microshift.toml

Restart image builder so that it detects your changes:

$ sudo systemctl restart osbuild-composer.service

Build the image

You can now build your image, complete with MicroShift installed:

$ composer-cli blueprints push utils/microshift-blueprint-v0.0.1.toml

Orchestrate

This is all developing technology, so you may need to take some additional steps as it evolves, but the principles are the same as always. You're building reproducible images using configuration as code and running the images on the cloud.

There are many use cases for a RHEL image, and not just for edge computing. Build your own image and try it out for your next project.


저자 소개

UI_Icon-Red_Hat-Close-A-Black-RGB

채널별 검색

automation icon

오토메이션

기술, 팀, 인프라를 위한 IT 자동화 최신 동향

AI icon

인공지능

고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트

open hybrid cloud icon

오픈 하이브리드 클라우드

하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요

security icon

보안

환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보

edge icon

엣지 컴퓨팅

엣지에서의 운영을 단순화하는 플랫폼 업데이트

Infrastructure icon

인프라

세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보

application development icon

애플리케이션

복잡한 애플리케이션에 대한 솔루션 더 보기

Original series icon

오리지널 쇼

엔터프라이즈 기술 분야의 제작자와 리더가 전하는 흥미로운 스토리