Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

The default run images MUST be encoded in the builder and not in the pack CLI config #31

Closed
sclevine opened this issue Dec 17, 2018 · 3 comments

Comments

@sclevine
Copy link
Member

sclevine commented Dec 17, 2018

New config.toml:

default-stack-id = "io.buildpacks.stacks.bionic"

[[stacks]]
  id = "io.buildpacks.stacks.bionic"
  build-image = "packs/build"
  run-images = ["packs/run", "gcr.io/packs/run"]

[[builders]]
  image = "packs/sample"
  run-images = ["example.com/packs1/run", "example.com/packs2/run", "gcr.io/packs2/run",]

Need new command:

pack configure-builder <builder> -r example.com/packs1/run -r example.com/packs2/run

NOTE: this replaces the run image list every time

For pack inspect-remote-builder:

...
Run images:
  example.com/packs1/run (local)
  example.com/packs2/run (local)
  gcr.io/packs2/run (local)
  packs/run
  gcr.io/packs/run

Notes

  • The stacks list in config.toml MUST only be used in pack create-builder, and not in pack build.
  • The builders list in config.toml MUST only be used in pack build (or pack inspect-remote-builder), and not in pack create-builder.
  • -r is option, no -r flags means no run images. No configuration removes the entry for the builder in config.toml.
  • The final list, searched in order, would be:
    ["example.com/packs1/run", "example.com/packs2/run", "gcr.io/packs2/run", "packs/run", "gcr.io/packs/run"]

Acceptance Criteria
Given The above config.toml file without the builders section
When I run pack build gcr.io/user/myapp --builder packs/sample
Then gcr.io/packs/run is used to export the final image

Given The above config.toml file with the builders section
When I run pack build gcr.io/user/myapp --builder packs/sample
Then gcr.io/packs2/run is used to export the final image

Given The above config.toml file with the builders section
When I run pack build example.com/user/myapp --builder packs/sample
Then example.com/packs1/run is used to export the final image

@sclevine sclevine created this issue from a note in Planning Board (Backlog) Dec 17, 2018
@ameyer-pivotal ameyer-pivotal moved this from Backlog to In Progress in Planning Board Jan 2, 2019
@ameyer-pivotal
Copy link

A couple of questions:

  • How would users remove the set of override run images for a builder? A new command?
  • Should we provide a way to list the set of builders that have overrides?

@sclevine sclevine changed the title The default run image is encoded in the builder and not in the pack CLI config The default run image MUST be encoded in the builder and not in the pack CLI config Jan 3, 2019
@sclevine
Copy link
Member Author

sclevine commented Jan 3, 2019

Updated OP.

@jchesterpivotal jchesterpivotal changed the title The default run image MUST be encoded in the builder and not in the pack CLI config The default run images MUST be encoded in the builder and not in the pack CLI config Jan 3, 2019
@jchesterpivotal
Copy link

jchesterpivotal commented Jan 3, 2019

How we think we will work through this:

  • update create-builder to add current stack's run images to builder metadata
  • update build (and by implication run) to use the run image metadata injected by create-builder
  • add inspect-remote-builder to list run images baked into builder
  • update inspect-remote-builder to list run images from config.toml for builder
  • add configure-builder to update config.toml with run images for builder, account for these run images during build
  • update published builder to have new metadata (packs/samples)

jchesterpivotal pushed a commit to buildpacks/pack that referenced this issue Jan 3, 2019
ameyer-pivotal added a commit to buildpacks/pack that referenced this issue Jan 8, 2019
[buildpacks/roadmap#31]

Signed-off-by: Jacques Chester <jchester@pivotal.io>
ameyer-pivotal pushed a commit to buildpacks/pack that referenced this issue Jan 10, 2019
- Adds configure-builder to create local run image overrides for a builder
- Adds inspect-remote-builder to inspect builder metadata (non-remote version coming soon)

[buildpacks/roadmap#31]

Signed-off-by: Andrew Meyer <ameyer@pivotal.io>
matthewmcnew added a commit to buildpacks/pack that referenced this issue Jan 10, 2019
- Writes runImages when creating a builder
- Adds configure-builder to create local run image overrides for a builder
- Adds inspect-remote-builder to inspect builder metadata (non-remote version coming soon)

[buildpacks/roadmap#31]
matthewmcnew added a commit to buildpacks/pack that referenced this issue Jan 11, 2019
- Writes runImages when creating a builder
- Adds configure-builder to create local run image overrides for a builder
- Adds inspect-remote-builder to inspect builder metadata (non-remote version coming soon)

[buildpacks/roadmap#31]

Signed-off-by: Andrew Meyer <ameyer@pivotal.io>
@joaopapereira joaopapereira moved this from In Progress to Done in Planning Board Jan 15, 2019
@sclevine sclevine moved this from Done to Release v0.1.0 in Planning Board Feb 3, 2019
@ekcasey ekcasey closed this as completed Mar 6, 2019
@ekcasey ekcasey reopened this Mar 6, 2019
@sclevine sclevine closed this as completed Apr 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants