This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cloud:recipe:swift [2019/11/25 07:39] chudler [Swift Kickstart] |
cloud:recipe:swift [2020/04/28 12:20] (current) chudler [Obtain Application Credentials] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | =====Swift Kickstart===== | + | =====Swift Kickstart with Rclone (demo)===== |
- | **Swift** is in preview mode and should not be used for anything important. The current cluster __will__ be destroyed and data may be removed without notice (([[cloud:status]])) . Additionally, you will need to have a conversation with TechStaff to setup a project scope before you can follow these instructions. | + | This document is a recipe showing how to use a swift client called [[ https://rclone.org | RClone ]] for a first-time user.\\ |
+ | |||
+ | **Swift** is in preview mode and should not be used for anything important. The current cluster __will__ be destroyed and data may be removed without notice (([[cloud:status]])) . Additionally, you will need to have a conversation with Techstaff to setup a project scope before you can follow these instructions.\\ | ||
+ | \\ | ||
+ | All of the data fed to the cluster should be also saved elsewhere, and you are advised against relying solely on this service at this time. | ||
====Obtain Application Credentials==== | ====Obtain Application Credentials==== | ||
== 1 Login to Web Application == | == 1 Login to Web Application == | ||
- | First, accept the certificate and login to [[https://overcloud.cs.uchicago.edu | The Dashboard]] with your CNetID and password. Write ''csldap'' in the ''domain'' field of the login page. | + | First, accept the certificate and login to [[https://overcloud.cs.uchicago.edu | The Dashboard]] with your CNetID and password. \\ |
+ | **important:** Write ''CS Account'' in the ''domain'' field of the login page. | ||
== 2 Create Application Credentials == | == 2 Create Application Credentials == | ||
- | Using the menu on the left, select "Identity -> Application Credentials" to access [[ https://overcloud.cs.uchicago.edu/dashboard/identity/application_credentials/ | Application Credentials ]] | + | Using the menu on the left, select "Identity -> Application Credentials" to access the [[ https://overcloud.cs.uchicago.edu/dashboard/identity/application_credentials/ | Application Credentials Interface ]] |
interface. Click the "+ Create Application Credential" button and fill out the form.\\ | interface. Click the "+ Create Application Credential" button and fill out the form.\\ | ||
**Be sure to download the application credentials after submitting the form** | **Be sure to download the application credentials after submitting the form** | ||
+ | |||
+ | |||
+ | **Credentials Advice:** | ||
+ | * Make the expiration date memorable such as your birthdate. | ||
+ | * Leave ''Secret'' blank | ||
+ | * Give your application ''admin'' Role (*not* unrestricted). | ||
+ | * Read the guide text on the form page | ||
+ | For example\\ | ||
+ | {{cloud:recipe:cloud_creds.png?500}} | ||
+ | == 3 Install and Configure rclone == | ||
+ | [[ https://rclone.org | RClone ]] is a swift client used as an example in this guide. Download and install rclone using the [[ https://rclone.org/install/ | Install Guide ]]. For this example, rclone binary was simply untared.\\ | ||
+ | |||
+ | Configuration of rclone should be simplified as below | ||
+ | <code> | ||
+ | $ cat ~/.config/rclone/rclone.conf | ||
+ | [techstaff] | ||
+ | type = swift | ||
+ | env_auth = true | ||
+ | auth_version = 3 | ||
+ | |||
+ | </code> | ||
+ | |||
+ | Save your Application Credentials that you downloaded in the previous step, and include them in your shell's environment before running rclone. In the below example, everything that I would like to save is already in a local directory path ''/home/chudler/backup_data'' . The remote location was named ''techstaff'' in the above configuration file. | ||
+ | |||
+ | <code> | ||
+ | source ~/app-cred-swift-backup-openrc.sh | ||
+ | ./rclone --no-check-certificate sync /home/chudler/backup_data techstaff:backup_current --backup-dir techstaff:backup_$(date -I) | ||
+ | </code> | ||
+ | |||
+ | ===Troubleshooting=== | ||
+ | |||
+ | * Rcode returns 404 after/during authentication. Change the application environment file ''OS_AUTH_URL'' variable, as below. | ||
+ | |||
+ | <code> | ||
+ | export OS_AUTH_URL=https://overcloud.cs.uchicago.edu:13000/v3 | ||
+ | </code> |