Compare commits

...

6 commits

Author SHA1 Message Date
Nico Schottelius
e7b56339f1 ++comment 2021-11-21 11:19:19 +01:00
Nico Schottelius
9fec5ad1ed k8s: add script to do something on all nodes of the cluster 2021-11-20 11:55:14 +01:00
920833fa9b
ONE / Debian: update to bulleyes 2021-11-18 16:31:57 +01:00
Nico Schottelius
fb232542b3 openwrt: rename for better distinguishing 2021-11-16 14:29:46 +01:00
Nico Schottelius
ee7a504bba vigir: store password in password store 2021-11-16 14:17:22 +01:00
Nico Schottelius
2d4fe86996 viwib: crorect firmware link 2021-11-16 14:17:08 +01:00
5 changed files with 18 additions and 8 deletions

11
k8s/pssh-all-nodes.sh Executable file
View 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"

View file

@ -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

View file

@ -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}"

View file

@ -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}