diff --git a/labs/config/scripts.compute b/labs/config/scripts.compute index 7c3ac071..addd977f 100644 --- a/labs/config/scripts.compute +++ b/labs/config/scripts.compute @@ -1,4 +1,13 @@ # Scripts for compute node +cmd init_node +scripts etc_hosts.sh +osbash enable_vagrant_ssh_keys.sh +#osbash wait_debug.sh +# Using scripts/osbash/shutdown.sh because we want Vagrant to ignore this +osbash shutdown.sh +cmd boot +cmd wait_for_shutdown +cmd snapshot "network_configured" scripts setup_nova_compute.sh scripts setup_neutron_compute.sh scripts shutdown.sh diff --git a/labs/config/scripts.controller b/labs/config/scripts.controller index a09782cf..b25b0fcb 100644 --- a/labs/config/scripts.controller +++ b/labs/config/scripts.controller @@ -1,4 +1,13 @@ # Scripts for controller node +cmd init_node +scripts etc_hosts.sh +osbash enable_vagrant_ssh_keys.sh +#osbash wait_debug.sh +# Using scripts/osbash/shutdown.sh because we want Vagrant to ignore this +osbash shutdown.sh +cmd boot +cmd wait_for_shutdown +cmd snapshot "network_configured" scripts apt_install_mysql.sh scripts install_rabbitmq.sh scripts setup_keystone.sh diff --git a/labs/config/scripts.network b/labs/config/scripts.network index f651807b..75eb4559 100644 --- a/labs/config/scripts.network +++ b/labs/config/scripts.network @@ -1,4 +1,13 @@ # Scripts for network node +cmd init_node +scripts etc_hosts.sh +osbash enable_vagrant_ssh_keys.sh +#osbash wait_debug.sh +# Using scripts/osbash/shutdown.sh because we want Vagrant to ignore this +osbash shutdown.sh +cmd boot +cmd wait_for_shutdown +cmd snapshot "network_configured" scripts setup_neutron_network.sh scripts shutdown.sh cmd boot diff --git a/labs/config/scripts.nodeinit_osbash b/labs/config/scripts.nodeinit_osbash deleted file mode 100644 index 2b6969e5..00000000 --- a/labs/config/scripts.nodeinit_osbash +++ /dev/null @@ -1,8 +0,0 @@ -# Scripts for all nodes built by osbash -scripts etc_hosts.sh -osbash enable_vagrant_ssh_keys.sh -#osbash wait_debug.sh -scripts shutdown.sh -cmd boot -cmd wait_for_shutdown -cmd snapshot "network_configured" diff --git a/labs/config/scripts.nodeinit_vagrant b/labs/config/scripts.nodeinit_vagrant deleted file mode 100644 index d30f5561..00000000 --- a/labs/config/scripts.nodeinit_vagrant +++ /dev/null @@ -1,2 +0,0 @@ -# Scripts for all nodes built using Vagrant -scripts etc_hosts.sh diff --git a/labs/lib/osbash/functions.host b/labs/lib/osbash/functions.host index 59777dfe..3cd8a388 100644 --- a/labs/lib/osbash/functions.host +++ b/labs/lib/osbash/functions.host @@ -276,6 +276,10 @@ function command_from_config { echo >&2 vm_wait_for_shutdown "$NODE_NAME" vm_wait_for_shutdown "$NODE_NAME" ;; + init_node) + echo >&2 vm_init_node "$NODE_NAME" + vm_init_node "$NODE_NAME" + ;; *) echo >&2 "Error: invalid cmd: $cmd" exit 1 diff --git a/labs/lib/osbash/virtualbox.install_node b/labs/lib/osbash/virtualbox.install_node index 1d64e962..1c89ad1b 100644 --- a/labs/lib/osbash/virtualbox.install_node +++ b/labs/lib/osbash/virtualbox.install_node @@ -39,8 +39,6 @@ function _vbox_boot_with_autostart { function vm_init_node { NODE_NAME=$1 - ${WBATCH:-:} wbatch_begin_node "$NODE_NAME" - vm_create "$NODE_NAME" # Set VM_MEM in config/config.NODE_NAME to override @@ -62,10 +60,8 @@ function vm_init_node { vm_add_share "$NODE_NAME" "$SHARE_DIR" "$SHARE_NAME" vm_attach_disk_multi "$NODE_NAME" "$BASE_DISK" #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - autostart_reset # Rename to pass the node name to the script autostart_and_rename osbash init_xxx_node.sh "init_${NODE_NAME}_node.sh" - autostart_from_config scripts.nodeinit_osbash } function vm_build_node { @@ -76,7 +72,7 @@ function vm_build_node { NODE_NAME=$1 source "$CONFIG_DIR/config.$NODE_NAME" - vm_init_node "$NODE_NAME" + ${WBATCH:-:} wbatch_begin_node "$NODE_NAME" #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - autostart_reset autostart_from_config "scripts.$NODE_NAME" diff --git a/labs/scripts/vagrant/run_scripts.sh b/labs/scripts/vagrant/run_scripts.sh index bd5e241f..3b79bde8 100755 --- a/labs/scripts/vagrant/run_scripts.sh +++ b/labs/scripts/vagrant/run_scripts.sh @@ -37,7 +37,7 @@ function vagrant_start_from_config { } # The Vagrantfile uses Ubuntu -for config_file in "scripts.nodeinit_vagrant" "scripts.ubuntu" "scripts.$HOSTNAME"; do +for config_file in "scripts.ubuntu" "scripts.$HOSTNAME"; do echo "Config file $config_file" vagrant_start_from_config "$config_file" done