이 콘텐츠는 선택한 언어로 제공되지 않습니다.
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:
- In the Satellite web UI, navigate to Content > Red Hat Repositories.
- From the list, select the OSTree content type.
- 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.
- Click the Enable icon to enable the repository you want to use.
- Navigate to Content > Products and click the product that you want to use, for example Red Hat Enterprise Linux Atomic Host.
Select the upstream synchronization policy for this repository. By default, Satellite synchronizes only the latest OSTree branch.
- Click the repository you want to synchronize.
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.
- Click Save.
- 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
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"
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"
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:
- In the Satellite web UI, navigate to Content > Products and click Create Product.
- In the Name field, enter a name for your OSTree content. This automatically populates the Label field.
- Optional: In the GPG Key field, enter a GPG Key for the entire product.
- From the Sync Plan menu, select a synchronization plan to associate with the product.
- In the Description field, enter a description of the product and click Save.
- When the product creation completes, click Create Repository.
- In the Name field, enter a name for the repository. This automatically populates the Label field.
-
From the Type list, select
ostree
. -
In the URL field, enter the URL of the registry to use as a source. For example
http://www.example.com/rpm-ostree/
. 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.
- Click Save.
- 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
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"
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"
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:
- In the Satellite web UI, navigate to Content > Content Views and click Create New View.
- In the Name field, enter a plain text name for the view. This automatically populates the Label field.
- In the Description field, enter a description of the OSTree Content View.
- If you want to use a Composite Content View, select the Composite View check box.
- Click Save to complete.
- Navigate to the OSTree Content tab, then click Add.
- 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.
- Navigate to Versions and click Publish New Version.
- 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
Obtain a list of repository IDs:
# hammer repository list --organization "_My_Organization_"
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"
Publish the view:
# hammer content-view publish \ --name "OSTree" \ --description "Example Content View for the OSTree" \ --organization "My_Organization"