It is possible to use the OpenStack command-line interface on a Windows computer by installing the following:
- The OpenStack client
Once you've installed those three things and have set some environment variables for your Windows user, you can use Windows Command Prompt or Windows PowerShell to manage your DreamCompute project.
Windows PowerShell is a command line and scripting environment. It excels at task automation and configuration management.
For help installing/locating Windows PowerShell, see Microsoft's documentation here.
Step 1 — Install Python and pip
- Download the latest Python 2 release from Python's website: http://python.org/downloads/windows/
- After clicking the most recent Python 2 release, choose to download the Windows X86-64 MSI Installer.
- Install Python by double-clicking the MSI package that you just downloaded and completing the installation wizard.
Make sure that the 'pip' and 'Add python.exe to Path' features will be installed on your local hard drive.
Step 2 — Install the OpenStack client
You must first open the command prompt in your version of Windows.
- Click the Start button, and then type 'cmd' in the search bar (where it says 'search for programs and files').
Windows 8 & 10
- Click the Windows logo while holding the R key at the same time.
- The run box appears.
- In the run box, type
cmdand then hit the 'Enter' key.
In the command prompt, enter the following:
C:\Users\username> pip install python-openstackclient
Step 3 — Set environment variables
You now need to set environment variables for your Windows user so your OpenStack client commands are authenticated against your project. The easiest way to do this is to download your openrc file, modify/re-save it as a Windows batch file, and execute it once.
Downloading your openrc file
View the following article for instructions:
Modify the file
Once you've downloaded your openrc file, you'll need to modify/re-save it as a batch file. Open the file in a text editor like Notepad and remove everything except the following lines:
export OS_AUTH_URL=https://iad2.dream.io:5000/v2.0 export OS_TENANT_ID=tenantid export OS_TENANT_NAME="tenantname" export OS_USERNAME="username"
Make the following adjustments to the file:
- Replace all instances of 'export' with 'setx'
- Place double quote marks (") around all of your variable values (i.e. 'https://iad2.dream.io:5000/v2.0', 'tenantid', etc.).
The file should now look like this:
setx OS_AUTH_URL "https://iad2.dream.io:5000/v2.0" setx OS_TENANT_ID "tenantid" setx OS_TENANT_NAME "tenantname" setx OS_USERNAME "username"
Save the file with the extension 'bat' (example: dhc-123456-openrc.bat).
Make sure that the file isn't saved with an additional .txt extension or Windows will not be able to execute the script.
Execute the file
You must now execute the script as an administrator. Locate the saved file in Windows Explorer, right-click, and select the 'Run as administrator' option.
After running the script, all necessary environmental variables should be set. You can now use the OpenStack command line client to manage your DreamCompute project. For a review of some of the basic commands, view the following article:
If you're having issues connecting, double-check your environment variables. You can do this either from the System Properties Control panel area, Windows PowerShell, or the Windows Command Prompt. In Windows PowerShell, run this command:
C:\Users\username> Get-ChildItem Env:OS_* Name Value ---- ----- OS_USERNAME username OS_TENANT_NAME tenantname OS_AUTH_URL https://iad2.dream.io:5000/v2.0 OS_TENANT_ID tenantid
In Windows Command Prompt, run this command:
C:\Users\username> set|findstr OS_ OS_AUTH_URL=https://iad2.dream.io:5000/v2.0 OS_TENANT_ID=tenantid OS_TENANT_NAME=tenantname OS_USERNAME=username