eks-distro-build-tooling icon indicating copy to clipboard operation
eks-distro-build-tooling copied to clipboard

Break builder-base into multiple stages and layers

Open jaxesn opened this issue 2 years ago • 3 comments

Issue #, if available:

Description of changes:

This breaks install.sh into separate scripts, and layers in the dockerfile, per component included in the builder-base. The end result is a mostly the same image, which a dozen layers vs 1 giant layer. Using this approach allows rebuilds locally to be a TON more manageable and it allows us to reuse the cache between different builds of builder-base, thus reducing build times even more.

Key changes:

  • rust has been removed from the final builder base, install only tuftool is incldued
  • go 1.14 has been removed, the final project we built 1.14 with was removed from eks-a not too long ago
  • the instal golang script is currently not broken up by version, but as a follow up will be once @danbudris's work on custom golang builds is complete

I have diff'd the old image file list with a new image I built to confirm the only changes are the above expected ones.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

jaxesn avatar Oct 25 '22 20:10 jaxesn

/hold

jaxesn avatar Oct 25 '22 20:10 jaxesn

/test all

jaxesn avatar Nov 03 '22 20:11 jaxesn

/unhold /approve

jaxesn avatar Nov 03 '22 21:11 jaxesn

/lgtm /approve /hold

Awesome work @jaxesn, really excited for this! One more abstraction to consider would be to extract the common wget -> shasum check -> extract and move to PATH steps to a common function and use it where it applies, to reduce the duplication in scripts. Not sure if you want to do this in this PR or want to do it as a follow-up, so I'm approving and put it on hold to merge at your discretion.

abhay-krishna avatar Nov 04 '22 02:11 abhay-krishna

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhay-krishna, jaxesn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • ~~OWNERS~~ [abhay-krishna,jaxesn]

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

eks-distro-bot avatar Nov 04 '22 02:11 eks-distro-bot

I had the same thought. I'm going to leave that for the future. One reason I didn't jump to that was to avoid introducing too many common scripts that could trigger rebuilds of every layer and instead optd for duplication to keep them as independent as possible. Worth considering more tho for sure!

jaxesn avatar Nov 04 '22 11:11 jaxesn

/unhold

jaxesn avatar Nov 04 '22 11:11 jaxesn