Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit 943fd7a

Browse files
authored
Merge pull request #197 from philips/simplify-bootkube-up
hack: multi-node use the ssh-config
2 parents 60c9099 + 6674bb8 commit 943fd7a

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

hack/multi-node/bootkube-up

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ fi
1919

2020
# Start the VM
2121
vagrant up
22-
23-
ssh_ident="$(vagrant ssh-config c1 | awk '/IdentityFile/ {print $2}' | tr -d '"')"
24-
ssh_port="$(vagrant ssh-config c1 | awk '/Port [0-9]+/ {print $2}')"
22+
vagrant ssh-config c1 > ssh_config
2523

2624
# Copy locally rendered assets to the server
27-
scp -q -o stricthostkeychecking=no -i ${ssh_ident} -P ${ssh_port} -r cluster core@127.0.0.1:/home/core/cluster
28-
scp -q -o stricthostkeychecking=no -i ${ssh_ident} -P ${ssh_port} ../../_output/bin/linux/bootkube core@127.0.0.1:/home/core
25+
scp -q -F ssh_config -r cluster core@c1:/home/core/cluster
26+
scp -q -F ssh_config ../../_output/bin/linux/bootkube core@c1:/home/core
2927

3028
# Run bootkube
31-
ssh -q -o stricthostkeychecking=no -i ${ssh_ident} -p ${ssh_port} core@127.0.0.1 "sudo /home/core/bootkube start --asset-dir=/home/core/cluster --etcd-server=http://172.17.4.51:2379 2>> /home/core/bootkube.log"
29+
ssh -q -F ssh_config core@c1 "sudo /home/core/bootkube start --asset-dir=/home/core/cluster --etcd-server=http://172.17.4.51:2379 2>> /home/core/bootkube.log"
3230

3331
echo
3432
echo "Bootstrap complete. Access your kubernetes cluster using:"

hack/single-node/bootkube-up

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,14 @@ fi
1616

1717
# Start the VM
1818
vagrant up
19-
20-
ssh_ident="$(vagrant ssh-config | awk '/IdentityFile/ {print $2}' | tr -d '"')"
21-
ssh_port="$(vagrant ssh-config | awk '/Port [0-9]+/ {print $2}')"
19+
vagrant ssh-config > ssh_config
2220

2321
# Copy locally rendered assets to the server
24-
scp -q -o stricthostkeychecking=no -i ${ssh_ident} -P ${ssh_port} -r cluster core@127.0.0.1:/home/core/cluster
25-
scp -q -o stricthostkeychecking=no -i ${ssh_ident} -P ${ssh_port} ../../_output/bin/linux/bootkube core@127.0.0.1:/home/core
22+
scp -q -F ssh_config -r cluster core@default:/home/core/cluster
23+
scp -q -F ssh_config ../../_output/bin/linux/bootkube core@default:/home/core
2624

2725
# Run bootkube
28-
ssh -q -o stricthostkeychecking=no -i ${ssh_ident} -p ${ssh_port} core@127.0.0.1 "sudo /home/core/bootkube start --asset-dir=/home/core/cluster 2>> /home/core/bootkube.log"
26+
ssh -q -F ssh_config core@default "sudo /home/core/bootkube start --asset-dir=/home/core/cluster 2>> /home/core/bootkube.log"
2927

3028
echo
3129
echo "Bootstrap complete. Access your kubernetes cluster using:"

0 commit comments

Comments
 (0)