Merge "labs: add and use new cmd: queue"

This commit is contained in:
Jenkins 2014-10-05 14:09:30 +00:00 committed by Gerrit Code Review
commit ea420eb1bd
6 changed files with 35 additions and 27 deletions

View File

@ -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

View File

@ -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

View File

@ -1,2 +1,2 @@
# Scripts for Fedora installations
scripts yum_init.sh
cmd queue yum_init.sh

View File

@ -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

View File

@ -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

View File

@ -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: <dircode> <script_name>
# 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