diff --git a/labs/config/scripts.compute b/labs/config/scripts.compute index 57bce2d6..f0679730 100644 --- a/labs/config/scripts.compute +++ b/labs/config/scripts.compute @@ -1,11 +1,11 @@ # Scripts for compute node cmd init_node -scripts etc_hosts.sh -osbash enable_vagrant_ssh_keys.sh +cmd queue etc_hosts.sh +cmd queue osbash/enable_vagrant_ssh_keys.sh cmd snapshot_cycle "network_configured" -scripts setup_nova_compute.sh +cmd queue setup_nova_compute.sh cmd snapshot_cycle "nova-compute_installed" -scripts setup_neutron_compute.sh -scripts setup_cinder_volumes.sh +cmd queue setup_neutron_compute.sh +cmd queue setup_cinder_volumes.sh cmd snapshot_cycle "pre-installed" cmd boot diff --git a/labs/config/scripts.controller b/labs/config/scripts.controller index c95fbf9b..92f283da 100644 --- a/labs/config/scripts.controller +++ b/labs/config/scripts.controller @@ -1,25 +1,25 @@ # Scripts for controller node cmd init_node -scripts etc_hosts.sh -osbash enable_vagrant_ssh_keys.sh +cmd queue etc_hosts.sh +cmd queue osbash/enable_vagrant_ssh_keys.sh cmd snapshot_cycle "network_configured" -scripts apt_install_mysql.sh -scripts install_rabbitmq.sh +cmd queue apt_install_mysql.sh +cmd queue install_rabbitmq.sh cmd snapshot_cycle "pre-openstack_installed" -scripts setup_keystone.sh +cmd queue setup_keystone.sh cmd snapshot_cycle "keystone_installed" -scripts setup_glance.sh +cmd queue setup_glance.sh cmd snapshot_cycle "glance_installed" -scripts setup_nova_controller.sh +cmd queue setup_nova_controller.sh cmd snapshot_cycle "nova-controller_installed" -scripts setup_neutron_controller.sh +cmd queue setup_neutron_controller.sh cmd snapshot_cycle "neutron-controller_installed" -scripts setup_cinder_controller.sh +cmd queue setup_cinder_controller.sh cmd snapshot_cycle "cinder_installed" -scripts setup_horizon.sh +cmd queue setup_horizon.sh cmd snapshot_cycle "horizon_installed" -scripts config_external_network.sh -scripts config_demo_user.sh -scripts config_tenant_network.sh +cmd queue config_external_network.sh +cmd queue config_demo_user.sh +cmd queue config_tenant_network.sh cmd snapshot_cycle "openstack-controller_installed" cmd boot diff --git a/labs/config/scripts.fedora b/labs/config/scripts.fedora index 6ba03953..dabefdd8 100644 --- a/labs/config/scripts.fedora +++ b/labs/config/scripts.fedora @@ -1,2 +1,2 @@ # Scripts for Fedora installations -scripts yum_init.sh +cmd queue yum_init.sh diff --git a/labs/config/scripts.network b/labs/config/scripts.network index 3b48c650..5af68a8d 100644 --- a/labs/config/scripts.network +++ b/labs/config/scripts.network @@ -1,8 +1,8 @@ # Scripts for network node cmd init_node -scripts etc_hosts.sh -osbash enable_vagrant_ssh_keys.sh +cmd queue etc_hosts.sh +cmd queue osbash/enable_vagrant_ssh_keys.sh cmd snapshot_cycle "network_configured" -scripts setup_neutron_network.sh +cmd queue setup_neutron_network.sh cmd snapshot_cycle "openstack-network_installed" cmd boot diff --git a/labs/config/scripts.ubuntu b/labs/config/scripts.ubuntu index 515da8b0..9548f9d3 100644 --- a/labs/config/scripts.ubuntu +++ b/labs/config/scripts.ubuntu @@ -1,5 +1,5 @@ # Scripts for Ubuntu installations -scripts apt_init.sh -scripts apt_upgrade.sh -scripts apt_pre-download.sh -osbash enable_vagrant_ssh_keys.sh +cmd queue apt_init.sh +cmd queue apt_upgrade.sh +cmd queue apt_pre-download.sh +cmd queue osbash/enable_vagrant_ssh_keys.sh diff --git a/labs/lib/osbash/functions.host b/labs/lib/osbash/functions.host index a2b0ecbf..aa4bd7dc 100644 --- a/labs/lib/osbash/functions.host +++ b/labs/lib/osbash/functions.host @@ -282,7 +282,7 @@ function autostart { function command_from_config { local cmd_string=( $1 ) local cmd=${cmd_string[0]} - local vm_name=$NODE_NAME + local vm_name=${NODE_NAME:-""} case "$cmd" in boot) # Boot with queued autostart files now, wait for shutdown @@ -312,6 +312,14 @@ function command_from_config { echo >&2 vm_init_node "$vm_name" vm_init_node "$vm_name" ;; + queue) + # Queue a script for autostart + # Format: + # Note: _autostart_queue takes care of dircode + local script_rel_path=${cmd_string[1]} + echo >&2 _autostart_queue "$script_rel_path" + _autostart_queue "$SCRIPTS_DIR/$script_rel_path" + ;; *) echo >&2 "Error: invalid cmd: $cmd" exit 1