diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-12-16 12:02:31 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-12-23 09:31:27 +0200 |
commit | 5244cbfe8e84beaa253bdf2c04cf7495d7e7cd1f (patch) | |
tree | c0aabc59dbf82eb8b11c1afdeae56ea6014a70d1 | |
parent | 6df0772dbdfcc948b9bf16bd59a3aa69d05121b9 (diff) | |
download | ambient-build-vm-5244cbfe8e84beaa253bdf2c04cf7495d7e7cd1f.tar.gz |
docs: update README about ambient-boot, scripts
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Sponsored-by: author
-rw-r--r-- | README.md | 28 |
1 files changed, 23 insertions, 5 deletions
@@ -9,7 +9,7 @@ A software developer would use this program to create an image for a build virtual machine like this: ```sh -$ ambient-build-vm --image=my.qcow2 +$ ./ambient-build-vm --image=my.qcow2 ``` This will take several minutes to run, but will produce the file @@ -28,11 +28,20 @@ See <https://ambient.liw.fi/> for more information about Ambient. ## Requirements * MUST build a Debian VM with desired software installed. +* MUST run the `run-ci` script provided in a tar archive on + `/dev/vdb`. ## Architecture `ambient-build-vm` runs [vmdb2](https://vmdb2.liw.fi/) to build a -Debian image. Support for other systems will be added later. +Debian image. Support for other operating systems will be added later. + +The built image itself is set up to run the `ambient-boot` script at +boot up, and then power off. The boot script output is redirected to +`/dev/ttyS1`, so that it can be captured. The script unpacks a tar +archive from `/dev/vdb` into a temporary directory, and runs +`./run-ci` in that directory. The `run-ci` executable does whatever is +needed to be done to run CI on a project. ## Building @@ -41,12 +50,21 @@ from the source tree. It doesn't need to be built. ## Testing -Build image. Use it with `ambient-run`, and if the build succeeds, be -happy. +To also test the built image, to ensure it works as expected for +Ambient CI, the `build-and-test.sh` script can be used: + +~~~sh +$ ./build-and-test my.qcow2 /tmp +~~~ + +This builds the image, by running `ambient-build-vm`, and then runs it +under QEMU to make sure it works. The running should add about 10 or +20 seconds to the run time. You need `kvm` installed and configured. ## Deployment -Not supported at this time. +There is Debian packaging. You can build the `.deb` package and +install that. ## Contributing |