rpm-ostree/README.md

59 lines
2.2 KiB
Markdown
Raw Normal View History

rpm-ostree
==========
2014-10-31 00:04:45 +03:00
RPM-OSTree (also nicknamed `/usr/bin/atomic`) is a mechanism to
assemble RPMs on a server side into an
[OSTree](https://wiki.gnome.org/Projects/OSTree) repository. Then
clients can update from that repository in a reliable image-like
fashion, via `atomic upgrade`.
2014-10-31 00:04:45 +03:00
Currently, rpm operates on a read-only mode on installed systems; it
is not possible to add or remove anything on the client. In return,
client systems are reliably synchronized with the server-provided
tree. For example, if a package is removed in the server-composed
set, when clients update, it also drops out of their tree.
2013-12-22 04:41:30 +04:00
2014-10-31 00:04:45 +03:00
This model works well in scenarios where one wants reliable state
replication of master to many client machines.
2013-12-22 04:41:30 +04:00
Installing and setting up a repository
--------------------------------------
2013-12-22 04:41:30 +04:00
First, unfortunately you must *disable* SELinux on the build host in
order to *support* SELinux on the built system. See:
https://bugzilla.redhat.com/show_bug.cgi?id=1060423
Once you have that done, choose a build directory. Here we'll use
/srv/rpm-ostree.
2013-12-22 04:41:30 +04:00
2014-03-08 03:08:57 +04:00
# cd /srv/rpm-ostree
# mkdir repo
# ostree --repo=repo init --mode=archive-z2
2014-10-31 00:04:45 +03:00
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.
See also: https://github.com/projectatomic/rpm-ostree-toolbox
2014-10-31 00:04:45 +03:00
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/rpm-ostree/repo --proxy=http://127.0.0.1:8123 sometreefile.json
All this does is use yum to download RPMs from the referenced repos,
and commit the result to the OSTree repository, using the ref named by
`ref`. Note that we've specified a local caching proxy (`polipo` in
this case) - otherwise we you will download the packages for each
treecompose.
You can export `/srv/rpm-ostree/repo` via any static webserver.
2014-06-05 02:38:27 +04:00
The use of `--proxy` is not mandatory but strongly recommended - with
this option you can avoid continually redownloading the packages every
compose. I personally use
[Polipo](http://www.pps.univ-paris-diderot.fr/~jch/software/polipo/),
but you can of course any HTTP proxy you wish.