rpm-ostree/docs/manual/compose-server.md
Gerard Braad 5fb4a04e85 Add links to customization resource
Closes: #375
Approved by: jlebon
2016-07-05 13:06:08 +00:00

2.5 KiB

Background on managing an OSTree repository

Before you get started, it's recommended to read (at least) these two sections of the OSTree manual:

Generating OSTree commits from a CentOS base

First, you'll need a copy of rpm-ostree on your compose server. It's included in the package collection for Fedora, and there are CentOS Core packages as well as bleeding edge CentOS builds.

A good first thing to try would be using the CentOS Atomic Host metadata to generate a custom host.

One time setup, where we clone the git repository, then make two OSTree repos, one for doing builds, one for export via HTTP:

# mkdir /srv/centos-atomic
# cd /srv/centos-atomic
# git clone https://github.com/CentOS/sig-atomic-buildscripts -b downstream
# mkdir build-repo
# ostree --repo=build-repo init --mode=bare-user
# mkdir repo
# ostree --repo=repo init --mode=archive-z2

Running rpm-ostree compose tree

This program takes as input a manifest file that describes the target system, and commits the result to an OSTree repository.

The input format is a JSON "treefile". See examples in doc/treefile-examples as well as doc/treefile.md.

# rpm-ostree compose tree --repo=/srv/centos-atomic/build-repo sig-atomic-buildscripts/centos-atomic-host.json

This will download RPMs from the referenced repos, and commit the result to the OSTree repository, using the ref named by ref.

Once we have that commit, let's export it:

# ostree --repo=repo pull-local build-repo centos-atomic-host/7/x86_64/standard

You can tell client systems to rebase to it by combining ostree remote add, and rpm-ostree rebase on the client side.

More information