-
Notifications
You must be signed in to change notification settings - Fork 40k
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
READY FOR REVIEW - Fix #2741. Add support for alternate Vagrant providers: ... #6983
READY FOR REVIEW - Fix #2741. Add support for alternate Vagrant providers: ... #6983
Conversation
@@ -116,6 +167,9 @@ function create-provision-scripts { | |||
} | |||
|
|||
function verify-cluster { | |||
# TODO: How does the user know the difference between "tak[ing] some | |||
# time" and "loop[ing] forever"? Can we give more specific feedback on | |||
# whether "an error" has occurred? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a common problem with all the Salt based providers (including GCE, AWS, Azure). I will say that the move to do more as pods and less in Salt may make this better over time, and less of a concern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood. Please let me know if I should remove the comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment is fine. I too am annoyed when loop forever occurs.
Thanks for the pull request. Testing this now to ensure it does not regress VirtualBox. |
The cluster comes up, but I am getting this in the terminal output when invoking cluster/kube-up at start Starting cluster using provider: vagrant
... calling verify-prereqs
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...
-n, --quiet, --silent
suppress automatic printing of pattern space
-e script, --expression=script
add the script to the commands to be executed
-f script-file, --file=script-file
add the contents of script-file to the commands to be executed
--follow-symlinks
follow symlinks when processing in place
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if SUFFIX supplied)
-c, --copy
use copy instead of rename when shuffling files in -i mode
-b, --binary
does nothing; for compatibility with WIN32/CYGWIN/MSDOS/EMX (
open files in binary mode (CR+LFs are not treated specially))
-l N, --line-length=N
specify the desired line-wrap length for the `l' command
--posix
disable all GNU extensions.
-r, --regexp-extended
use extended regular expressions in the script.
-s, --separate
consider files as separate rather than as a single continuous
long stream.
-u, --unbuffered
load minimal amounts of data from the input files and flush
the output buffers more often
-z, --null-data
separate lines by NUL characters
--help
display this help and exit
--version
output version information and exit
If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret. All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.
GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
which: no vmrun in (/home/decarr/google-cloud-sdk/bin:/home/decarr/go/src/github.com/openshift/origin/_output/local/go/bin:/home/decarr/go/bin:/home/decarr/.rbenv/shims:/home/decarr/.rbenv/bin:/home/decarr/google-cloud-sdk/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/go/bin:/usr/local/sbin:/usr/sbin:/home/decarr/.local/bin:/home/decarr/bin:/home/decarr/.rvm/bin:/home/decarr/.rvm/bin)
which: no vmrun in (/home/decarr/google-cloud-sdk/bin:/home/decarr/go/src/github.com/openshift/origin/_output/local/go/bin:/home/decarr/go/bin:/home/decarr/.rbenv/shims:/home/decarr/.rbenv/bin:/home/decarr/google-cloud-sdk/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/go/bin:/usr/local/sbin:/usr/sbin:/home/decarr/.local/bin:/home/decarr/bin:/home/decarr/.rvm/bin:/home/decarr/.rvm/bin)
which: no prlctl in (/home/decarr/google-cloud-sdk/bin:/home/decarr/go/src/github.com/openshift/origin/_output/local/go/bin:/home/decarr/go/bin:/home/decarr/.rbenv/shims:/home/decarr/.rbenv/bin:/home/decarr/google-cloud-sdk/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/go/bin:/usr/local/sbin:/usr/sbin:/home/decarr/.local/bin:/home/decarr/bin:/home/decarr/.rvm/bin:/home/decarr/.rvm/bin)
... calling kube-up Not sure where this is coming from in your branch, but noting so I can remember to look in more detail. |
I'm pretty sure it's this. I should have remembered that some platforms' |
customize_vm minion | ||
minion_vm_name = "minion-#{n+1}" | ||
minion_prefix = ENV['INSTANCE_PREFIX'] || 'kubernetes' # must mirror default in cluster/vagrant/config-default.sh | ||
minion_hostname = "#{minion_prefix}#{minion_vm_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The minion_hostname changes with this change from kubernetes-minion-1
to kubernetesminion-1
.
Please address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed in a05dafc. Will squash once all problems are addressed.
A few issues noted in the PR. Please resolve, squash commits, and I will then merge. |
fi | ||
|
||
if ([ -z "${provider_bin}" ] \ | ||
|| which "${provider_bin}" >/dev/null) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the following:
which: no vmrun in (/home/decarr/google-cloud-sdk/bin:/home/decarr/go/src/github.com/openshift/origin/_output/local/go/bin:/home/decarr/go/bin:/home/decarr/.rbenv/shims:/home/decarr/.rbenv/bin:/home/decarr/google-cloud-sdk/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/go/bin:/usr/local/sbin:/usr/sbin:/home/decarr/.local/bin:/home/decarr/bin:/home/decarr/.rvm/bin:/home/decarr/.rvm/bin)
which: no vmrun in (/home/decarr/google-cloud-sdk/bin:/home/decarr/go/src/github.com/openshift/origin/_output/local/go/bin:/home/decarr/go/bin:/home/decarr/.rbenv/shims:/home/decarr/.rbenv/bin:/home/decarr/google-cloud-sdk/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/go/bin:/usr/local/sbin:/usr/sbin:/home/decarr/.local/bin:/home/decarr/bin:/home/decarr/.rvm/bin:/home/decarr/.rvm/bin)
which: no prlctl in (/home/decarr/google-cloud-sdk/bin:/home/decarr/go/src/github.com/openshift/origin/_output/local/go/bin:/home/decarr/go/bin:/home/decarr/.rbenv/shims:/home/decarr/.rbenv/bin:/home/decarr/google-cloud-sdk/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/go/bin:/usr/local/sbin:/usr/sbin:/home/decarr/.local/bin:/home/decarr/bin:/home/decarr/.rvm/bin:/home/decarr/.rvm/bin)
can we change to do the following:
which "${provider_bin}" &>/dev/null
That is the last issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops! 😮 Thanks for catching that! Believe it or not, I had intended to do that originally. This is just not my week. 😞
Addressed in e8672e2
. I noticed that elsewhere in the file, the older >/dev/null 2>&1
is used (even though &>
is supported as of bash
4). I followed the existing convention for consistency, but can change it if desired.
…, VMWare Workstation, and Parallels.
LGTM - thanks! |
READY FOR REVIEW - Fix #2741. Add support for alternate Vagrant providers: ...
...VMWare Fusion, VMWare Workstation, and Parallels. (Replaces #6879. Tagging #2741. Cc: @erictune, @derekwaynecarr, @jameskyle.)
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):You can override the box (by name):
And even specify a version:
Or specify a URL for the box itself, in which case you now must provide your own name:
WARNING: This breaks the existing behavior of
KUBERNETES_BOX_URL
, which is now ignored unlessKUBERNETES_BOX_NAME
is also set. Previously that name was fixed for everything (default or specified by URL) asfedora20
, irrespective of underlying OS/version. Now if a default box is used, the name is set internally (currently onlykube-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):
KUBERNETES_MEMORY
is maintained for backward compatibility. The following are equivalent to the previous example: