I’ve only tested this on Linux and the Intel architecture. You need to have qemu-system-x86
installed, and your computer should allow you to use the Linux kernel kvm
module.
Install
To use Ambient, you need to install the ambient
executable. For now, the only supported way is by building from source, using the Rust toolchain:
cargo install ambient-ci
This installs the latest release from crates.io
.
Get virtual machine image
Download a virtual machine image, and unpack it.
curl https://files.liw.fi/ambient/ambient.qcow2.xz | unxz > ambient.qcow2
Create a projects file
Create a file projects.yaml
with the following content:
projects:
demo:
image: /scratch/ambient-images/ambient-boot.qcow2
source: /scratch/demo
plan:
- action: shell
shell: |
echo hello, world
Create a configuration file
Create ~/.config/ambient/config.yaml
with the following content:
tmpdir: /scratch/tmp
log: /scratch/ambient.log
target: _ewww@webby:/srv/http
dput_target: apt.liw.fi
run_ci: /usr/bin/run-ci
cpus: 4
memory: 8G
cache_max_size: 10G
state: /scratch/ambient-state
Adjust as needed.
Run CI
AMBIENT_LOG=info ambient ambient.yaml
Read the log file from the location specified in the configuration file.