README.md: Syntax and misc content fixes

This commit is contained in:
Colin Walters 2013-12-22 18:06:09 -05:00
parent cc0922e655
commit 5f51e32459

View File

@ -1,11 +1,16 @@
Using rpm-ostree rpm-ostree
================ ==========
This tool takes a set of packages, and commits them to an
[OSTree](https://wiki.gnome.org/Projects/OSTree) repository. At the
moment, it is intended for use on build servers.
Using 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.
For example, this invocation: 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 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 Will create a ref named "fedora/20/my-server-packages", containing a
complete bootable root filesystem of those packages. As you can see complete bootable root filesystem of those packages. As you can see
@ -17,45 +22,45 @@ OSTree can then replicate this tree, and boot it, tracking updates you
make over time. make over time.
Pulling and booting from a client machine Pulling and booting from a client machine
========================================= -----------------------------------------
First, install the ostree package, of course; make sure you have First, install the ostree package, of course; make sure you have
ostree 2013.7 or newer. ostree 2013.7 or newer.
# yum install ostree yum install ostree
Now, this bit of one time initialization will both Now, this bit of one time initialization will both
create `/ostree` for you, as well as `/ostree/deploy/fedora`. create `/ostree` for you, as well as `/ostree/deploy/fedora`.
# ostree admin os-init fedora ostree admin os-init fedora
This step tells OSTree how to find the repository you built on This step tells OSTree how to find the repository you built on
the server. You only need to do this once. the server. You only need to do this once.
# ostree remote add myserver https://mycorp.example.com/repo ostree remote add myserver https://mycorp.example.com/repo
Now, since we did not GPG sign our repo above, we need to disable GPG Now, since we did not GPG sign our repo above, we need to disable GPG
verification. Add `gpg-verify=false` in the `[remote]` section. verification. Add `gpg-verify=false` in the `[remote]` section.
# nano /ostree/repo/config nano /ostree/repo/config
This step downloads that ref into `/ostree/repo`: This step downloads that ref into `/ostree/repo`:
# ostree pull myserver fedora/20/my-server-packages ostree pull myserver fedora/20/my-server-packages
This step extracts the root filesystem, and updates the bootloader This step extracts the root filesystem, and updates the bootloader
configuration: configuration:
# ostree admin deploy --os=fedora fedora/20/my-server-packages ostree admin deploy --os=fedora fedora/20/my-server-packages
We need to do some initial setup before we actually boot the system. We need to do some initial setup before we actually boot the system.
Copy in the storage configuration: Copy in the storage configuration:
# cp /etc/fstab /ostree/deploy/fedora/current cp /etc/fstab /ostree/deploy/fedora/current
And set a root password: And set a root password:
# chroot /ostree/deploy/fedora/current passwd chroot /ostree/deploy/fedora/current passwd
And there is one final (manual) step: You must copy your system's And there is one final (manual) step: You must copy your system's
kernel arguments from `/boot/grub2/grub.cfg` and add them to kernel arguments from `/boot/grub2/grub.cfg` and add them to
@ -63,7 +68,7 @@ kernel arguments from `/boot/grub2/grub.cfg` and add them to
line. This step may be automated further in the future. line. This step may be automated further in the future.
Booting the system Booting the system
================== ------------------
Remember, at this point there is no impact on your installed system Remember, at this point there is no impact on your installed system
except for additional disk space in the `/boot/loader` and `/ostree` except for additional disk space in the `/boot/loader` and `/ostree`
@ -79,11 +84,11 @@ named `ostree:fedora:0`. Nagivate to it and press `Enter`.
Inside the system Inside the system
================= -----------------
To upgrade, run as root: To upgrade, run as root:
# ostree admin upgrade ostree admin upgrade
Note that in our demo so far, we did not install `yum` (or even 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 `rpm`). Getting these to work fully is the next phase of the