検索

第12章 Managing OSTree Content

download PDF

OSTree is a tool to manage bootable, immutable, versioned file system trees. You can use a 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.5, 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:

      • 最新のみ: 最新の OSTree ブランチのみを同期します。
      • すべての履歴: すべての OSTree ブランチを同期します。
      • カスタム: 指定した数の OSTree ブランチを同期します。下のフィールドに必要な数を入力します。
    3. 保存をクリックします。
  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. Satellite Web UI で コンテンツ > 製品 に移動して、製品の作成 をクリックします。
  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. 同期プラン メニューから製品に関連付ける同期プランを選択します。
  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:

    • 最新のみ: 最新の OSTree ブランチのみを同期します。
    • すべての履歴: すべての OSTree ブランチを同期します。
    • カスタム: 指定した数の OSTree ブランチを同期します。下のフィールドに必要な数を入力します。
  11. 保存をクリックします。
  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 the custom OSTree Content product:

    # 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 "Custom 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 "Custom 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 では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.