1 #+title: infra/quickstart
2 #+description: Infra Quickstart Guide
3 #+property: header-args :dir /home/ellis/comp/infra/
4 #+property: header-args:dot :dir /tmp/ :file bootstrap.svg
5 #+setupfile: ../../clean.theme
6 #+infojs_opt: toc:nil home:https://compiler.company up:./ view:overview
10 :ID: bbb86596-4be5-4f5e-8854-9ea28b077879 17 - *Minimum Dependencies* 25 :ID: b906e6ea-71c2-41ae-9c29-c911582f054e 27 #+begin_src lisp :results none :exports none 28 (ql:quickload '(:dat :cli))
30 (let ((g (make-instance 'directed-graph)))
32 (add-node g :bootstrap)
34 (add-node g "profile.sxp")
35 (add-node g "host.sxp")
36 (add-edge g '(:check "host.sxp"))
37 (add-edge g '(:bootstrap :check))
38 (add-edge g '(:bootstrap :autogen))
39 (add-edge g '("profile.sxp" :autogen))
40 (add-edge g '("host.sxp" :autogen))
41 (to-dot-file g #p"/tmp/bootstrap.dot")
42 ;; (sb-ext:run-program (cli:find-exe "dot") (list "-Tsvg" "/tmp/bootstrap.dot" "-o" "/tmp/bootstrap.svg"))
46 [[cdn:media/img/bootstrap.svg]] 48 The easiest way to get started is to run the top-level script
49 =bootstrap.sh=. Running the script will:
52 - install the latest cores and lisp runtime from
53 https://packy.compiler.company to the stash
54 - load
=autogen.lisp= and call the function
=infra/autogen:autogen= 55 - check and apply the host config and profile
56 - build all features in parallel
58 [[cdn:media/clip/infra-bootstrap.gif]] 60 Upon completion a local
=stash= directory is provisioned. At this
61 point we no longer need to depend on shell scripting as we have a
62 fully interactive Lisp environment to hack on our builds with.
64 From here, you may run
=skel inspect= to inspect the infra
=skelfile= 65 and select a target to build on your machine or in a container. Use
66 =skel --help= for a list of other commands.
70 :ID: 6a7b9d91-b22b-4534-9ff4-7ef5b71aca5c 72 This script checks that the current host is qualified. It needs to be
73 ran once before the
=autogen.lisp= file is loaded, usually via
76 This will interrogate the system, checking for minimum
77 requirements. If any requirement isn't met an error is signaled. On
78 completion, the name of an SXP file is printed which contains the host
81 The minimum software dependencies above should be installed via your
82 system's package manager.
93 :ID: cd5c94d4-bb53-4b1b-9898-320711e62a85 95 Once a core and lisp runtime are available, we load
=autogen.lisp= and
96 call
=infra/autogen:autogen=. This will process the host configuration
97 (
=zor.sxp= in the example above) and the profile (defaults to
98 =default.sxp=), update environment variables for the current shell and
99 take any additional actions needed.
101 The order of operations are loosely as follows:
103 - update host environment variables
104 - check features and ensure host dependencies
106 - initialize infra
=skelfile= 107 - process all features
112 :ID: 02b3701a-b969-473b-9dbd-ac4815f9d284 114 Deploy
=infra= builds to a remote.
116 Deployment involves 'packing' a target found in
=stash=, archiving it,
117 compressing it, and sending it to a remote location possibly with a
118 signature, checksum, or other metadata, and possibly encrypted. A
119 'package' may also be a raw directory of plain-text files. It's a very
120 loose term. Where the package ends up and how it is packed depends on
121 the build-config and skelfile slots.
123 Production deployments end up at https://packy.compiler.company.
127 :ID: 26107fe5-6f4a-4fe5-9bdf-e35947bc7198 129 Install core packages locally.