# CI-tron - Bare-metal CI infrastructure

You have successfully generated a disk image for your mupuf CI gateway!


## Hardware setup

Please refer to [CI-tron's hardware requirements](https://docs.ci-tron.dev/installation_and_development.html#hardware-requirements)
for an up-to-date information.


## Flashing instructions

In order to make use of it, you will need to:

 * [Download your disk image](https://demo.ci-tron.dev/bucket/hw-mupuf/hw-mupuf-generic_x86_64.img.xz)
 * Uncompress it using: `xz -d hw-mupuf-generic_x86_64.img.xz`
 * Flash it, according to the instructions found in the [target-specific README](https://demo.ci-tron.dev/machine/mupuf/view/hw-mupuf-generic_x86_64.img.README.md)


## Boot sequence

You may now boot your CI gateway which should go through the following boot stages:

  * Firmware;
  * iPXE bootloader:
    * Get a local IP address using DHCP;
    * Download and execute the boot script from [boot/boot.ipxe](https://demo.ci-tron.dev/machine/mupuf/view/boot/boot.ipxe)
    * Download the kernel, modules, firmware, and initramfs of boot2container (https://gitlab.freedesktop.org/gfx-ci/boot2container);
    * Boot the wanted configuration.
 * Boot2container:
    * Get an IP address using DHCP;
    * Download the secret part of the command line which contains per-boot
      credentials to the configuration bucket;
    * Find and mount the most appropriate block device to use as a cache device
      among unpartitioned drives or partitions (see `gateway_cache_device` in
      [boot/boot.ipxe](https://demo.ci-tron.dev/machine/mupuf/view/boot/boot.ipxe));
    * Download and run the wanted CI-tron image (see `gateway_img_path` in
      [boot/boot.ipxe](https://demo.ci-tron.dev/machine/mupuf/view/boot/boot.ipxe)).
  * CI-tron:
    * Boot using systemd;
    * Load the dashboard on the current virtual terminal.


## Usage

Please consult [CI-tron's documentation](https://docs.ci-tron.dev) for further
guidance on how to interact with your CI gateway!


## Known issues

### All

 1. Changes in the `config/` folder using the web UI (or by mounting the S3
    bucket) while the machine is running will not be propagated back to the
    machine, and any change done on the machine will override any edits done
    from the outside. The content of the `config/` folder is only synced
    from the boot server to the machine at boot time. Once the machine is
    booted, only changes happening on the machine will be synchronized back
    to the boot server.


