changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > org > docs / infra/quickstart.org

changeset 33: aefeb7103fb8
parent: f3811af6b10d
child: bc53e27c0163
author: Richard Westhaver <ellis@rwest.io>
date: Tue, 18 Jun 2024 17:13:54 -0400
permissions: -rw-r--r--
description: update infra/quickstart
1 #+title: infra/quickstart
2 #+author: Richard Westhaver
3 #+email: ellis@rwest.io
4 #+description: Infra Quickstart Guide
5 #+property: header-args :dir /home/ellis/comp/infra/
6 #+setupfile: ../../clean.theme
7 - *Host Requirements*
8  - x86_64 4 core CPU
9  - 8G RAM
10  - 32G Disk Space
11  - Linux kernel
12 
13 - *Minimum Dependencies*
14  - mercurial
15  - git
16  - zstd
17 
18 * bootstrap.sh
19 
20 The easiest way to get started is to run the top-level script
21 =bootstrap.sh=. Running the script will:
22 
23 - run =check.sh=
24 - install the latest cores and lisp runtime from
25  https://packy.compiler.company to the stash
26 - load =autogen.lisp= and call the function =infra/autogen:autogen=
27  - check and apply the host config and profile
28  - build all features in parallel
29 
30 [[cdn:media/clip/infra-bootstrap.gif]]
31 
32 Upon completion a local =stash= directory is provisioned. At this
33 point we no longer need to depend on shell scripting as we have a
34 fully interactive Lisp environment to hack on our builds with.
35 
36 From here, you may run =skel inspect= to inspect the infra =skelfile=
37 and select a target to build on your machine or in a container. Use
38 =skel --help= for a list of other commands.
39 
40 ** check.sh
41 This script checks that the current host is qualified. It needs to be
42 ran once before the =autogen.lisp= file is loaded, usually via
43 =bootstrap.sh=.
44 
45 This will interrogate the system, checking for minimum
46 requirements. If any requirement isn't met an error is signaled. On
47 completion, the name of an SXP file is printed which contains the host
48 config.
49 
50 The minimum software dependencies above should be installed via your
51 system's package manager.
52 
53 #+begin_src shell
54 ./check.sh
55 #+end_src
56 
57 #+RESULTS:
58 : zor.sxp
59 
60 ** autogen.lisp
61 Once a core and lisp runtime are available, we load =autogen.lisp= and
62 call =infra/autogen:autogen=. This will process the host configuration
63 (=zor.sxp= in the example above) and the profile (defaults to
64 =default.sxp=), update environment variables for the current shell and
65 take any additional actions needed.
66 
67 The order of operations are loosely as follows:
68 - initialize profile
69 - update host environment variables
70 - check features and ensure host dependencies
71 - initialize host
72 - initialize infra =skelfile=
73 - process all features
74 - quit
75 
76 * TODO deploy.lisp
77 Deploy =infra= builds to a remote.
78 
79 Deployment involves 'packing' a target found in =stash=, archiving it,
80 compressing it, and sending it to a remote location possibly with a
81 signature, checksum, or other metadata, and possibly encrypted. A
82 'package' may also be a raw directory of plain-text files. It's a very
83 loose term. Where the package ends up and how it is packed depends on
84 the build-config and skelfile slots.
85 
86 Production deployments end up at https://packy.compiler.company.
87 
88 * TODO install.lisp
89 Install core packages locally.