-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
058c6ec
commit f6f0ce0
Showing
1 changed file
with
6 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -255,6 +255,12 @@ func provisionCluster(cmd *cobra.Command, args []string) (retErr error) { | |
return err | ||
} | ||
|
||
// Copy scripts to the VM | ||
err = _cmd(cli, nodeContainer(prefix, nodeName), `find /scripts/ -maxdepth 1 -type f -exec scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i vagrant.key -P 22 {} [email protected]:/tmp \;`, "copying manifests to the VM") | ||
if err != nil { | ||
return err | ||
} | ||
|
||
envVars := fmt.Sprintf("version=%s slim=%t", version, slim) | ||
if strings.Contains(phases, "linux") { | ||
err := sshClient.Command("sudo " + envVars + " /bin/bash /scripts/provision.sh") | ||
|
@@ -268,25 +274,14 @@ func provisionCluster(cmd *cobra.Command, args []string) (retErr error) { | |
if err != nil { | ||
return err | ||
} | ||
err = _cmd(cli, nodeContainer(prefix, nodeName), "", "copying /scripts/extra-pre-pull-images if existing") | ||
if err != nil { | ||
return err | ||
} | ||
err = _cmd(cli, nodeContainer(prefix, nodeName), "if [ -f /scripts/fetch-images.sh ]; then scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i vagrant.key -P 22 /scripts/fetch-images.sh [email protected]:/tmp/fetch-images.sh; fi", "copying /scripts/fetch-images.sh if existing") | ||
if err != nil { | ||
return err | ||
} | ||
|
||
err = _cmd(cli, nodeContainer(prefix, nodeName), "scp -r -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i vagrant.key -P 22 /scripts/manifests/* [email protected]:/tmp", "copying manifests to the VM") | ||
if err != nil { | ||
return err | ||
} | ||
|
||
err = _cmd(cli, nodeContainer(prefix, nodeName), `find /scripts/ -maxdepth 1 -type f -exec scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i vagrant.key -P 22 {} [email protected]:/tmp \;`, "copying manifests to the VM") | ||
if err != nil { | ||
return err | ||
} | ||
|
||
err = sshClient.Command("sudo " + envVars + " /bin/bash /tmp/k8s_provision.sh") | ||
if err != nil { | ||
return err | ||
|