★ wanayoo — archive 1999 https://github.com/boot2docker/boot2docker-cli/pull/341Nouvelle recherche | Portail wanayoo
Skip to content
This repository has been archived by the owner. It is now read-only.

Fixes #209: CLI option for number of CPUs when creating a new boot2docker VM #341

Merged
merged 1 commit into from Feb 24, 2015

Conversation

@mohitsoni
Copy link
Contributor

@mohitsoni mohitsoni commented Feb 7, 2015

This pull request enhances boot2docker init by allowing user to pass --cpus to configure the number of cpus allocated to boot2docker-vm during vm creation.

@mohitsoni
Copy link
Contributor Author

@mohitsoni mohitsoni commented Feb 11, 2015

@SvenDowideit @steeve If this looks good, can we please merge this one ? Also, I would recommend having a similar feature in docker-compose.

config.go Outdated
@@ -116,6 +116,7 @@ func config() (*flag.FlagSet, error) {
flags.StringVar(&B2D.SSHKey, "sshkey", filepath.Join(sshdir, "id_boot2docker"), "path to SSH key to use.")
flags.UintVarP(&B2D.DiskSize, "disksize", "s", 20000, "boot2docker disk image size (in MB).")
flags.UintVarP(&B2D.Memory, "memory", "m", 2048, "virtual machine memory size (in MB).")
flags.UintVarP(&B2D.CPUs, "cpus", "c", 1, "number of cpus for boot2docker.")

This comment has been minimized.

@tianon

tianon Feb 11, 2015
Contributor

Shouldn't this default to runtime.NumCPU()?

This comment has been minimized.

@tianon

tianon Feb 11, 2015
Contributor

Also, cpus in the help text should probably be CPUs instead.

@mohitsoni mohitsoni force-pushed the mohitsoni:master branch from 0428a02 to b454359 Feb 12, 2015
@mohitsoni
Copy link
Contributor Author

@mohitsoni mohitsoni commented Feb 12, 2015

Okay, I have addressed your comments.

@tianon
Copy link
Contributor

@tianon tianon commented Feb 23, 2015

LGTM

cc @gmlewis @Moghedrin

@gmlewis

This comment has been minimized.

Copy link

@gmlewis gmlewis commented on b454359 Feb 23, 2015

LGTM but will let someone else merge and close.

tianon added a commit that referenced this pull request Feb 24, 2015
Fixes #209: CLI option for number of CPUs when creating a new boot2docker VM
@tianon tianon merged commit 0a3a250 into boot2docker:master Feb 24, 2015
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.