Skip to content

Commit 491e131

Browse files
authored
Merge pull request #177 from cgwalters/docs
Rework docs; move README.md contents into docs/index.md
2 parents 69c37dd + 61dd8e8 commit 491e131

File tree

7 files changed

+271
-179
lines changed

7 files changed

+271
-179
lines changed

README.md

Lines changed: 2 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
Transactional, in-place operating system updates using OCI/Docker container images.
44

5-
STATUS: Experimental, subject to change!
6-
75
# Motivation
86

97
The original Docker container model of using "layers" to model
@@ -17,171 +15,6 @@ which is used to boot. At runtime on a target system, the base userspace is
1715
*not* itself running in a container by default. For example, assuming
1816
systemd is in use, systemd acts as pid1 as usual - there's no "outer" process.
1917

20-
## ostree
21-
22-
This project currently leverages significant work done in
23-
[the ostree project](https://github.com/ostreedev/ostree-rs-ext/).
24-
25-
In the future, there may be non-ostree backends.
26-
27-
## Modeling operating system hosts as containers
28-
29-
The bootc project suggests that Linux operating systems and distributions
30-
to provide a new kind of "bootable" base image, distinct from "application"
31-
base images. See below for available images.
32-
33-
Effectively, these images contain a Linux kernel - and while this kernel
34-
is not used when the image is used via e.g. `podman|docker run`, it *is*
35-
used when booted via `bootc`.
36-
37-
In the current defaults, `/etc` and `/var` both act a bit like
38-
mounted, persistent volumes. More on this in [the ostree docs](https://ostreedev.github.io/ostree/adapting-existing/#system-layout).
39-
40-
## Status
41-
42-
The core `bootc update` functionality is really just the same
43-
technology which has shipped for some time in rpm-ostree so there
44-
should be absolutely no worries about using it for OS updates.
45-
A number of people do this today.
46-
47-
That said bootc is in active development and some parts
48-
are subject to change, such as the command line interface and
49-
the CRD-like API exposed via `bootc edit`.`
50-
51-
The `bootc install` functionality is also more experimental.
52-
53-
## Using bootc
54-
55-
### Installing
56-
57-
* Fedora: [bootc is packaged](https://bodhi.fedoraproject.org/updates/?packages=bootc) and be available in the main repositories soon.
58-
* CentOS Stream 9: There is a [COPR](https://copr.fedorainfracloud.org/coprs/rhcontainerbot/bootc/) tracking git main with binary packages.
59-
60-
You can also build this project like any other Rust project, e.g. `cargo build --release` from a git clone.
61-
62-
### Base images
63-
64-
Many users will be more interested in base (container) images.
65-
66-
To build base images "from scratch", see [docs/bootc-images.md](docs/bootc-images.md).
67-
68-
For pre-built base images:
69-
70-
* [Fedora CoreOS](https://quay.io/repository/fedora/fedora-coreos) can be used as a base image; you will need to [enable bootc](https://github.com/coreos/rpm-ostree/blob/main/docs/bootc.md) there.
71-
* There is also an in-development [Project Sagano](https://github.com/centos/sagano) for Fedora/CentOS.
72-
73-
However, bootc itself is not tied to Fedora derivatives; [this issue](https://github.com/coreos/bootupd/issues/468) tracks the main blocker for other distributions.
74-
75-
### Deriving from and switching to base images
76-
77-
A toplevel goal is that *every tool and technique* a Linux system
78-
administrator knows around how to build, inspect, mirror and manage
79-
application containers also applies to bootable host systems.
80-
81-
There are a number of examples in e.g. [coreos/layering-examples](https://github.com/coreos/layering-examples).
82-
83-
First, build a derived container using any container build tooling.
84-
85-
#### Using `bootc install`
86-
87-
The `bootc install` command will write the current container to a disk, and set it up for booting.
88-
In brief, the idea is that every container image shipping `bootc` also comes with a simple
89-
installer that can set a system up to boot from it. Crucially, if you create a
90-
*derivative* container image from a stock OS container image, it also automatically supports `bootc install`.
91-
92-
For more information, please see [docs/install.md](docs/install.md).
93-
94-
#### Switching from an existing ostree-based system
95-
96-
If you have [an operating system already using ostree](https://ostreedev.github.io/ostree/#operating-systems-and-distributions-using-ostree) then you can use `bootc switch`:
97-
98-
```
99-
$ bootc switch --no-signature-verification quay.io/examplecorp/custom:latest
100-
```
101-
102-
This will preserve existing state in `/etc` and `/var` - for example,
103-
host SSH keys and home directories. There may be some issues with uid/gid
104-
drift in this scenario however.
105-
106-
### Upgrading
107-
108-
Once a chosen container image is used as the boot source, further
109-
invocations of `bootc upgrade` will look for newer versions - again
110-
preserving state.
111-
112-
## Relationship with other projects
113-
114-
### Relationship with podman
115-
116-
It gets a bit confusing to talk about shipping bootable operating systems in container images.
117-
Again, to be clear: we are reusing container images as:
118-
119-
- A build mechanism (including running *as* a standard OCI container image)
120-
- A transport mechanism
121-
122-
But, actually when a bootc container is booted, podman (or docker, etc.) is not involved.
123-
The storage used for the operating system content is distinct from `/var/lib/containers`.
124-
`podman image prune --all` will not delete your operating system.
125-
126-
That said, a toplevel goal of bootc is alignment with the https://github.com/containers ecosystem,
127-
which includes podman. But more specifically at a technical level, today bootc uses
128-
[skopeo](https://github.com/containers/skopeo/) and hence indirectly [containers/image](https://github.com/containers/image)
129-
as a way to fetch container images.
130-
131-
This means that bootc automatically also honors many of the knobs available in `/etc/containers` - specifically
132-
things like [containers-registries.conf](https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md).
133-
134-
In other words, if you configure `podman` to pull images from your local mirror registry, then `bootc` will automatically honor that as well.
135-
136-
The simple way to say it is: A goal of `bootc` is to be the bootable-container analogue for `podman`, which runs application containers. Everywhere one might run `podman`, one could also consider using `bootc`.
137-
138-
### Relationship with Kubernetes
139-
140-
Just as `podman` does not depend on a Kubernetes API server, `bootc` will also not depend on one.
141-
142-
However, there are also plans for `bootc` to also understand Kubernetes API types. See [configmap/secret support](https://github.com/containers/bootc/issues/22) for example.
143-
144-
Perhaps in the future we may actually support some kind of `Pod` analogue for representing the host state. Or we may define a [CRD](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) which can be used inside and outside of Kubernetes.
145-
146-
### Relationship with rpm-ostree
147-
148-
Today rpm-ostree directly links to `ostree-rs-ext`, and hence
149-
gains all the same container functionality. This will likely
150-
continue. For example, with rpm-ostree (or, perhaps re-framed as
151-
"dnf image"), it will continue to work to e.g. `dnf install`
152-
(i.e. `rpm-ostree install`) on the *client side* system. However, `bootc upgrade` would
153-
(should) then error out as it will not understand how to upgrade
154-
the system.
155-
156-
rpm-ostree also has significant other features such as
157-
`rpm-ostree kargs` etc.
158-
159-
Overall, rpm-ostree is used in several important projects
160-
and will continue to be maintained for many years to come.
161-
162-
However, for use cases which want a "pure" image based model,
163-
using `bootc` will be more appealing. bootc also does not
164-
e.g. drag in dependencies on `libdnf` and the RPM stack.
165-
166-
bootc also has the benefit of starting as a pure Rust project;
167-
and while it [doesn't have an IPC mechanism today](https://github.com/containers/bootc/issues/4), the surface
168-
of such an API will be significantly smaller.
169-
170-
Further, bootc does aim to [include some of the functionality of zincati](https://github.com/containers/bootc/issues/5).
171-
172-
But all this said: *It will be supported to use both bootc and rpm-ostree together*; they are not exclusive.
173-
For example, `bootc status` at least will still function even if packages are layered.
174-
175-
### Relationship with Fedora CoreOS (and Silverblue, etc.)
176-
177-
Per above, it is a toplevel goal to support a seamless, transactional update from existing OSTree based systems, which includes these Fedora derivatives.
178-
179-
For Fedora CoreOS specifically, see [this tracker issue](https://github.com/coreos/fedora-coreos-tracker/issues/1446).
180-
181-
See also [OstreeNativeContainerStable](https://fedoraproject.org/wiki/Changes/OstreeNativeContainerStable).
182-
183-
# More links
184-
185-
- https://coreos.github.io/rpm-ostree/container/
186-
- https://github.com/coreos/layering-examples
18+
# More information
18719

20+
See the [project documentation](https://containers.github.io/bootc/).

docs/Gemfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Bundler setup for jekyll to be deployed on github pages.
2+
3+
source "https://rubygems.org"
4+
5+
# Note that we're using the github-pages gem to mimic the GitHub pages
6+
# automated setup. That installs jekyll, a default set of jekyll
7+
# plugins, and a modified jekyll configuration.
8+
group :jekyll_plugins do
9+
gem "github-pages"
10+
gem "jekyll-remote-theme"
11+
end
12+
13+
# Prefer the GitHub flavored markdown version of kramdown.
14+
gem "kramdown-parser-gfm"

docs/_config.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
title: containers/bootc
2+
description: bootc documentation
3+
baseurl: "/bootc"
4+
url: "https://containers.github.io"
5+
# Comment above and use below for local development
6+
# url: "http://localhost:4000"
7+
permalink: /:title/
8+
markdown: kramdown
9+
kramdown:
10+
typographic_symbols:
11+
ndash: "--"
12+
mdash: "---"
13+
14+
# Exclude the README and the bundler files that would normally be
15+
# ignored by default.
16+
exclude:
17+
- README.md
18+
- Gemfile
19+
- Gemfile.lock
20+
- prep-docs.sh
21+
- vendor/
22+
23+
# These are copies of the apidoc/html and man/html directories. Run
24+
# prep-docs.sh before jekyll to put it in place.
25+
include: [reference, man]
26+
27+
remote_theme: just-the-docs/[email protected]
28+
plugins:
29+
- jekyll-remote-theme
30+
31+
color_scheme: coreos
32+
33+
# Aux links for the upper right navigation
34+
aux_links:
35+
"bootc on GitHub":
36+
- "https://github.com/containers/bootc"
37+
38+
footer_content: "Copyright &copy; <a href=\"https://www.redhat.com\">Red Hat, Inc.</a> and <a href=\"https://github.com/containers\">others</a>."
39+
40+
# Footer last edited timestamp
41+
last_edit_timestamp: true
42+
last_edit_time_format: "%b %e %Y at %I:%M %p"
43+
44+
# Footer "Edit this page on GitHub" link text
45+
gh_edit_link: true
46+
gh_edit_link_text: "Edit this page on GitHub"
47+
gh_edit_repository: "https://github.com/containers/bootc"
48+
gh_edit_branch: "main"
49+
gh_edit_source: docs
50+
gh_edit_view_mode: "tree"
51+
52+
compress_html:
53+
clippings: all
54+
comments: all
55+
endings: all
56+
startings: []
57+
blanklines: false
58+
profile: false

docs/_sass/color_schemes/coreos.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
$link-color: #53a3da;

docs/bootc-images.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Understanding "bootc compatible" images
1+
---
2+
nav_order: 2
3+
---
4+
5+
# "bootc compatible" images
26

37
At the current time, it does not work to just do:
48
```

0 commit comments

Comments
 (0)