diff options
author | Martin Schwenke <martin@meltin.net> | 2014-06-20 16:19:27 +1000 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2014-07-02 14:17:17 +1000 |
commit | cced5622776465b650df5ef3b8e22766706722b1 (patch) | |
tree | b0e1d95f33f2f8bfc4bfe1c6730de90ccd28a7c8 /autocluster | |
parent | 7dc9a243914ca258afbff61d574b0579fb36951b (diff) | |
download | autocluster-cced5622776465b650df5ef3b8e22766706722b1.tar.gz autocluster-cced5622776465b650df5ef3b8e22766706722b1.tar.xz autocluster-cced5622776465b650df5ef3b8e22766706722b1.zip |
Add "cluster configure" command
Signed-off-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'autocluster')
-rwxr-xr-x | autocluster | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/autocluster b/autocluster index 1f62441..a4f6d70 100755 --- a/autocluster +++ b/autocluster @@ -54,7 +54,7 @@ EOF commands: base [ create | boot ] ... - cluster [ destroy | create | update_hosts | boot ] ... + cluster [ destroy | create | update_hosts | boot | configure ] ... create base create a base image @@ -571,6 +571,47 @@ cluster_boot () echo "" } +cluster_configure () +{ + announce "cluster configure \"${CLUSTER}\"" + [ -n "$CLUSTER" ] || die "\$CLUSTER not set" + + local n1="${CLUSTER}n1" + local ssh="ssh -o StrictHostKeyChecking=no" + + case "$CLUSTER_TYPE" in + "build") + # Build node doesn't really need CTDB/Samba to be + # installed, if the packages are not present in the repo, + # they're skipped. + $ssh "$n1" "./scripts/setup_build.sh || true" + ;; + + "ad") + $ssh "$n1" ./scripts/setup_ad_server.sh + ;; + + "samba") + [ -n "$CLUSTER_PATTERN" ] || CLUSTER_PATTERN="$CLUSTER" + + local nodes=$(vircmd dominfo "$CLUSTER_PATTERN" 2>/dev/null | \ + sed -n -e 's/Name: *//p') + + for i in $nodes ; do + $ssh "$i" ./scripts/install_gpfs_nas.sh + done + $ssh "$n1" ./scripts/setup_gpfs.sh + + if [ "$AUTH_METHOD" = "winbind" ]; then + args="-UAdministrator%${AD_ADMIN_PASS}" + else + args="" + fi + $ssh "$n1" ./scripts/setup_cluster.sh "$args" + ;; + esac +} + create_one_node () { CLUSTER="$1" @@ -1357,7 +1398,7 @@ case "$t" in actions_init for t in "$@" ; do case "$t" in - destroy|create|update_hosts|boot) + destroy|create|update_hosts|boot|configure) actions_add "cluster_${t}" ;; *) usage ;; esac |