Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

driver management implementation #20

Merged
merged 6 commits into from
Apr 16, 2019
Merged

driver management implementation #20

merged 6 commits into from
Apr 16, 2019

Conversation

tonistiigi
Copy link
Member

@tonistiigi tonistiigi commented Apr 15, 2019

Signed-off-by: Tonis Tiigi tonistiigi@gmail.com

/work # docker buildx

Usage:	docker buildx COMMAND

Build with BuildKit

Commands:
  bake        Build from a file
  build       Start a build
  create      Create a new builder instance
  inspect     Inspect current builder instance
  ls          List builder instances
  rm          Remove a builder instance
  use         Set the current builder instance

Run 'docker buildx COMMAND --help' for more information on a command.
/work # docker buildx create --help

Usage:	docker buildx create [OPTIONS] [CONTEXT|ENDPOINT]

Create a new builder instance

Options:
      --append                 Append a node to builder instead of changing it
      --driver string          Driver to use (eg. docker-container)
      --leave                  Remove a node from builder instead of changing it
      --name string            Builder instance name
      --node string            Create/modify node with given name
      --platform stringArray   Fixed platforms for current node
/work # docker buildx use --help

Usage:	docker buildx use [OPTIONS] NAME

Set the current builder instance

Options:
      --default   Set builder as default for current context
      --global    Builder persists context changes
/work # docker buildx inspect --help

Usage:	docker buildx inspect [NAME]

Inspect current builder instance

Options:
      --bootstrap   Ensure builder as booted before inspecting

/work # docker context create my-context  --docker "host=unix:///var/run/docker.sock"

my-context
Successfully created context "my-context"
/work #
/work # docker buildx create --use my-context
gifted_kapitsa
/work # docker buildx inspect --bootstrap
[+] Building 12.0s (1/1) FINISHED
 => [internal] booting buildkit                                                                     11.9s
 => => pulling image moby/buildkit:master                                                           10.8s
 => => creating container buildx_buildkit_gifted_kapitsa0                                            1.2s
Name:   gifted_kapitsa
Driver: docker-container

Nodes:
Name:      gifted_kapitsa0
Endpoint:  my-context
Status:    running
Platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6
/work #
/work # docker buildx ls
NAME              DRIVER/ENDPOINT  STATUS  PLATFORMS
gifted_kapitsa *  docker-container
  gifted_kapitsa0 my-context       running linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6
my-context        docker
  my-context      my-context       running linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6
default           docker
  default         default          running linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
commands/use.go Outdated Show resolved Hide resolved
store/nodegroup.go Outdated Show resolved Hide resolved
commands/create.go Outdated Show resolved Hide resolved
commands/inspect.go Outdated Show resolved Hide resolved
@tiborvass
Copy link
Collaborator

tiborvass commented Apr 16, 2019

Not fond of the assymmetry between --append and --leave (--add/--rm ?), I don't like --node because it has too little to do with docker node (how about worker? or agent?).

My understanding after going through UI with Tonis is that 99% of the usecases should be covered with create, use and --append, the rest is advanced usage and extremely rare, which excuses the overloading of the create command to save confusion from having too many management commands for very rare usecases.

@tiborvass
Copy link
Collaborator

Ping @dmcgowan

Copy link
Collaborator

@tiborvass tiborvass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get this in, bikeshedding can continue.

@tonistiigi
Copy link
Member Author

(--add/--rm ?)

add has much vaguer meaning and it isn't clear that resources are being inserted into an existing set (could very well mean that just another builder instance is added to ls). rm can be confused with buildx rm that is a different use-case.

This used to be --join/--leave but I updated it after design feedback.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi tonistiigi merged commit 9830058 into master Apr 16, 2019
@tonistiigi
Copy link
Member Author

As @tiborvass said, If there are more design comments leave them here or open new issues. We're in a phase where we can still revert things.

@tiborvass tiborvass deleted the commands2 branch April 25, 2019 03:25
jedevc pushed a commit to jedevc/buildx that referenced this pull request Jul 18, 2023
jedevc pushed a commit to jedevc/buildx that referenced this pull request Jul 18, 2023
jedevc pushed a commit to jedevc/buildx that referenced this pull request Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants