From 881e1a55c75add288123f91af6e8c911ba7984f2 Mon Sep 17 00:00:00 2001 From: Lucian Petrut Date: Wed, 1 Oct 2014 12:12:06 +0300 Subject: [PATCH] Update documentation for Windows iSCSI cinder-volume driver Includes a guide for setting up Cinder Volume on Windows using the Windows iSCSI volume driver. Note that the Nova Compute Hyper-V driver documentation is to be updated as well, and as some sections are common (NTP configuration and requirements), those specific sections have been updated and linked in the Cinder Volume documentation. Change-Id: Ieb54ea6d67963f9ce2dd8f5be8e18ba96b0b4474 --- .../drivers/windows-iscsi-volume-driver.xml | 136 ++++++++++ .../drivers/windows-volume-driver.xml | 11 - .../block-storage/section_volume-drivers.xml | 2 +- .../compute/section_hypervisor_hyper-v.xml | 245 +++++++++--------- 4 files changed, 253 insertions(+), 141 deletions(-) create mode 100644 doc/config-reference/block-storage/drivers/windows-iscsi-volume-driver.xml delete mode 100644 doc/config-reference/block-storage/drivers/windows-volume-driver.xml diff --git a/doc/config-reference/block-storage/drivers/windows-iscsi-volume-driver.xml b/doc/config-reference/block-storage/drivers/windows-iscsi-volume-driver.xml new file mode 100644 index 0000000000..d04dec46ae --- /dev/null +++ b/doc/config-reference/block-storage/drivers/windows-iscsi-volume-driver.xml @@ -0,0 +1,136 @@ + +
+ + + Windows iSCSI volume driver + + Windows Server 2012 and Windows Storage Server 2012 offer an + integrated iSCSI Target service that can be used with OpenStack Block Storage + in your stack. Being entirely a software solution, consider it in particular + for mid-sized networks where the costs of a SAN might be excessive. + + The Windows cinder-volume + driver works with OpenStack Compute on any hypervisor. It includes snapshotting + support and the “boot from volume” feature. + + This driver creates volumes backed by fixed-type VHD images on Windows + Server 2012 and dynamic-type VHDX on Windows Server 2012 R2, stored locally + on a user-specified path. The system uses those images as iSCSI disks and + exports them through iSCSI targets. Each volume has its own iSCSI target. + + This driver has been tested with Windows Server 2012 and Windows Server + R2 using the Server and Storage Server distributions. + + Install the cinder-volume + service as well as the required Python components directly onto the Windows + node. + + You may install and configure cinder-volume + and its dependencies manually using the following guide or you + may use the Cinder Volume Installer, presented below. + +
+ Installing using the OpenStack cinder volume installer + + In case you want to avoid all the manual setup, you can use + Cloudbase Solutions’ installer. You can find it at + https://www.cloudbase.it/downloads/CinderVolumeSetup_Beta.msi. It + installs an independent Python environment, in order to avoid conflicts + with existing applications, dynamically generates a cinder.conf + file based on the parameters provided by you. + + cinder-volume will be + configured to run as a Windows Service, which can be restarted + using: + + PS C:\> net stop cinder-volume ; net start cinder-volume + + The installer can also be used in unattended mode. More details + about how to use the installer and its features can be found at https://www.cloudbase.it +
+ +
+ Windows Server configuration + + The required service in order to run + cinder-volume on Windows is wintarget. + This will require the iSCSI Target Server Windows feature to be installed. + You can install it by running the following command: + + PS C:\> Add-WindowsFeature +FS-iSCSITarget-ServerAdd-WindowsFeatureFS-iSCSITarget-Server + + + The Windows Server installation requires at least 16 GB of disk space. + The volumes hosted by this node need the extra space. + + + For cinder-volume to work + properly, you must configure NTP as explained in + . + + Next, install the requirements as described in . +
+ +
+ Getting the code + + Git can be used to download the necessary source code. The installer + to run Git on Windows can be downloaded here: + + + https://github.com/msysgit/msysgit/releases/download/Git-1.9.2-preview20140411/Git-1.9.2-preview20140411.exe + + Once installed, run the following to clone the OpenStack + Block Storage code. + + PS C:\> git.exe clone https://github.com/openstack/cinder.git +
+ +
+ Configure cinder-volume + + The cinder.conf file may be placed in + C:\etc\cinder. Below is a config sample for using + the Windows iSCSI Driver: + + [DEFAULT] +auth_strategy = keystone +volume_name_template = volume-%s +volume_driver = cinder.volume.drivers.windows.WindowsDriver +glance_api_servers = IP_ADDRESS:9292 +rabbit_host = IP_ADDRESS +rabbit_port = 5672 +sql_connection = mysql://root:Passw0rd@IP_ADDRESS/cinder +windows_iscsi_lun_path = C:\iSCSIVirtualDisks +verbose = True +rabbit_password = Passw0rd +logdir = C:\OpenStack\Log\ +image_conversion_dir = C:\ImageConversionDir +debug = True + + The following table contains a reference to the only driver specific + option that will be used by the Block Storage Windows driver: + + +
+ +
+ Running cinder-volume + + After configuring cinder-volume + using the cinder.conf file, you may use the following + commands to install and run the service (note that you must replace the + variables with the proper paths): + + PS C:\> python $CinderClonePath\setup.py install +PS C:\> cmd /c C:\python27\python.exe c:\python27\Scripts\cinder-volume" –-config-file $CinderConfPath +
+
diff --git a/doc/config-reference/block-storage/drivers/windows-volume-driver.xml b/doc/config-reference/block-storage/drivers/windows-volume-driver.xml deleted file mode 100644 index fa3c281a21..0000000000 --- a/doc/config-reference/block-storage/drivers/windows-volume-driver.xml +++ /dev/null @@ -1,11 +0,0 @@ -
-Windows - There is a volume back-end for Windows. Set the following in your - cinder.conf, and use the options below to configure it. - volume_driver=cinder.volume.drivers.windows.WindowsDriver - -
diff --git a/doc/config-reference/block-storage/section_volume-drivers.xml b/doc/config-reference/block-storage/section_volume-drivers.xml index dc3321f8b9..d82dfddd77 100644 --- a/doc/config-reference/block-storage/section_volume-drivers.xml +++ b/doc/config-reference/block-storage/section_volume-drivers.xml @@ -38,7 +38,7 @@ - + diff --git a/doc/config-reference/compute/section_hypervisor_hyper-v.xml b/doc/config-reference/compute/section_hypervisor_hyper-v.xml index 4eadb50ad5..aeb297ba94 100644 --- a/doc/config-reference/compute/section_hypervisor_hyper-v.xml +++ b/doc/config-reference/compute/section_hypervisor_hyper-v.xml @@ -23,7 +23,7 @@ Server and Core (with the Hyper-V role enabled), and Hyper-V Server - +
Hyper-V configuration The following sections discuss how to prepare the Windows Hyper-V node for operation @@ -35,14 +35,16 @@ it into an OS volume and VM volume. It is up to the individual deploying to decide.
-
+
Configure NTP - Network time services must be configured to ensure proper operation of the Hyper-V - compute node. To set network time on your Hyper-V host you must run the - following commands: + Network time services must be configured to ensure proper operation of the OpenStack nodes. To set network time on your Windows host you must run the following commands: C:\>net stop w32time C:\>w32tm /config /manualpeerlist:pool.ntp.org,0x8 /syncfromflags:MANUAL C:\>net start w32time + Keep in mind that the node will have to be time synchronized with + the other nodes of your OpenStack environment, so it is important to use + the same NTP server. Note that in case of an Active Directory environment, + you may do this only for the AD Domain Controller.
Configure Hyper-V virtual switching @@ -152,136 +154,121 @@ >http://ariessysadmin.blogspot.ro/2012/04/hyper-v-live-migration-of-windows.html
-
- Python Requirements - Python - Python 2.7.3 must be installed prior to installing the OpenStack Compute Driver on the - Hyper-V server. Download and then install the MSI for windows here: +
+ Requirements +
+ Python + Python 2.7 32bit must be installed as most of the libraries are not + working properly on the 64bit version. + + Setting up Python prerequisites + + Download and then install it using the MSI installer from + here: + + http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi + PS C:\> $src = “http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi” +PS C:\> $dest = “$env:temp\python-2.7.3.msi” +PS C:\> Invoke-WebRequest –Uri $src –OutFile $dest +PS C:\> Unblock-File $dest +PS C:\> Start-Process $dest + + + Make sure that the Python and + Python\Scripts paths are set up in the + PATH environment variable. + + +
+
+ Python dependencies + The following packages need to be downloaded and manually + installed: + + + setuptools + + + http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exel + + + + pip + + + http://pip.readthedocs.org/en/latest/installing.html + + + + MySQL-python + + + http://codegood.com/download/10/ + + + + PyWin32 + + + http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/pywin32-217.win32-py2.7.exe + + + + Greenlet + + + http://www.lfd.uci.edu/~gohlke/pythonlibs/#greenlet + + + + PyCryto + + + http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.win32-py2.7.exe + + + + The following packages must be installed with pip: + - - http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi - + ecdsa - Install the MSI accepting the default options. + amqp - The installation will put python in C:/python27. + wmi - - Setuptools - You will require pip to install the necessary python module dependencies. The - installer will install under the C:\python27 directory structure. Setuptools for Python - 2.7 for Windows can be download from here: - http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe - - - Python Dependencies - You must download and manually install the following packages on the Compute - node: - - - MySQL-python - - http://codegood.com/download/10/ - - - - pywin32 - Download and run the installer from the following location - - http://sourceforge.net/projects/pywin32/files/pywin32/Build%20217/pywin32-217.win32-py2.7.exe - - - - greenlet - Select the link below: - http://www.lfd.uci.edu/~gohlke/pythonlibs/ - You must scroll to the greenlet section for the following file: - greenlet-0.4.0.win32-py2.7.exe - Click on the file, to initiate the download. Once the download is complete, - run the installer. - - - You must install the following Python packages through easy_install or pip. Run the - following replacing PACKAGENAME with the following packages: - C:\>c:\Python27\Scripts\pip.exe install PACKAGE_NAME - - - amqplib - - - anyjson - - - distribute - - - eventlet - - - httplib2 - - - iso8601 - - - jsonschema - - - kombu - - - netaddr - - - paste - - - paste-deploy - - - prettytable - - - python-cinderclient - - - python-glanceclient - - - python-keystoneclient - - - repoze.lru - - - routes - - - sqlalchemy - - - simplejson - - - warlock - - - webob - - - wmi - - + PS C:\> pip install ecdsa +PS C:\> pip install amqp +PS C:\> pip install wmi +
+
+ Other dependencies + qemu-img is required for some of the image + related operations. You can get it from here: http://qemu.weilnetz.de/. You + must make sure that the qemu-img path is set in the + PATH environment variable. + Some Python packages need to be compiled, so you may use MinGW or + Visual Studio. You can get MinGW from here: + http://sourceforge.net/projects/mingw/. You must configure which + compiler to be used for this purpose by using the + distutils.cfg file in + $Python27\Lib\distutils, which can contain: + [build] +compiler = mingw32 + As a last step for setting up MinGW, make sure that the MinGW + binaries' directories are set up in PATH. +
Install Nova-compute @@ -354,7 +341,7 @@ connection=mysql://nova:passwd@IP_ADDRESS/nova Verify that you are synchronized with a network time - source. For instructions about how to configure NTP on your Hyper-V compute node, see . + source. For instructions about how to configure NTP on your Hyper-V compute node, see .