Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
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.
With Git Bash, follow Steps 1-3 of Install Python Swift Client below. Then follow the instructions on Swift Python Script

The following instructions are an alternative to installing Git Bash.

...

  1. Login to https://dashboard.cloud.sdsc.edu

  2. Select the project you want to access (See: How to Change Current Working Project)

  3. Download the OpenStack RC File (See: How To Download the OpenStack Project RC File)

  4. Open your RC file in a text editor like Notepad.

  5. Remove all lines that do not begin with export.
    You should have something similar to this:

    Image RemovedImage Added
  6. Locate the following line: export OS_PASSOWRDPASSWORD=$OS_PASSWORD_INPUT. Replace $OS_PASSWORD_INPUT with your OpenStack Login PasswordDelete this line.

  7. Replace all instances of export with setx.

  8. Replace all equal signs, =, with a space.

  9. Place quotation marks around all variable values.
    Your file should now look similar to this:

    Image RemovedImage Added

    Note: Parts of the image are censored.

  10. Click on the File Tab and click Save As.

  11. Change Save as Type to All Files. Save the file into your working directory with the extension .bat

    Image RemovedImage Added
  12. 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.

  13. Type exit in the Command Prompt to terminate the active terminal session. Then open a new Command Prompt window.

  14. In the terminal, run the following command to set the environmental variables.

    Code Block
    set|findstr OS_
  15. 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 used cd downloads.

  16. Type the file name and click Enter. You should see the following output:

    Image RemovedImage Added

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.