Though I tried many different variations, I couldn't get Vagrantfile to invoke the cygwin shell script, so instead, I moved these lines into an external script "generateSslCertificates.sh" and invoked this before "vagrant up":
dmahar@PC09 ~/vagrant/coreos/coreos-kubernetes/single-node $ cat generateSslCertificates.sh #!/bin/sh PATH=/usr/bin:/usr/local/bin set -e NODE_IP=$1 CLUSTER_IP=$2 mkdir -p ssl && ./../lib/init-ssl-ca ssl || echo "failed generating SSL CA artifacts" ./../lib/init-ssl ssl apiserver controller IP.1=$NODE_IP,IP.2=$CLUSTER_IP || echo "failed generating SSL certificate artifacts" ./../lib/init-ssl ssl admin kube-admin || echo "failed generating admin SSL artifacts" dmahar@PC09 ~/vagrant/coreos/coreos-kubernetes/single-node $ ./generateSslCertificates.sh 172.17.4.99 10.3.0.1 Generating RSA private key, 2048 bit long modulus ..............................................................................................................................+++ ............+++ e is 65537 (0x10001) Generating SSL artifacts in ssl Generating RSA private key, 2048 bit long modulus ..............................................................+++ .+++ e is 65537 (0x10001) Signature ok subject=/CN=controller Getting CA Private Key Bundled SSL artifacts into ssl/controller.tar ssl/ca.pem ssl/apiserver-key.pem ssl/apiserver.pem Generating SSL artifacts in ssl Generating RSA private key, 2048 bit long modulus .........................................+++ ..................................+++ e is 65537 (0x10001) Signature ok subject=/CN=kube-admin Getting CA Private Key Bundled SSL artifacts into ssl/kube-admin.tar ssl/ca.pem ssl/admin-key.pem ssl/admin.pem With the certificates in place, "vagrant up" successfully started a node. Derek On Monday, 29 August 2016 17:05:25 UTC-4, Derek Mahar wrote: > > As you suspected, system() appears to be invoking a Windows command shell > instead of a Cygwin shell: > > . > . > . > system("mkdir"); > system("C:\cygwin\bin\run.exe /bin/sh -c 'mkdir -p ssl && > ./../lib/init-ssl-ca ssl'") or abort ("failed generating SSL CA artifacts") > system("./../lib/init-ssl ssl apiserver controller > IP.1=#{NODE_IP},IP.2=#{CLUSTER_IP}") or abort ("failed generating SSL > certificate artifacts") > system("./../lib/init-ssl ssl admin kube-admin") or abort("failed > generating admin SSL artifacts") > . > . > . > dmahar@PC09 ~/vagrant/coreos/coreos-kubernetes/single-node > $ vagrant up > The syntax of the command is incorrect. > failed generating SSL CA artifacts > > Compare with a Windows command shell: > > C:\Users\dmahar>mkdir > The syntax of the command is incorrect. > C:\Users\dmahar>dir > Volume in drive C has no label. > Volume Serial Number is 2A18-5695 > > Directory of C:\Users\dmahar > > 2016-08-29 05:02 PM <DIR> . > 2016-08-29 05:02 PM <DIR> .. > 2016-08-29 05:02 PM <DIR> -p > . > . > . > > Derek > > On Monday, 29 August 2016 16:49:33 UTC-4, Derek Mahar wrote: >> >> That didn't work, but for a different reason: >> >> $ vagrant up >> failed generating SSL CA artifacts >> >> The system call didn't create directory "ssl": >> >> dmahar@PC09 ~/vagrant/coreos/coreos-kubernetes/single-node >> $ ls -la >> total 44 >> drwxr-xr-x+ 1 dmahar Utilisa. du domaine 0 Aug 29 16:42 . >> drwxr-xr-x+ 1 dmahar Utilisa. du domaine 0 Aug 29 16:29 .. >> -rw-r--r-- 1 dmahar Utilisa. du domaine 14 Aug 29 16:29 .gitignore >> drwxr-xr-x+ 1 dmahar Utilisa. du domaine 0 Aug 29 16:42 .vagrant >> -rwxr-xr-x 1 dmahar Utilisa. du domaine 318 Aug 29 16:29 >> conformance-test.sh >> -rw-r--r-- 1 dmahar Utilisa. du domaine 437 Aug 29 16:29 kubeconfig >> -rw-r--r-- 1 dmahar Utilisa. du domaine 297 Aug 29 16:29 README.md >> -rw-r--r-- 1 dmahar Utilisa. du domaine 27395 Aug 29 16:29 user-data >> -rw-r--r-- 1 dmahar Utilisa. du domaine 2346 Aug 29 16:42 Vagrantfile >> >> I'll tweak it to try to get it to work. >> >> Derek >> >> On Monday, 29 August 2016 16:33:46 UTC-4, Alban Crequy wrote: >>> >>> On Mon, Aug 29, 2016 at 4:22 PM, Derek Mahar <derek...@gmail.com> >>> wrote: >>> > How might I fix the error that I encounter when, in a Cygwin bash >>> shell, I >>> > run "vagrant up" in single-node or multi-node of >>> > https://github.com/coreos/coreos-kubernetes? >>> > >>> > dmahar@PC09 ~/vagrant/coreos/coreos-kubernetes/single-node >>> > $ vagrant up >>> > '.' is not recognized as an internal or external command, >>> > operable program or batch file. >>> > failed generating SSL CA artifacts >>> >>> It seems to come from this line in the Vagrantfile: >>> >>> system("mkdir -p ssl && ./../lib/init-ssl-ca ssl") or abort ("failed >>> generating SSL CA artifacts") >>> >>> It could be Windows requesting the path separator "\" instead of "/". >>> I am not sure whether "system" is executing a cygwin shell or a >>> Windows command. >>> >>> Does it work with the following? >>> >>> system("C:\cygwin\bin\run.exe /bin/sh -c 'mkdir -p ssl && >>> ./../lib/init-ssl-ca ssl'") or abort ("failed generating SSL CA >>> artifacts") >>> >>