From 0c2e1e8dfe09233ba5a8e9848212f5228412c805 Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Thu, 30 Jan 2014 10:14:57 +0000 Subject: [PATCH] Some renames and readme fixes --- README.md | 10 +++------- xenapi-in-rs.sh | 13 ++++++------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 709d3a7..2c277e5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -xenapi-in-the-cloud -=================== +# xenapi-in-the-cloud [![Build Status](http://downloads.vmd.citrix.com/OpenStack/build-statuses/xenapi-in-the-cloud.png?someparam)]() @@ -70,8 +69,6 @@ address, the XenServer will be accessible on the IP address: `192.168.33.2`. If no appliance was given, you will be able to access dom0 through the public IP. -Halt the instance before you snapshot it. - ## Testing Make sure, that you have `nova` installed, and that your environment has all @@ -80,11 +77,10 @@ the settings. For setting up your environment and nova, please refer to After these steps, run: - ./test-rs.sh STAGING_VM VM_POSTFIX + ./test-rs.sh $STAGING_VM_URL $VM_POSTFIX Investigate the return code and its output. `0` return code indicates that the -setup script works, and the instance could be used in a cloud environment, -assuming proper use (halt before snapshot) +setup script works, and the instance could be used in a cloud environment. ## How Does it Work? diff --git a/xenapi-in-rs.sh b/xenapi-in-rs.sh index 3cc128a..8a547f8 100644 --- a/xenapi-in-rs.sh +++ b/xenapi-in-rs.sh @@ -36,9 +36,8 @@ # Snapshots # ~~~~~~~~~ # 1.) Delete "$FILE_TO_TOUCH_ON_COMPLETION" -# 2.) Shut down the instance -# 3.) Create snapshot -# 4.) When booting instances from the snapshot, poll +# 2.) Create snapshot +# 3.) When booting instances from the snapshot, poll # "$FILE_TO_TOUCH_ON_COMPLETION" set -eux @@ -60,7 +59,7 @@ DOMZERO_USER=domzero function main() { case "$(get_state)" in "START") - create_upstart_config + run_this_script_on_each_boot create_resizing_initramfs_config update_initramfs set_state "SETUP_INSTALLER" @@ -70,7 +69,7 @@ function main() { delete_resizing_initramfs_config update_initramfs download_xenserver_files /root/xenserver.iso - download_minvm_xva + download_appliance create_ramdisk_contents /root/xenserver.iso /xsinst extract_xs_installer /root/xenserver.iso /opt/xs-install generate_xs_installer_grub_config /opt/xs-install file:///tmp/ramdisk/answerfile.xml @@ -219,7 +218,7 @@ function update_initramfs() { update-initramfs -u } -function create_upstart_config() { +function run_this_script_on_each_boot() { cat > /etc/init/xenserver.conf << EOF start on stopped rc RUNLEVEL=[2345] @@ -249,7 +248,7 @@ function download_xenserver_files() { wget -qO "$tgt" "$XENSERVER_ISO_URL" } -function download_minvm_xva() { +function download_appliance() { if [ -n "$STAGING_APPLIANCE_URL" ]; then wget -qO /root/staging_vm.xva "$STAGING_APPLIANCE_URL" fi