Compare commits
6 commits
757998a055
...
e7b56339f1
Author | SHA1 | Date | |
---|---|---|---|
|
e7b56339f1 | ||
|
9fec5ad1ed | ||
920833fa9b | |||
|
fb232542b3 | ||
|
ee7a504bba | ||
|
2d4fe86996 |
5 changed files with 18 additions and 8 deletions
11
k8s/pssh-all-nodes.sh
Executable file
11
k8s/pssh-all-nodes.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
# Execute commands on all hosts of the currently selected kubernetes cluster
|
||||
# Do export KUBECONFIG=~/your-admin.conf before using this script
|
||||
|
||||
#set -x
|
||||
|
||||
tmp=$(mktemp)
|
||||
kubectl get node -o name | sed 's,node/,,' > "$tmp"
|
||||
#cat "$tmp"
|
||||
pssh -h "$tmp" -l root -i "$@"
|
||||
rm -f "$tmp"
|
|
@ -9,7 +9,7 @@ set -e
|
|||
set -x
|
||||
|
||||
# XXX: Handle command-line arguments?
|
||||
RELEASE=buster # 10.X
|
||||
RELEASE=bulleyes # 11.X
|
||||
ARCH=amd64
|
||||
IMAGE_PATH=debian-$RELEASE-$(date --iso-8601).img.qcow2
|
||||
IMAGE_SIZE=10G
|
||||
|
|
|
@ -19,10 +19,6 @@ vigir_hostname=vigir${id}
|
|||
|
||||
root_password=$(pwgen -1 32)
|
||||
|
||||
# Save for sending to user
|
||||
# FIXME: future make this more easy / better to transfer
|
||||
echo $root_password > ${vigir_hostname}.rootpw
|
||||
|
||||
cat <<EOF | ssh -t "root@${vigir_ip}"
|
||||
# Remove temporary IP
|
||||
|
||||
|
@ -41,4 +37,7 @@ printf "${root_password}\n${root_password}\n" | passwd
|
|||
reboot
|
||||
EOF
|
||||
|
||||
printf "${root_password}\n${root_password}\n" | pass insert vigir/vigir${id}
|
||||
pass git push
|
||||
|
||||
echo "Submit to user the root password = ${root_password}"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "$0 address"
|
||||
echo " address: connect to this address, ignore the interface"
|
||||
echo " address: connect to this address (default: 192.168.8.1)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -13,8 +13,8 @@ set -x
|
|||
viwib_ip=$1; shift
|
||||
|
||||
# openwrt
|
||||
version=19.07.8
|
||||
filename=openwrt-${version}-ramips-mt76x8-gl-mt300n-v2-squashfs-sysupgrade.bin
|
||||
version=21.02.1
|
||||
filename=openwrt-${version}-ramips-mt76x8-glinet_gl-mt300n-v2-squashfs-sysupgrade.bin
|
||||
|
||||
# don't care about other/old known_host entries
|
||||
ssh-keygen -R ${viwib_ip}
|
||||
|
|
Loading…
Add table
Reference in a new issue