Commit Graph

126 Commits

Author SHA1 Message Date
Jacob Hoffman-Andrews 9e4b0c1e5b Move RabbitMQ initialization into its own binary.
Previously our executables would all try to declare the boulder exchange on
startup, which may have been leading to some race conditions in Travis. Also,
the Activity Monitor would try to bind a queue to the exchange at startup.
In prod both of these tasks are taken care of administratively, so including
them in the app code was adding unnecessary complexity. It also may have been
part of an issue causing Activity Monitor to fail to start up recently.

Also, turn the Activity Monitor into an RPC service, which gets it reconnects
for free, and add it to startservers.py.
2015-11-29 16:55:03 -08:00
Jeff Hodges baaa8a6209 check for wfe port liveness in integration tests
We're getting many more spurious "Can't connect to WFE" errors in
TravisCI. So, we add the WFE's main port to the port liveness check in
amqp-integration-test.py.

Fixes #1099
2015-11-05 15:32:05 -08:00
Jacob Hoffman-Andrews 194e421931 Add reconnects in AMQP. 2015-10-27 19:54:54 -07:00
Jacob Hoffman-Andrews 17918010dc Allow override of all build flags in Makefile.
I think even the ldflags that did not change between subsequent invocations of
./start.py, e.g. BUILD_HOST_VAR, were different between ./start.py and
`go test ./...`, which would cause test runs to be unnecessarily slow.

Open question: To keep local developer builds fast, maybe we should enable race
detection only in Travis? Otherwise, `go test ./...` runs with one set of
ldflags, and then `ampq-integration-test.py` runs with a different set, which I
think makes both of them slower.
2015-10-03 12:45:06 -07:00
Roland Shoemaker 3be29f8288 Remove cmd/ prefix 2015-10-01 17:30:49 -07:00
Roland Shoemaker 9dc7b2d682 Merge master 2015-10-01 17:23:48 -07:00
Roland Shoemaker 2d0dee4ce1 Daemonize the OCSP updater tool so we are constantly updating OCSP responses.
also moves the first OCSP responses generation from the CA to the OCSP updater. This patch lays the
ground work for moving CT submission and adding CT backfill to the OCSP updater.
2015-10-01 16:36:51 -07:00
Jacob Hoffman-Andrews b3aca1ff2b Speed up tests.
Make `make` aware of output files so it doesn't always have to rebuild. Also
make it use `go install`, which is faster than building files individually.

Now that make is faster, use it in startservers.py to consolidate building
logic. This also has the handy side-effect that ./start.py exposes useful build
information through /build, whereas before only the .rpm packaged version did.

Additionally, this allows us to remove `make` from the Travis matrix, since we
are running `make` as part of the integration test. This means each PR only
triggers two Travis builds instead of one, which means we will get results from
Travis faster.

Also, change the Travis matrix logic to be a list of actions to run, rather than
a list of actions to skip. That fixes
https://github.com/letsencrypt/boulder/issues/817.

Enumerate specific sections of test.sh to run, rather than sections to skip.

Note: ./start.py now installs into ./bin/ instead of $GOPATH/bin.

Only set up GitHub secret file (for PR status reporting) when available, and
decrypt it into /tmp rather than $HOME, to avoid accidentally caching it once
Travis' caching features are available.

Clone letsencrypt repo into $HOME instead of $TMP, to make it possible to cache
eventually.

Remove unused `mysql` dependency in Travis.

Override default Travis install command to prevent it from adding
Godeps/_workspace to GOPATH. When that happens, it hides failures that should
arise from importing non-vendorized paths.
2015-10-01 16:28:17 -07:00
Jacob Hoffman-Andrews 540c792474 Add an OCSP responder that serves from a file.
This is useful for intermediate and root OCSP, which are generated manually one
a year.
2015-09-23 16:34:13 -07:00
Jacob Hoffman-Andrews 5666b5a59a Add dummy CT log server for integration testing. 2015-09-22 17:10:38 -07:00
Roland Shoemaker ff6eca7a29 Submit all issued certificates to configured CT logs
Adds a new service, Publisher, which exists to submit issued certificates to various Certificate Transparency logs. Once submitted the Publisher will also parse and store the returned SCT (Signed Certificate Timestamp) receipts that are used to prove inclusion in a specific log in the SA database. A SA migration adds the new SCT receipt table.

The Publisher only exposes one method, SubmitToCT, which is called in a goroutine by ca.IssueCertificate as to not block any other issuance operations. This method will iterate through all of the configured logs attempting to submit the certificate, and any required intermediate certificates, to them. If a submission to a log fails it will be retried the pre-configured number of times and will either use a back-off set in a Retry-After header or a pre-configured back-off between submission attempts.

This changeset is the first of a number of changes ending with serving SCT receipts in OCSP responses and purposefully leaves out the following pieces for follow-up PRs.

* A fake CT server for integration testing
* A external tool to search the database for certificates lacking a full set of SCT receipts
* A method to construct X.509 v3 extensions containing receipts for the OCSP responder
* Returned SCT signature verification (beyond just checking that the signature is of the correct type so we aren't just serving arbitrary binary blobs to clients)

Resolves #95.
2015-09-17 18:11:05 -07:00
Jacob Hoffman-Andrews fc70f00fb3 Restore `exec` command to startservers.py.
Fixes https://github.com/letsencrypt/boulder/issues/671
2015-08-27 12:56:36 -07:00
Jacob Hoffman-Andrews 02c22c40aa Fix error output in startservers.
Previously startservers would crash with an error about concatenating NoneType and string, if there was a build erro.r
2015-08-26 10:12:29 -07:00
Jeff Hodges 469253a9e3 fix some dregs in startservers.py
Changes this to use just communicate(), not the subprocess.PIPE stuff (which
apparently can do Weird Things)

Also rename the install variable to cmd in the install function
2015-08-25 21:42:48 -07:00
Jeff Hodges 3a4fef4463 install boulder cmds in one cmd in startserver.py
This eases the CPU and thread requirements of our tests (by forking
less, not doing everything at once). It should also speed up the tests
by avoiding certain repetitive work.

Updates https://github.com/letsencrypt/letsencrypt/issues/712
2015-08-25 16:02:08 -07:00
Jacob Hoffman-Andrews f6c21120b0 Add OCSP testing to integration test. 2015-08-20 09:37:24 -07:00
Jacob Hoffman-Andrews bcfb935472 Fail startservers.py when compile fails. 2015-08-07 17:55:43 -07:00
Jacob Hoffman-Andrews 9b20f0afaf Startservers.py: remove tempdir, add sys.exit 2015-07-29 11:15:01 -07:00
Jacob Hoffman-Andrews 237f759ac9 Use go install for even more speed. 2015-07-28 18:29:39 -07:00
Jacob Hoffman-Andrews d69f97e954 Fix exception handling. 2015-07-28 18:11:52 -07:00
Jacob Hoffman-Andrews a4c4b473f1 Speed up start.py and integration test.
Run builds in parallell as well as starting servers in parallel.
Wait for the servers to come up, so tests don't start running too early.
Enable race detection only for the integration test, not for start.py.
Previously I'd suggested it should always be on, but after running with it for a
while I'm convinced it's too slow for start.py (but still very valuable for
integration tests!).
2015-07-28 18:07:22 -07:00
Tom Clegg 2914ba6af5 Fix "main process kept alive forever by ToSServerThread." 2015-07-25 18:17:02 -04:00
Tom Clegg e6ca449d34 Bring up a stub ToS server in test scripts. 2015-07-25 16:21:40 -04:00
Tom Clegg e871b30cbf Shut down everything if any server exits before ^C/timer. Fixup log messages. 2015-07-25 15:59:38 -04:00
Tom Clegg 43c738cc93 Set GORACE env var only in "go build", not everywhere. 2015-07-25 14:51:22 -04:00
Tom Clegg de5cce8c03 De-duplicate start.py and test/amqp-integration-test.py 2015-07-25 04:04:20 -04:00