commands:
base [ create | boot ] ...
- cluster [ destroy | create | update_hosts | boot ] ...
+ cluster [ destroy | create | update_hosts | boot | configure ] ...
create base
create a base image
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"
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
# Cluster
+defconf CLUSTER_TYPE "samba" \
+ "samba|ad|build" "Type of cluster, for configuration stage"
+
defconf NODES "sofs_front:0-3 rhel_base:4" \
"<nodes>" "list of node types to create, with associated IP offsets"