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
7 #+property: header-args :eval no-export* Overview
9 :ID: bbb86596-4be5-4f5e-8854-9ea28b077879 16 - *Minimum Dependencies* 24 :ID: b906e6ea-71c2-41ae-9c29-c911582f054e 26 #+begin_src lisp :results none :exports none 27 (ql:quickload '(:dat :cli))
29 (let ((g (make-instance 'directed-graph)))
31 (add-node g :bootstrap)
33 (add-node g "profile.sxp")
34 (add-node g "host.sxp")
35 (add-edge g '(:check "host.sxp"))
36 (add-edge g '(:bootstrap :check))
37 (add-edge g '(:bootstrap :autogen))
38 (add-edge g '("profile.sxp" :autogen))
39 (add-edge g '("host.sxp" :autogen))
40 (to-dot-file g #p"/tmp/bootstrap.dot")
41 ;; (sb-ext:run-program (cli:find-exe "dot") (list "-Tsvg" "/tmp/bootstrap.dot" "-o" "/tmp/bootstrap.svg"))
45 [[cdn:media/img/bootstrap.svg]] 47 The easiest way to get started is to run the top-level script
48 =bootstrap.sh=. Running the script will:
51 - install the latest cores and lisp runtime from
52 https://packy.compiler.company to the stash
53 - load
=autogen.lisp= and call the function
=infra/autogen:autogen= 54 - check and apply the host config and profile
55 - build all features in parallel
57 [[cdn:media/clip/infra-bootstrap.gif]] 59 Upon completion a local
=stash= directory is provisioned. At this
60 point we no longer need to depend on shell scripting as we have a
61 fully interactive Lisp environment to hack on our builds with.
63 From here, you may run
=skel inspect= to inspect the infra
=skelfile= 64 and select a target to build on your machine or in a container. Use
65 =skel --help= for a list of other commands.
69 :ID: 6a7b9d91-b22b-4534-9ff4-7ef5b71aca5c 71 This script checks that the current host is qualified. It needs to be
72 ran once before the
=autogen.lisp= file is loaded, usually via
75 This will interrogate the system, checking for minimum
76 requirements. If any requirement isn't met an error is signaled. On
77 completion, the name of an SXP file is printed which contains the host
80 The minimum software dependencies above should be installed via your
81 system's package manager.
92 :ID: cd5c94d4-bb53-4b1b-9898-320711e62a85 94 Once a core and lisp runtime are available, we load
=autogen.lisp= and
95 call
=infra/autogen:autogen=. This will process the host configuration
96 (
=zor.sxp= in the example above) and the profile (defaults to
97 =default.sxp=), update environment variables for the current shell and
98 take any additional actions needed.
100 The order of operations are loosely as follows:
102 - update host environment variables
103 - check features and ensure host dependencies
105 - initialize infra
=skelfile= 106 - process all features
111 :ID: 02b3701a-b969-473b-9dbd-ac4815f9d284 113 Deploy
=infra= builds to a remote.
115 Deployment involves 'packing' a target found in
=stash=, archiving it,
116 compressing it, and sending it to a remote location possibly with a
117 signature, checksum, or other metadata, and possibly encrypted. A
118 'package' may also be a raw directory of plain-text files. It's a very
119 loose term. Where the package ends up and how it is packed depends on
120 the build-config and skelfile slots.
122 Production deployments end up at https://packy.compiler.company.
126 :ID: 26107fe5-6f4a-4fe5-9bdf-e35947bc7198 128 Install core packages locally.