7.2. Containerfiles의 예


RHCOS 이미지 계층 지정을 사용하면 다음 유형의 이미지를 사용하여 사용자 정의 계층 이미지를 생성할 수 있습니다.

  • OpenShift Container Platform Hotfixes. CEE(Customer Experience and Engagement)를 사용하여 RHCOS 이미지 위에 Hotfix 패키지를 확보하고 적용할 수 있습니다. 경우에 따라 공식 OpenShift Container Platform 릴리스에 포함되기 전에 버그 수정 또는 개선 사항을 원할 수 있습니다. RHCOS 이미지 계층 지정을 사용하면 공식적으로 릴리스되기 전에 핫픽스를 쉽게 추가하고 기본 RHCOS 이미지에 수정 사항이 통합되면 Hotfix를 제거할 수 있습니다.

    중요

    일부 핫픽스에는 Red Hat 지원 예외가 필요하며 OpenShift Container Platform 지원 범위 또는 라이프 사이클 정책의 일반 범위를 벗어납니다.

    Red Hat Hotfix 정책을 기반으로 핫픽스가 제공됩니다. 기본 이미지 위에 적용하고 프로덕션 환경 이외의 환경에서 새 사용자 지정 계층 이미지가 있는지 테스트합니다. 프로덕션에서 사용자 정의 계층 이미지를 안전하게 사용할 수 있다는 것이 만족되면 자체 일정에 따라 특정 노드 풀로 롤아웃할 수 있습니다. 어떠한 이유로든 사용자 정의 계층 이미지를 쉽게 롤백하고 기본 RHCOS를 사용하여 로 돌아갈 수 있습니다.

    핫픽스를 적용하는 클러스터의 컨테이너 파일 예

    # Using a 4.12.0 image
    containerfileArch: noarch
    content: |-
      FROM configs AS final
      #Install hotfix rpm
      RUN rpm-ostree override replace https://example.com/myrepo/haproxy-1.0.16-5.el8.src.rpm && \
          rpm-ostree cleanup -m && \
          ostree container commit
    Copy to Clipboard Toggle word wrap

    핫픽스를 적용하는 클러스터 외부 컨테이너 파일의 예

    # Using a 4.12.0 image
    FROM quay.io/openshift-release-dev/ocp-release@sha256...
    #Install hotfix rpm
    RUN rpm-ostree override replace https://example.com/myrepo/haproxy-1.0.16-5.el8.src.rpm && \
        rpm-ostree cleanup -m && \
        ostree container commit
    Copy to Clipboard Toggle word wrap

  • RHEL 패키지. Red Hat 고객 포털(예: chrony, firewalld, iputils)에서 RHEL(Red Hat Enterprise Linux) 패키지를 다운로드할 수 있습니다.

    libreswan 유틸리티를 적용하는 클러스터 외부 컨테이너 파일의 예

    # Get RHCOS base image of target cluster `oc adm release info --image-for rhel-coreos`
    # hadolint ignore=DL3006
    FROM quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256...
    
    # Install our config file
    COPY my-host-to-host.conf /etc/ipsec.d/
    
    # RHEL entitled host is needed here to access RHEL packages
    # Install libreswan as extra RHEL package
    RUN rpm-ostree install libreswan && \
        systemctl enable ipsec && \
        ostree container commit
    Copy to Clipboard Toggle word wrap

    libreswan에는 추가 RHEL 패키지가 필요하므로 권한이 있는 RHEL 호스트에 이미지를 빌드해야 합니다. RHEL 인타이틀먼트가 작동하려면 etc-pki-entitlement 보안을 openshift-machine-api 네임스페이스에 복사해야 합니다.

  • 타사 패키지. 다음 유형의 패키지와 같은 타사 조직에서 RPM을 다운로드하고 설치할 수 있습니다.

    • 성능을 개선하거나 기능을 추가하기 위해 엣지 드라이버 및 커널 개선 사항 유지.
    • 가능한 실제 중단을 조사하기 위한 포렌식 클라이언트 툴입니다.
    • 보안 에이전트.
    • 전체 클러스터에 대한 일관된 보기를 제공하는 인벤토리 에이전트입니다.
    • SSH 키 관리 패키지.

    EPEL의 타사 패키지를 적용하는 클러스터 내 Containerfile의 예

    FROM configs AS final
    
    #Enable EPEL (more info at https://docs.fedoraproject.org/en-US/epel/ ) and install htop
    RUN rpm-ostree install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
        rpm-ostree install htop && \
        ostree container commit
    Copy to Clipboard Toggle word wrap

    EPEL의 타사 패키지를 적용하는 클러스터 외부 컨테이너 파일의 예

    # Get RHCOS base image of target cluster `oc adm release info --image-for rhel-coreos`
    # hadolint ignore=DL3006
    FROM quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256...
    
    # Install our config file
    COPY my-host-to-host.conf /etc/ipsec.d/
    
    # RHEL entitled host is needed here to access RHEL packages
    # Install libreswan as extra RHEL package
    RUN rpm-ostree install libreswan && \
        systemctl enable ipsec && \
        ostree container commit
    Copy to Clipboard Toggle word wrap

    이 Containerfile은 RHEL 어류 프로그램을 설치합니다. 어류에는 추가 RHEL 패키지가 필요하므로 권한이 있는 RHEL 호스트에 이미지를 빌드해야 합니다. RHEL 인타이틀먼트가 작동하려면 etc-pki-entitlement 보안을 openshift-machine-api 네임스페이스에 복사해야 합니다.

    RHEL 종속 항목이 있는 타사 패키지를 적용하는 클러스터의 컨테이너 파일 예

    FROM configs AS final
    
    # RHEL entitled host is needed here to access RHEL packages
    # Install fish as third party package from EPEL
    RUN rpm-ostree install https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/Packages/f/fish-3.3.1-3.el9.x86_64.rpm && \
        ostree container commit
    Copy to Clipboard Toggle word wrap

    RHEL 종속 항목이 있는 타사 패키지를 적용하는 클러스터 외부 Containerfile의 예

    # Get RHCOS base image of target cluster `oc adm release info --image-for rhel-coreos`
    # hadolint ignore=DL3006
    FROM quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256...
    
    # Install our config file
    COPY my-host-to-host.conf /etc/ipsec.d/
    
    # RHEL entitled host is needed here to access RHEL packages
    # Install libreswan as extra RHEL package
    RUN rpm-ostree install libreswan && \
        systemctl enable ipsec && \
        ostree container commit
    Copy to Clipboard Toggle word wrap

머신 구성을 생성한 후 MCO(Machine Config Operator)에서 다음 단계를 수행합니다.

  1. 지정된 풀 또는 풀에 대해 새 머신 구성을 렌더링합니다.
  2. 풀 또는 풀의 노드에서 차단 및 드레이닝 작업을 수행합니다.
  3. 나머지 머신 구성 매개변수를 노드에 씁니다.
  4. 사용자 정의 계층 이미지를 노드에 적용합니다.
  5. 새 이미지를 사용하여 노드를 재부팅합니다.
중요

클러스터에 롤아웃하기 전에 프로덕션 환경 외부의 이미지를 테스트하는 것이 좋습니다.

맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

Theme

© 2025 Red Hat