Conversation
Really the only thing that causes large build contexts is git history, since barely a handful of files are needed to build the images. This change avoids development pain when new files are excluded unexpectedly.
Allows the `docker-compose.yml` file to refer to non-image resources (like docker networks) it creates in environment variables, which is needed for future changes.
Instead of defining, building, and running each set of test services for each installer we define a single “test runner” service. This test runner contains a parameterized docker compose configuration for building and running the tests of a single installer variant. The outer docker-compose specifies that the containerized test runner’s docker-compose should mount the host docker socket, ensuring that the test runner uses the host docker engine instead of an isolated docker engine inside the container. With a small script taking an argument for which installer to test, we can now build and run all the tests for an existing installer image (e.g. `racket-x86`) using `docker-compose run racket-test-runner racket-x86`.
Also fixes naming mismatch between Travis and docker-compose
Similar to the test-runner service. The installer service consumes a Racket installer and executes it, producing an image containing a Racket installation. This is defined in terms of “installer types” and “installation types”. An installer type identifies a particular artifact available for download from a version-specific Racket installers website such as a 64-bit linux installation script. An “installation type” is a particular way of executing an installer, since some installers can be installed in multiple different ways. Currently the only implemented installation type is “script-inplace”, meaning an in-place install of a Linux shell script installer. By wrapping installation in a service, new installation types can be defined with a linear amount of configuration in the number of installation types.
The only installation step not contained by the installer service is actually downloading an installer. This small downloader will be combined with the installer service to replace the existing “Dockerfile.installer” way of building installation images.
The COMPOSE_PROJECT_NAME var is already set by the test-runner.sh script so this is a no-op.
Each of the “racket-foo” services is now a “download-{installer-type}”
service that only downloads the correct installer from the installers
site determined by .env configuration. To build an installation, first
build the download and then run `docker-compose run installer
{installer-type} {installation-type}`, producing an image named
`racket-{installer-type}-{installation-type}`, such as
`racket-download-linux-32-ospkg-minimal-script-inplace`.
Note: this uses the fancy YAML syntax >- in order to write env vars on multiple lines with newline characters replaced by spaces.
YAML is an abomination.
Owner
|
Let me know when you want me to look at this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOT READY TO MERGE
An attempt to make "installation builder" and "test runner" containers that each contain a piece of the existing Docker Compose configuration along with some scripting.
Currently, implementing #7, #20, and #21 would require a combinatoric explosion in the amount of Docker Compose configuration required. Hopefully this PR will solve that problem.