Skip to content

Commit 320af9e

Browse files
committed
README.md: Add docs/guides for tag strategy switching
Update `README.md` after we swtiched to `gYYYYY` git sha1 tagging from `vXX` counter tagging. Change example to pull an evolving `latest` for x86_64, aarch64 and `latest-riscv` for riscv64. Signed-off-by: Ruoqing He <[email protected]>
1 parent 0c21d2c commit 320af9e

File tree

1 file changed

+36
-26
lines changed

1 file changed

+36
-26
lines changed

README.md

+36-26
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22

33
**`rustvmm/dev`** is a container with all dependencies used for running
44
`rust-vmm` integration and performance tests. The container is available on
5-
Docker Hub and has support for `x86_64` and `aarch64` platforms.
5+
Docker Hub and has support for `x86_64` `aarch64` and `riscv64` platforms.
66

7-
For the latest available tag, please check the `rustvmm/dev` builds available
8-
on [Docker Hub](https://hub.docker.com/r/rustvmm/dev/tags).
7+
The latest available tag is `latest` for `x86_64` and `aarch64` and
8+
`latest-riscv` for `riscv64`. If you want `git sha1` lables or previously used
9+
`vN` counter lables, please check the `rustvmm/dev` builds available on
10+
[Docker Hub](https://hub.docker.com/r/rustvmm/dev/tags).
11+
12+
Note: we used counter tagging `vN` for `rustvmm/dev` until `v49`, but now we
13+
switch to `git sha1` tagging. Details are records in #121.
914

1015
## Know Issues
1116

@@ -16,21 +21,25 @@ For now rust is installed only for the root user.
1621
The container is currently used for running the integration tests for the
1722
majority of rust-vmm crates.
1823

19-
Example of running cargo build on the kvm-ioctls crate:
24+
Example of running cargo build on the kvm crate:
2025

2126
```bash
22-
> git clone [email protected]:rust-vmm/kvm-ioctls.git
23-
> cd kvm-ioctls/
24-
> docker run --volume $(pwd):/kvm-ioctls \
25-
rustvmm/dev:$VERSION \
26-
/bin/bash -c "cd /kvm-ioctls && cargo build --release"
27+
> git clone https://github.com/rust-vmm/kvm.git
28+
> cd kvm
29+
# latest for x86_64 and aarch64, latest-riscv for riscv64
30+
> docker run --volume $(pwd):/kvm \
31+
rustvmm/dev:latest \
32+
/bin/bash -c "cd /kvm && cargo build --release"
2733
Downloading crates ...
28-
Downloaded libc v0.2.48
29-
Downloaded kvm-bindings v0.1.1
30-
Compiling libc v0.2.48
31-
Compiling kvm-bindings v0.1.1
32-
Compiling kvm-ioctls v0.0.1 (/kvm-ioctls)
33-
Finished release [optimized] target(s) in 5.63s
34+
Downloaded bitflags v1.3.2
35+
Downloaded vmm-sys-util v0.12.1
36+
Compiling libc v0.2.169
37+
Compiling bitflags v1.3.2
38+
Compiling kvm-ioctls v0.20.0 (/kvm/kvm-ioctls)
39+
Compiling bitflags v2.8.0
40+
Compiling vmm-sys-util v0.12.1
41+
Compiling kvm-bindings v0.11.0 (/kvm/kvm-bindings)
42+
Finished `release` profile [optimized] target(s) in 6.34s
3443
```
3544

3645
## Testing Changes locally with the Container Image
@@ -44,19 +53,20 @@ To do this, first build the rust-vmm container locally by running the commands
4453
> ./docker.sh build
4554
```
4655

47-
since this command will build a new docker image with tag latest version + 1
48-
and will alias it with "latest" tag, when testing the container check the output
49-
of the `./docker.sh build` command and you will see the tag that will be published
50-
with your PR to be sure that the changes introduced by your PR to the CI works
51-
correctly before pusing it upstream.
52-
Example of this output is `Build completed for rustvmm/dev:v38_x86_64`
56+
since this command will build a new docker image with tag `g$(git show -s
57+
--format=%h)` and will alias it with "latest" tag, when testing the container
58+
check the output of the `./docker.sh build` command and you will see the tag
59+
that will be published with your PR to be sure that the changes introduced by
60+
your PR to the CI works correctly before pusing it upstream.
61+
Example of this output is `Build completed for rustvmm/dev:g0c21d2c_x86_64`
5362

54-
Example of how to test the container on your localhost with tag v38_x86_64:
63+
Example of how to test the container on your localhost with tag
64+
`g0c21d2c_x86_64`:
5565

5666
```bash
5767
> docker run --device=/dev/kvm -it --rm \
5868
--volume $(pwd):/path/to/workdir --workdir /path/to/workdir \
59-
--privileged rustvmm/dev:v38_x86_64
69+
--privileged rustvmm/dev:g0c21d2c_x86_64
6070
```
6171
The `--workdir /workdir` option ensures that when the container starts,
6272
the working directory inside the container is set to `/workdir`
@@ -100,9 +110,9 @@ On an `aarch64` platform:
100110
You will need to redo all steps on an `x86_64` platform so the containers are
101111
kept in sync (same package versions on both `x86_64` and `aarch64`).
102112

103-
Now that the tags `v4_x86_64` and `v4_aarch64` are pushed to Docker Hub, we can
104-
go ahead and also create a new version tag that points to these two builds
105-
using
113+
Now that the tags `g0c21d2c_x86_64` and `g0c21d2c_aarch64` are pushed to Docker
114+
Hub, we can go ahead and also create a new version tag that points to these two
115+
builds using
106116
[docker manifest](https://docs.docker.com/engine/reference/commandline/manifest/).
107117

108118
```bash

0 commit comments

Comments
 (0)