이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 12. Managing OSTree Content


OSTree is a tool to manage bootable, immutable, versioned file system trees. You can use custom OSTree content on a build system, then export an OSTree repository to a static HTTP. Red Hat Enterprise Linux Atomic Server uses OSTree content composed from RPM files as a method to keep the operating system up to date.

You can use Red Hat Satellite 6 to synchronize and manage OSTree branches from an OSTree repository.

In Satellite Server 6.7, OSTree management tools are enabled by default. If you ever have a reason to enable the tool, enter the following command:

# satellite-installer --katello-enable-ostree=true

12.1. Selecting Red Hat OSTree Content to Synchronize

Red Hat CDN provides OSTree Content for you to select and synchronize.

Procedure

To find and synchronize OSTree content, complete the following steps:

  1. In the Satellite web UI, navigate to Content > Red Hat Repositories.
  2. From the list, select the OSTree content type.
  3. In the Available Repositories pane, locate the OSTree repisotry set you want to use, for example, the Red Hat Enterprise Linux Atomic Host Trees set from the Red Hat Enterprise Linux Atomic Host product group.
  4. Click the Enable icon to enable the repository you want to use.
  5. Navigate to Content > Products and click the product that you want to use, for example Red Hat Enterprise Linux Atomic Host.
  6. Select the upstream synchronization policy for this repository. By default, Satellite synchronizes only the latest OSTree branch.

    1. Click the repository you want to synchronize.
    2. From the Upstream Sync Policy menu, select one of the following policies to synchronize OSTree branches for this repository:

      • Latest Only - synchronize only the latest OSTree branch.
      • All History - synchronize all OSTree branches.
      • Custom - synchronize a custom number of OSTree branches. Enter the required number into the field below.
    3. Click Save.
  7. From the Select Action menu, select Sync Now.

To view the Synchronization Status

  • In the Satellite web UI, navigate to Content > Sync Status and expand, for example, Red Hat Enterprise Linux Atomic Host.

For CLI Users

  1. Search the Red Hat Enterprise Linux Server product for ostree repositories:

    # hammer repository-set list \
    --product "Red Hat Enterprise Linux Atomic Host" \
    --organization "My_Organization" | grep "ostree"
  2. Enable the ostree repository for Red Hat Enterprise Linux Atomic Host or any product that you want to use:

    # hammer repository-set enable \
    --product "Red Hat Enterprise Linux Atomic Host" \
    --name "Red Hat Enterprise Linux Atomic Host (Trees)" \
    --organization "My_Organization"
  3. Locate and synchronize the repository for the product:

    # hammer repository list \
    --product "Red Hat Enterprise Linux Atomic Host" \
    --organization "My_Organization"
    # hammer repository synchronize \
    --name "Red Hat Enterprise Linux Atomic Host Trees" \
    --product "Red Hat Enterprise Linux Atomic Host" \
    --organization "My_Organization"

12.2. Importing Custom OSTree Content

In addition to importing OSTree content from Red Hat CDN, you can also import content from other sources. This requires a published HTTP location for the OSTree to import.

Procedure

To import custom OSTree content, complete the following steps:

  1. In the Satellite web UI, navigate to Content > Products and click Create Product.
  2. In the Name field, enter a name for your OSTree content. This automatically populates the Label field.
  3. Optional: In the GPG Key field, enter a GPG Key for the entire product.
  4. From the Sync Plan menu, select a synchronization plan to associate with the product.
  5. In the Description field, enter a description of the product and click Save.
  6. When the product creation completes, click Create Repository.
  7. In the Name field, enter a name for the repository. This automatically populates the Label field.
  8. From the Type list, select ostree.
  9. In the URL field, enter the URL of the registry to use as a source. For example http://www.example.com/rpm-ostree/.
  10. From the Upstream Sync Policy menu, select one of the following policies to synchronize OSTree branches for this repository:

    • Latest Only - synchronize only the latest OSTree branch.
    • All History - synchronize all OSTree branches.
    • Custom - synchronize a custom number of OSTree branches. Enter the required number into the field below.
  11. Click Save.
  12. When the repository creation completes, select the new repository and click Sync Now to start the synchronization process.

To view the Synchronization Status:

  • In the Satellite web UI, navigate to Content > Sync Status and expand the entry that you want to view.

For CLI Users

  1. Create a product for your custom OSTree content:

    # hammer product create \
    --name "Custom OSTree Content" \
    --sync-plan "Example_Plan" \
    --description "OSTree Content" \
    --organization "My_Organization"
  2. Create the repository for the OSTree:

    # hammer repository create \
    --name "OSTree" \
    --content-type "ostree" \
    --url "http://www.example.com/rpm-ostree/" \
    --product "OSTree Content" \
    --organization "My_Organization"
  3. Synchronize the repository:

    # hammer repository synchronize \
    --name "OSTree" \
    --product "OSTree Content" \
    --organization "My_Organization"

12.3. Managing OSTree Content with Content Views

Use Content Views to manage OSTree branches across the application life cycle. This process uses the same publication and promotion method that RPMs and Puppet modules use.

Procedure

To create a content view for your OSTree and add a repository, complete the following steps:

  1. In the Satellite web UI, navigate to Content > Content Views and click Create New View.
  2. In the Name field, enter a plain text name for the view. This automatically populates the Label field.
  3. In the Description field, enter a description of the OSTree Content View.
  4. If you want to use a Composite Content View, select the Composite View check box.
  5. Click Save to complete.
  6. Navigate to the OSTree Content tab, then click Add.
  7. Select the OSTree repository for that you want to use. Click Add Repository to add the OSTree content from this repository to the Content View.
  8. Navigate to Versions and click Publish New Version.
  9. In the Description field, enter a description for the version, and click Save.

You can also click Promote to promote this Content View across environments in the application life cycle.

For CLI Users

  1. Obtain a list of repository IDs:

    # hammer repository list --organization "_My_Organization_"
  2. Create the Content View and add the repository:

    # hammer content-view create \
    --name "OSTree" \
    --description "OSTree for Red Hat Enterprise Linux Atomic Host" \
    --repository-ids 5 \
    --organization "My_Organization"
  3. Publish the view:

    # hammer content-view publish \
    --name "OSTree" \
    --description "Example Content View for the OSTree" \
    --organization "My_Organization"
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

© 2024 Red Hat, Inc.