aboutsummaryrefslogtreecommitdiff
path: root/doc/manual.cli
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-03-24 10:10:56 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-03-24 10:10:56 +0200
commit519557ffe8d6c88d1cb6fdb9120b06185042cd99 (patch)
tree0e820cceb4f24fe6cf9f55e7647d5d923c32d35d /doc/manual.cli
parent603657a166bff4a16606a2575364446171466af6 (diff)
Setup docs infra
Diffstat (limited to 'doc/manual.cli')
-rw-r--r--doc/manual.cli117
1 files changed, 117 insertions, 0 deletions
diff --git a/doc/manual.cli b/doc/manual.cli
new file mode 100644
index 0000000..22cbd13
--- /dev/null
+++ b/doc/manual.cli
@@ -0,0 +1,117 @@
+// file : doc/manual.cli
+// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+"\name=build2-buildos-manual"
+"\subject=buildos"
+"\title=Operating System"
+
+// NOTES
+//
+// - Maximum <pre> line is 70 characters.
+//
+
+"
+\h0#preface|Preface|
+
+This document describes \c{buildos}, the \c{build2} operating system.
+
+\h1#intro|Introduction|
+
+\c{buildos} is a GNU/Linux(Debian)-based in-memory network-booted operating
+system specialized for autonomous building of software using the \c{build2}
+toolchain. It's primary purpose is to run the \c{build2} build bot (\c{bbot}),
+build slave (\c{bslave}), or both.
+
+A machine that run an instance of \c{buildos} is called a \i{build host}. A
+build host runs the \c{bbot} and/or \c{bslave} in the \i{agent mode}. The
+actual building is performed in the virtual machines and/or containers. For
+\c{bbot} it is normally one-shot virtual machines and for \c{bslave} it is
+normally containers but can also be long-running virtual machines. Inside
+virtual machines/containers, \c{bbot} and \c{bslave} run in the \i{worker
+mode} and receive \i{build tasks} from their respective agents.
+
+\h1#boot|Booting|
+
+\c{buildos} is normally booted from the network using PXE but can also be
+booted locally from initrd directly.
+
+\h2#boot-net|Network|
+
+Here we assume that you have already established your PXE setup using
+PXELINUX. That is, you have configured a TFTP server that hosts the
+\c{pxelinux} initial bootstrap program (NBP) and configured a DHCP
+server to direct PXE client to this server/NBP.
+
+To setup PXE boot of \c{buildos}, perform the following steps:
+
+\ol|
+
+\li|Copy the kernel image and initrd to the TFTP server. For example:
+
+\
+# mkdir -p /var/lib/tftpboot/buildos
+# cp buildos-image buildos-initrd /var/lib/tftpboot/buildos/
+\
+
+|
+
+\li|Assuming the host has MAC address \c{de:ad:be:ef:b8:da}, create a
+ host-specific configuration file (or use \c{default} as the last path
+ component for a configuration that applies to all the hosts):
+
+\
+# cat <<EOF >/var/lib/tftpboot/pxelinux.cfg/01-de-ad-be-ef-b8-da
+default buildos
+prompt 1
+timeout 50
+
+label buildos
+ menu label buildos
+ kernel /buildos/buildos-image
+ append initrd=/buildos/buildos-initrd
+EOF
+\
+
+|
+
+\li|You can test the setup using QEMU/KVM, for example:
+
+\
+$ sudo kvm \
+ -m 8G \
+ -netdev tap,id=net0,script=./qemu-ifup \
+ -device e1000,netdev=net0,mac=de:ad:be:ef:b8:da \
+ -boot n
+\
+
+||
+
+\h2#boot-local|Local|
+
+During testing it is often useful to boot \c{buildos} directly from the
+kernel image and initrd files. As an example, here is how this can be done
+using QEMU/KVM:
+
+\
+sudo kvm \
+ -m 8G \
+ -netdev tap,id=net0,script=./qemu-ifup \
+ -device e1000,netdev=net0,mac=de:ad:be:ef:b8:da \
+ -kernel buildos-image -initrd buildos-initrd
+\
+
+\h1#config|Configuration|
+
+\h2#config-net|Network|
+
+Network is configured via DHCP. All Ethernet intrface that have carrier are
+tried in (some) order and the first interface that is successfully configured
+via DHCP is used.
+
+Hostname is configured from the DHCP information. Failed that, a name is
+generated based on the MAC address, in the form \c{build-xxxxxxxxxx}.
+
+@@ Maybe also kernel cmdline.
+
+"