Skip to content

Commit

Permalink
Merge pull request #56 from matelakat/add-doc
Browse files Browse the repository at this point in the history
Some renames and readme fixes
  • Loading branch information
matelakat committed Jan 30, 2014
2 parents 8c72e26 + 0c2e1e8 commit 2e137c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)]()

Expand Down Expand Up @@ -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
Expand 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?

Expand Down
13 changes: 6 additions & 7 deletions xenapi-in-rs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2e137c9

Please sign in to comment.