finished staging
This commit is contained in:
25
stages/stage0-remote-run.sh
Executable file
25
stages/stage0-remote-run.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
ssh_keyfile='/export/home/cloudian/cloudian-installation-key'
|
||||
script='/tmp/nmd/nmd-md5sum-manifest/stages/stage1-gather-node-manifest.sh'
|
||||
|
||||
# Ensure environment variables are set
|
||||
if [[ -z "$ssh_keyfile" || -z "$script" ]]; then
|
||||
echo "Error: Please set 'ssh_keyfile' and 'script' environment variables."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract hostnames/IPs from /etc/hosts, skipping comments and localhost
|
||||
HOSTS=$(grep -v '^#' /etc/hosts | grep -v 'localhost' | awk '{print $2}')
|
||||
|
||||
for HOST in $HOSTS; do
|
||||
echo "--- Executing on: $HOST ---"
|
||||
|
||||
# Run the local script on the remote host using bash -s
|
||||
# -i: Uses the specified ssh_keyfile
|
||||
# -o StrictHostKeyChecking=no: Prevents the script from hanging on new host prompts
|
||||
ssh -i "$ssh_keyfile" -o StrictHostKeyChecking=no "$HOST" "bash -s" < "$script"
|
||||
|
||||
# The loop naturally waits for the SSH command to finish before the next iteration
|
||||
echo "--- Finished: $HOST ---"
|
||||
done
|
||||
|
||||
0
stages/stage1-gather-node-manifest.sh
Normal file → Executable file
0
stages/stage1-gather-node-manifest.sh
Normal file → Executable file
0
stages/stage2-analyze-clusterwide-manifests.py
Normal file → Executable file
0
stages/stage2-analyze-clusterwide-manifests.py
Normal file → Executable file
0
stages/stage3-compare-sub-manifest-c.py
Normal file → Executable file
0
stages/stage3-compare-sub-manifest-c.py
Normal file → Executable file
Reference in New Issue
Block a user