Info |
---|
For Windows Users, it is recommended to install Git for Windows and use Git Bash to source the environment variables and run all CLI commands. |
...
Login to https://dashboard.cloud.sdsc.edu
Select the project you want to access (See: How to Change Current Working Project)
Download the OpenStack RC File (See: How To Download the OpenStack Project RC File)
Open your RC file in a text editor like Notepad.
Remove all lines that do not begin with
export
.
You should have something similar to this:Locate the following line:
export OS_PASSOWRDPASSWORD=$OS_PASSWORD_INPUT
. Replace$OS_PASSWORD_INPUT
with your OpenStack Login PasswordDelete this line.Replace all instances of
export
withsetx
.Replace all equal signs,
=
, with a space.Place quotation marks around all variable values.
Your file should now look similar to this:Note: Parts of the image are censored.
Click on the File Tab and click Save As.
Change Save as Type to All Files. Save the file into your working directory with the extension .bat
Locate the saved bat file, right-click and select the Run As Administrator option. This will add your variables as environmental variables, but not in your current Command Prompt session yet.
Type
exit
in the Command Prompt to terminate the active terminal session. Then open a new Command Prompt window.In the terminal, run the following command to set the environmental variables.
Code Block set|findstr OS_
To manually check that the variable properties were set correctly, navigate to the directory of the bat file.
Code Block cd directorypath
Replace
directorypath
with the bat file directory. In this example, we usedcd downloads
.Type the file name and click
Enter
. You should see the following output:
This completes this setup and enables the use of swift commands in the Command Prompt for Windows users. Please refer to this page for Command Line Examples.
Note: The password was not saved as an environmental variable for security reasons. So in addition to using the swift commands, you’ll need to add --os-password password123
at the end of every command. password123
would be replaced with your OpenStack Project password.
Some examples:
Code Block |
---|
swift list --os-password password123
swift upload container file_location --os-password password123 |
Info |
---|
To switch RC File projects, one would need to delete and remove all OS variables from the User Environmental Variables list and repeat the instructions above for the desired openrc.sh file. |