...
1#!/usr/bin/env -S python3 -u
2"""
3Run a local instance of Boulder for testing purposes.
4
5Boulder always runs as a collection of services. This script will
6start them all on their own ports (see test/startservers.py)
7
8Keeps servers alive until ^C. Exit non-zero if any servers fail to
9start, or die before ^C.
10"""
11
12import errno
13import os
14import sys
15import time
16
17sys.path.append('./test')
18import startservers
19
20if not startservers.install(race_detection=False):
21 raise(Exception("failed to build"))
22
23# Setup issuance hierarchy
24startservers.setupHierarchy()
25
26if not startservers.start(fakeclock=None):
27 sys.exit(1)
28try:
29 os.wait()
30
31 # If we reach here, a child died early. Log what died:
32 startservers.check()
33 sys.exit(1)
34except KeyboardInterrupt:
35 print("\nstopping servers.")
36except OSError as v:
37 # Ignore EINTR, which happens when we get SIGTERM or SIGINT (i.e. when
38 # someone hits Ctrl-C after running `docker compose up` or start.py.
39 if v.errno != errno.EINTR:
40 raise
View as plain text