Skip to content

Commit 0890f5f

Browse files
cgwaltersjlebon
authored andcommitted
docs: Document cosa build-fast
I was surprised this was omitted. Came up in chat.
1 parent f8ef5a8 commit 0890f5f

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

docs/working.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,43 @@ In the future, it's likely coreos-assembler will also support something
111111
like `overrides/src` which could be a directory of symlinks to local
112112
git repositories.
113113

114-
## Using cosa run --bind-ro for even faster iteration
114+
## Using cosa build-fast
115115

116116
If you're working on e.g. the kernel or Ignition (things that go into the initramfs),
117117
then you probably need a `cosa build` workflow (or `cosa buildinitramfs-fast`, see below).
118-
However, let's say you want to test a change to something much later in the boot process - e.g. `podman`. Rather
118+
However, let's say you want to test a change to something that runs purely in the real root,
119+
such as e.g. `rpm-ostree`, `podman`, or `console-login-helper-messages`. Rather
119120
than doing a full image build each time, a fast way to test out changes is to use
120-
something like this:
121+
`cosa build-fast`.
122+
123+
This command assumes you have a previous local coreos-assembler build. From
124+
the git checkout of the project you want to add:
125+
126+
```
127+
$ export COSA_DIR=/srv/builds/fcos
128+
$ cosa build-fast
129+
$ cosa run
130+
```
131+
132+
The `cosa build-fast` command will run `make` and inject the resulting binaries
133+
on a qcow2 overlay file, which will appear in your project working directory.
134+
The `cosa run` command similarly knows to look for these `qcow2` files.
135+
136+
This will not affect the "real" cosa build in `/srv/builds/fcos`, but will
137+
use it as a data source.
138+
139+
## Using cosa run --bind-ro for even faster iteration
140+
141+
This workflow can be used alongside `cosa build-fast`, or separate from it.
142+
If you invoke e.g.
121143

122144
```
123145
$ cosa run --bind-ro ~/src/github/containers/podman,/run/workdir
124146
```
125147

148+
The target VM will have the source directory bound in `/run/workdir`; then you
149+
can directly copy binaries from your development environment into the VM.
150+
126151
If you are running cosa in a container, you will have to change your current
127152
working directory to a parent directory common to both project directories and
128153
use relative paths:

0 commit comments

Comments
 (0)