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

PLEASE IGNORE - Fix #2741. Add support for alternate Vagrant providers: ... #6978

Closed
wants to merge 8 commits into from
Closed

PLEASE IGNORE - Fix #2741. Add support for alternate Vagrant providers: ... #6978

wants to merge 8 commits into from

Conversation

posita
Copy link
Contributor

@posita posita commented Apr 17, 2015

UPDATE: This PR is replaced by #6983 and should not be merged.

...VMWare Fusion, VMWare Workstation, and Parallels. (Replaces #6879. Tagging #2741.)

I tried to mirror the Vagrant philosophy and do the right thing in most cases without tweaking configuration (unless you really wanted to override something). The fall-back order is:

If any of these are installed properly (including any required Vagrant plugins), KUBERNETES_PROVIDER=vagrant .../cluster/kube-up.sh should just work. 😁 _CAVEAT__: I do not have a license to VMWare Fusion. I'm pretty sure it will function, but I have only tested Parallels._

To override, you can set VAGRANT_DEFAULT_PROVIDER (e.g., if you have both VMWare and Parallels installed, but want to use Parallels):

export KUBERNETES_PROVIDER=vagrant
export VAGRANT_DEFAULT_PROVIDER=parallels
.../cluster/kube-up.sh

You can override the box (by name):

export KUBERNETES_PROVIDER=vagrant
export VAGRANT_DEFAULT_PROVIDER=parallels
export KUBERNETES_BOX_NAME=rickard-von-essen/opscode_fedora-20 # will fetch from atlas
.../cluster/kube-up.sh

And even specify a version:

export KUBERNETES_PROVIDER=vagrant
export VAGRANT_DEFAULT_PROVIDER=parallels
export KUBERNETES_BOX_NAME=rickard-von-essen/opscode_fedora-20 # will fetch from atlas...
export KUBERNETES_BOX_VERSION=0.3.0 # ...with this version
.../cluster/kube-up.sh

Or specify a URL for the box itself, in which case you now must provide your own name:

export KUBERNETES_PROVIDER=vagrant
export VAGRANT_DEFAULT_PROVIDER=parallels
export KUBERNETES_BOX_NAME=rickard-von-essen-fedora20 # will set the name to this value (with version 0)...
export KUBERNETES_BOX_URL=https://atlas.hashicorp.com/rickard-von-essen/boxes/opscode_fedora-20/versions/0.4.0/providers/parallels.box # ...and download the box from here
.../cluster/kube-up.sh

WARNING: This breaks the existing behavior of KUBERNETES_BOX_URL, which is now ignored unless KUBERNETES_BOX_NAME is also set. Previously that name was fixed for everything (default or specified by URL) as fedora20, irrespective of underlying OS/version. Now if a default box is used, the name is set internally (currently only kube-fedora20), but users who specify their own box URL are now forced to name it. To avoid clashes or confusion, it is recommended (but not enforced) that the name distinguish the box from the defaults (e.g., posita-fedora21, kickass-custom-centos, etc.).

This PR also introduces the ability to set the master memory size independently of the minions (it is included with this PR instead of a separate one because memory configuration is Vagrant provider-specific; see, e.g., this vs. this):

export KUBERNETES_PROVIDER=vagrant
export KUBERNETES_MASTER_MEMORY=1024
export KUBERNETES_MINION_MEMORY=2048
.../cluster/kube-up.sh

KUBERNETES_MEMORY is maintained for backward compatibility. The following are equivalent to the previous example:

export KUBERNETES_PROVIDER=vagrant
export KUBERNETES_MEMORY=1024 # sets both
export KUBERNETES_MINION_MEMORY=2048 # overrides minion
.../cluster/kube-up.sh
export KUBERNETES_PROVIDER=vagrant
export KUBERNETES_MEMORY=2048 # sets both
export KUBERNETES_MASTER_MEMORY=1024 # overrides master
.../cluster/kube-up.sh

posita added 7 commits April 17, 2015 06:45
…KUBERNETES_{MASTER,MINION}_MEMORY environment variables (with reversion to KUBERNETES_MEMORY).
…rantfile` so that `vagrant ssh minion-N` actually works (possibly related to #4633?). Collapse memory override fallback to more easily allow different default values for master/minion (if that ever becomes desirable).
…T_VAGRANT_PROVIDER` ➡️ `VAGRANT_DEFAULT_PROVIDER`. (Oops! 😧).
@posita
Copy link
Contributor Author

posita commented Apr 17, 2015

Cc: @erictune, @derekwaynecarr

@posita posita changed the title READY FOR REVIEW - Fix #2741. Add support for alternate Vagrant providers: ... PLEASE IGNORE - Fix #2741. Add support for alternate Vagrant providers: ... Apr 17, 2015
@posita
Copy link
Contributor Author

posita commented Apr 17, 2015

Ugh. I have no idea how @smarterclayton's merge got in there. 😖 I really need to get more sleep. 😫 Killing this one in favor of #6983. Apologies for the mess. 😞

@posita posita closed this Apr 17, 2015
@posita posita deleted the alt-vagrant-provider-support-2741 branch April 17, 2015 15:34
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.

2 participants