Skip to content

Latest commit

 

History

History
113 lines (103 loc) · 8.3 KB

README.md

File metadata and controls

113 lines (103 loc) · 8.3 KB

Zenstack


Zenstack aims to provide a customizable, offline, and stress-free development environment for Openstack (OS) developers that can be deployed quickly and without much interaction. It is based on XenServer (dom0) but may support XCP in the future.

Friends and Family - Alternatives

Zenstack is currently in Pre-Alpha. Although it manages to perform all tasks successfully, it currently does not support customization and may not have your exact configuration. It is recommended that you ensure that the other available solutions are not better-fits for your particular situation. The below list is an incomplete list of alternatives:
  • devstack - A very popular and even less interactive install of OS.
If you are aware of or are the author of a project much like Zenstack, please contact me and I will put a link to your project here.

If you have found that Zenstack is the answer for you, welcome!

Preparatory Steps

  1. If you have a license to apply to XenServer see the section below on applying it.
  2. If you are not on a stable (fast?) Internet connection this will fail. This is for you, wireless-users.

Usage (for current supported configurations)

  1. Create a new "Other Linux 2.6.x kernel 64-bit" VM in VMware [recommended: 2 CPUs, 2048 GB RAM, 20GB HDD].

  2. There is no real need for complicated passwords in this setup, but be conscious of the fact that passwords are currently viewable as plaintext.

  3. Install XenServer but ensure you do check 'enable thin provisioning'. This will be referred to as your dom0 henceforth.

  4. Note the IP address of your dom0 and ssh into the machine as root

  5. Download the *.zip of this repository:
    wget --no-check-certificate https://github.com/roaet/zenstack/archive/master.zip
  6. Extract the zip in /root.

  7. (Optional) If you have a license place it into the same place as xs_setup.sh.

  8. Change directory to where xs_setup.sh is.

  9. Run xs_setup.sh and follow the prompts (the default values are meant to be valid). If you make a mistake during this step it is safe to CTRL+C out of the program and try again. This process will create another VM inside of your dom0 where the OS services will run (regarded as domU henceforth).

  10. There are two opportunities for the setup to require more interaction after it begins.

  11. You may be required to get the XenServer kernel data from the DDK (rare as they are provided). Just follow the directions given.

  12. You will be prompted to mount the VMware Tools (Menu > Virtual Machine > Install VMware Tools). Note the prompt that mentions the kernel headers path. It would be wise to copy this path as you will need to enter it in during the VMware Tools installation.

  13. After this point the setup will not require further interaction.

  14. The XenServer setup will continue until it outputs: all done :). This does not mean the domU you are creating to run the OS services has finished. Instructions will be displayed at the end of the dom0 install to monitor the installation progress of the domU. It is important you follow them exactly.

  15. If your internet connection is stable your VM will reboot (you will see /dev/rtc errors near the end if you are monitoring the domU, this is okay).

  16. You may run xs_setup.sh again and it will skip all steps that it can. Do this if you need to create a new VM (see: Creating a new domU) or if the install failed. It is not tested if XenServer will handle multiple domUs running at the same time.

Troubleshooting

  • Be careful when entering values as there isn't currently a good way to 'undo'.
  • If your domU fails during the install don't fret! Check out the Creating a new domU.
  • domU is failing immediately with disk write errors? You are probably out of storage space. See the Freeing some space.
  • Although rare, it is possible that the domU will not boot properly, and when you get to the part of watching its installation it will just "Segmentation Fault" and disconnect you. It is recommened that you delete that domU and create a new one.
  • If your domU setup isn't properly working even though the install succeeded, it is possible that the openstack developers have updated to a point where the automation fails. Zenstack developers intend on trying to keep up with such changes but if you beat us to it contact us about the issue, or fork it!

Creating a new domU

Creating a new domU, in case your current one is corrupted, if it failed during the install, or if you just want a fresh start is very simple. Perform the following steps as root on your dom0:
  1. Find the domU's uuid and copy it by running the command:
    xe vm-list
  2. Run the command:
    export uuid=<PASTE UUID HERE>
  3. Shut down the current domU:
    xe vm-shutdown uuid=$uuid
  4. (Do this to free up the space)
      vdiuuid=`xe vbd-list vm-uuid=$uuid params=vdi-uuid --minimal`
      xe vdi-destroy uuid=$vdiuuid
      xe vm-destroy uuid=$uuid
      
  5. Run xs_setup.sh as described in usage.

Freeing Some Space

If you haven't been removing domUs as per the above section, your storage repository will eventually fill up. When this happens all new domUs miraculously fail during install. Perform the following steps as root on your dom0 (Note: you should destroy all domU's before doing this):
  1. Find the SR named "Local storage" and copy its UUID by running the command:
    xe sr-list
  2. Run the command:
    export sruuid=<PASTE SR-UUID HERE>
  3. Run the following command:
      xe vdi-list sr-uuid=$sruuid --minimal | awk 'BEGIN{FS=","}{for (i=1; i<=NF; i++) system("xe vdi-destroy uuid="$i);}'
      

Applying License to XenServer

To apply the license to XenServer you must create a file called license.txt and place it in the same directory as the root setup script (xs_setup.sh). This license should look like this example, a PGP signed message:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

<xe_license sku_type="SKU-TYPE" version="5.0.0" productcode="PRODUCT-CODE" serialnumber="SERIAL-NUMBER" sockets="32" expiry="2082848400.000000" human_readable_expiry="2036-01-01" name="NAME" address1="" address2="" city="" state="" postalcode="" country="US" company="COMPANY NAME"/> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFKdfe3t8EvHqMeKcRAuMFAJ9kZC/VStlZBiMMtIYCt9lXQ5C2jQCfemEq INYheaaSk2MqurkDk3gTgOg= =/nrt -----END PGP SIGNATURE-----

The lack of newlines in the XML is very important.

Supported Configurations

  • Debian Squeeze (domU) hosted by XenServer 6.0.0 (dom0) running in VMware fusion 4.1.3 on OS X 10.8.2 [2.3 Ghz i7, 8 GB]
  • Debian Squeeze (domU) hosted by XenServer 6.0.0 (dom0) running in VMware fusion 5.0.2 on OS X 10.8.2 [2.3 Ghz i7, 8 GB]

Proposed Features

  • Modular selection of OS services
  • Boot up of additional services, such as Nicira's NVP
  • Proper command line hiding of passwords
  • Support for more versions of XenServer
  • Support for XCP
  • Support for different domU Operating Systems
  • Less fragile file system searches
  • Option to load OS services from different repositories
  • Option to not load VMware tools
  • Proper progress reports from domU to zenstack
  • VDI cleanup tools