Radish alpha
r
rad:zwTxygwuz5LDGBq255RA2CbNGrz8
Radicle CI broker
Radicle
Git
docs(doc/install.md): oops, add the installation document to Git
Merged liw opened 11 months ago

Had forgotten to add that. Bummer.

Signed-off-by: Lars Wirzenius liw@liw.fi

1 file changed +74 -0 af581de2 5ae86e91
added doc/install.md
@@ -0,0 +1,74 @@
+
# Installing Radicle CI with Ambient on Debian
+

+
* Make sure the following are installed:
+
  - `curl`
+
  - `xz` (in Debian, `xz-utils` package)
+
  - `genisoimage`
+
  - `xorriso`
+
* Install Radicle:
+
  - `curl -sSf https://radicle.xyz/install | sh`
+
  - `rad auth`
+
  - `rad node start`
+
* Make sure the node has at least a test repository:
+
  - `rad seed rad:z28U8KUBvVSMQc13NydX3LBDsdEdQ`
+
* Install relevant software from `deb` packages on <http://apt.liw.fi/>:
+
  - follow instructions to add the repository to your `sources.list`
+
  - `sudo apt install radicle-ci-broker radicle-ci-ambient ambient-ci`
+
* Download a VM image:
+
  - `curl https://files.liw.fi/ambient/ambient.qcow2.xz | unxz > ambient.qcow2`
+
* Create `~/ci-broker.yaml` (adjust paths so they refer to your home
+
  directory; make sure all the directories exist):
+

+
~~~yaml
+
db: /home/_rad/ci-broker.db
+
report_dir: /srv/http
+
queue_len_interval: 1min
+
adapters:
+
  ambient:
+
    command: /bin/radicle-ci-ambient
+
    env:
+
      RADICLE_CI_AMBIENT: /home/_rad/radicle-ci-ambient.yaml
+
      RADICLE_CI_BROKER_WEBROOT: /srv/pages/ci-broker
+
      PATH: /bin:/home/_rad/.radicle/bin:/home/_rad/.cargo/bin
+
triggers:
+
  - adapter: ambient
+
    filters:
+
    - !And
+
      - !HasFile ".radicle/ambient.yaml"
+
      - !Or
+
        - !DefaultBranch
+
        - !PatchCreated
+
        - !PatchUpdated
+
~~~
+

+
* Create `~/.config/ambient/config.yaml` (adjust the various fields
+
  for how much resource usage want to allow, and paths):
+

+
~~~yaml
+
tmpdir: /tmp
+
projects: ~/ambient-projects.yaml
+
executor: /usr/bin/ambient-execute-plan
+
artifacts_max_size: 10G
+
cache_max_size: 50G
+
state: /home/_rad/ambient-state
+
qemu:
+
  cpus: 8
+
  memory: 16G
+
~~~
+

+
* Create `~/radicle-ci-ambient.yaml` (adjust paths again):
+

+
~~~yaml
+
image: /home/_rad/ambient.qcow2
+
logdir: /srv/http/ambient-log
+
log: /home/_rad/radicle-ci-ambient.log
+
base_url: "https://ci0.liw.fi//ambient-log"
+
~~~
+

+
* Start the CI broker in the foreground:
+
  - `cib --config ci-broker.yaml --log-level info process-events`
+
* In another terminal or shell sessions, trigger a run:
+
  - `cibtool --db ci-broker.db trigger --repo radicle-ci-example`
+
  - there should be several lines of log messages from `cib`
+
* Check result:
+
  - `cibtool --db ci-broker.db run list --json`