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
14 - *Minimum Dependencies* 21 #+begin_src lisp :results none :exports none 22 (ql:quickload '(:dat :cli))
24 (let ((g (make-instance 'directed-graph)))
26 (add-node g :bootstrap)
28 (add-node g "profile.sxp")
29 (add-node g "host.sxp")
30 (add-edge g '(:check "host.sxp"))
31 (add-edge g '(:bootstrap :check))
32 (add-edge g '(:bootstrap :autogen))
33 (add-edge g '("profile.sxp" :autogen))
34 (add-edge g '("host.sxp" :autogen))
35 (to-dot-file g #p"/tmp/bootstrap.dot")
36 ;; (sb-ext:run-program (cli:find-exe "dot") (list "-Tsvg" "/tmp/bootstrap.dot" "-o" "/tmp/bootstrap.svg"))
40 [[cdn:media/img/bootstrap.svg]] 42 The easiest way to get started is to run the top-level script
43 =bootstrap.sh=. Running the script will:
46 - install the latest cores and lisp runtime from
47 https://packy.compiler.company to the stash
48 - load
=autogen.lisp= and call the function
=infra/autogen:autogen= 49 - check and apply the host config and profile
50 - build all features in parallel
52 [[cdn:media/clip/infra-bootstrap.gif]] 54 Upon completion a local
=stash= directory is provisioned. At this
55 point we no longer need to depend on shell scripting as we have a
56 fully interactive Lisp environment to hack on our builds with.
58 From here, you may run
=skel inspect= to inspect the infra
=skelfile= 59 and select a target to build on your machine or in a container. Use
60 =skel --help= for a list of other commands.
63 This script checks that the current host is qualified. It needs to be
64 ran once before the
=autogen.lisp= file is loaded, usually via
67 This will interrogate the system, checking for minimum
68 requirements. If any requirement isn't met an error is signaled. On
69 completion, the name of an SXP file is printed which contains the host
72 The minimum software dependencies above should be installed via your
73 system's package manager.
83 Once a core and lisp runtime are available, we load
=autogen.lisp= and
84 call
=infra/autogen:autogen=. This will process the host configuration
85 (
=zor.sxp= in the example above) and the profile (defaults to
86 =default.sxp=), update environment variables for the current shell and
87 take any additional actions needed.
89 The order of operations are loosely as follows:
91 - update host environment variables
92 - check features and ensure host dependencies
94 - initialize infra
=skelfile= 95 - process all features
99 Deploy
=infra= builds to a remote.
101 Deployment involves 'packing' a target found in
=stash=, archiving it,
102 compressing it, and sending it to a remote location possibly with a
103 signature, checksum, or other metadata, and possibly encrypted. A
104 'package' may also be a raw directory of plain-text files. It's a very
105 loose term. Where the package ends up and how it is packed depends on
106 the build-config and skelfile slots.
108 Production deployments end up at https://packy.compiler.company.
111 Install core packages locally.