Go to file
Colin Walters ef694a9b1b fedostree/products: Reenable SELinux, but in permissive mode
Still some more fixes coming, but getting close.
2014-02-02 14:38:37 -05:00
fb2docker fb2docker: Add sudo 2014-02-02 08:45:08 -05:00
fedostree fedostree/products: Reenable SELinux, but in permissive mode 2014-02-02 14:38:37 -05:00
libgsystem@25f755e086 Import lots of code from gnome-continuous 2014-01-03 17:14:10 -05:00
packaging packaging: Update Requires/BuildRequires 2014-01-31 19:18:23 -05:00
patches/shadow-utils patches: New directory containing patches for Fedora userspace 2014-01-04 07:42:20 -05:00
scripts scripts/ostree-ls-big-files.js: New script to analyze repo files for size 2014-01-29 17:55:07 -05:00
src zdisks: Put autogenerated images in "images/auto" 2014-02-01 17:26:47 -05:00
.gitignore Add .gitignore from ostree 2014-01-17 22:00:16 -05:00
.gitmodules Import some code for using GJS 2014-01-03 17:14:10 -05:00
autogen.sh autogen: Look for libgsystem in the correct place 2014-01-15 16:54:58 -05:00
configure.ac Support SELinux 2014-01-31 10:13:18 -05:00
COPYING Initial import from pkgsys-ostree 2013-12-21 19:41:30 -05:00
Makefile-autobuilder.am Make smoketest work 2014-01-25 21:25:27 -05:00
Makefile-decls.am Import some code for using GJS 2014-01-03 17:14:10 -05:00
Makefile-gsystem-introspection.am Import some code for using GJS 2014-01-03 17:14:10 -05:00
Makefile-rpm-ostree.am Support SELinux 2014-01-31 10:13:18 -05:00
Makefile.am Make smoketest work 2014-01-25 21:25:27 -05:00
Makefile.dist-packaging dist-packaging: Add buildinstall target 2014-01-15 22:31:02 -05:00
README.md README: Note we require selinux=0 currently 2013-12-23 15:00:31 -05:00

rpm-ostree

This tool takes a set of packages, and commits them to an OSTree repository. At the moment, it is intended for use on build servers.

Using rpm-ostree

For example, this invocation:

rpm-ostree --repo=repo --enablerepo=fedora --os=fedora --os-version=20 create my-server-packages @standard kernel ostree fedora-release lvm2 e2fsprogs btrfs-progs httpd

Will create a ref named "fedora/20/my-server-packages", containing a complete bootable root filesystem of those packages. As you can see from the example above, the package set is fairly minimal, we're just adding on "httpd".

Now, if you export the repo via any plain HTTP server, clients using OSTree can then replicate this tree, and boot it, tracking updates you make over time.

Pulling and booting from a client machine

First, install the ostree package, of course; make sure you have ostree 2013.7 or newer.

yum install ostree

Now, this bit of one time initialization will both create /ostree for you, as well as /ostree/deploy/fedora.

ostree admin os-init fedora

This step tells OSTree how to find the repository you built on the server. You only need to do this once.

ostree remote add myserver https://mycorp.example.com/repo

Now, since we did not GPG sign our repo above, we need to disable GPG verification. Add gpg-verify=false in the [remote] section.

nano /ostree/repo/config

This step downloads that ref into /ostree/repo:

ostree pull myserver fedora/20/my-server-packages

This step extracts the root filesystem, and updates the bootloader configuration:

ostree admin deploy --os=fedora fedora/20/my-server-packages

We need to do some initial setup before we actually boot the system. Copy in the storage configuration:

cp /etc/fstab /ostree/deploy/fedora/current

And set a root password:

chroot /ostree/deploy/fedora/current passwd

And there is one final (manual) step: You must copy your system's kernel arguments from /boot/grub2/grub.cfg and add them to /boot/loader/entries/ostree-fedora-0.conf, on the options line. This step may be automated further in the future.

IMPORTANT NOTE: You must use selinux=0 for now.

Booting the system

Remember, at this point there is no impact on your installed system except for additional disk space in the /boot/loader and /ostree directories.

Reboot, and get a GRUB prompt. At the prompt, press c. Now, enter:

insmod blscfg
bls_import

Then press Esc. You should have an additional boot menu entry, named ostree:fedora:0. Nagivate to it and press Enter.

Inside the system

To upgrade, run as root:

ostree admin upgrade

Note that in our demo so far, we did not install yum (or even rpm). Getting these to work fully is the next phase of the yum-ostree development.