11.5. Deploying updates to system groups


You can change the configuration of your operating system by modifying the Containerfile. The update will be applied after you build and push your container image to the registry, and reboot the operating system.

You can also change the container image source by using the bootc switch command. The content in the container registry determines the specific configuration of the RHEL Image Mode operating system. See Switching the container image reference.

Usually, when deploying updates to system groups, you can use a central management service to provide a client to be installed on each system which connects to the central service. Often, the management service requires the client to perform a one time registration. The following is an example on how to deploy updates to system groups. You can modify, by injecting the credentials for the management service into the image, to create a persistent systemd service, if required.

참고

For clarity reasons, the Containerfile in the example is not optimized. For example, a better optimization to avoid creating multiple layers in the image is by invoking RUN a single time.

You can install a client into a image mode for RHEL image and run it at startup to register the system.

Prerequisites

  • The management-client handles future connections to the server, by using a cron job or a separate systemd service.

Procedure

  • Create a management service with the following characteristics. It determines when to upgrade the system.

    FROM registry.redhat.io/rhel10/rhel-bootc:latest
    # Management services determine when to upgrade the system.
    # Disable bootc-fetch-apply-updates.timer if it is included in the base image.
    RUN systemctl disable bootc-fetch-apply-updates.timer
    
    # Install the client from dnf, or some other method that applies for your client
    RUN dnf install management-client -y && dnf clean all
    
    # Inject the credentials for the management service into the image
    ARG activation_key=
    
    # The existence of .run_next_boot acts as a flag to determine if the
    # registration is required to run when booting
    RUN touch /etc/management-client/.run_next_boot
    
    COPY <<"EOT" /usr/lib/systemd/system/management-client.service
    [Unit]
    Description=Run management client at boot
    After=network-online.target
    ConditionPathExists=/etc/management-client/.run_client_next_boot
    
    [Service]
    Type=oneshot
    EnvironmentFile=/etc/management-client/.credentials
    ExecStart=/usr/bin/management-client register --activation-key ${CLIENT_ACTIVATION_KEY}
    ExecStartPre=/bin/rm -f /etc/management-client/.run_next_boot
    ExecStop=/bin/rm -f /etc/management-client/.credentials
    
    [Install]
    WantedBy=multi-user.target
    EOT
    
    # Link the service to run at startup
    RUN ln -s /usr/lib/systemd/system/management-client.service /usr/lib/systemd/system/multi-user.target.wants/management-client.service
    
    # Store the credentials in a file to be used by the systemd service
    RUN echo -e "CLIENT_ACTIVATION_KEY=${activation_key}" > /etc/management-client/.credentials
    
    # Set the flag to enable the service to run one time
    # The systemd service will remove this file after the registration completes the first time
    RUN touch /etc/management-client/.run_next_boot
    1. Disable bootc-fetch-apply-updates.timer if it is included in the base image.
    2. Install the client by using dnf, or some other method that applies for your client.
    3. Inject the credentials for the management service into the image.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동