Chapter 11. Managing OSTree Content
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.4-Beta, 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
11.1. Selecting Red Hat OSTree Content to Synchronize
Red Hat’s 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.
- Click the OSTree tab and locate the OSTree 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. Ensure you have a repository enabled.
- Navigate to Content > Products and click the product that you want to use, for example, Red Hat Enterprise Linux Atomic Host.
- Select this repository and click 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
ostreerepositories:# hammer repository-set list \ --product "Red Hat Enterprise Linux Atomic Host" \ --organization "My_Organization" | grep "ostree"Enable the
ostreerepository 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"
11.2. Importing Custom OSTree Content
In addition to importing OSTree content from Red Hat’s 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 New 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.
- In the Sync Plan field, enter the name of a content 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/. - 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 the custom
OSTree Contentproduct:# 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 "Custom OSTree" \ --content-type "ostree" \ --url "http://www.example.com/rpm-ostree/" \ --product "OSTree Content" \ --organization "My_Organization"
Synchronize the repository:
# hammer repository synchronize \ --name "Custom OStree" \ --product "OSTree Content" \ --organization "My_Organization"
11.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"

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.