From 8c0bc886bdea48aa57c9d5598803929fcd560ae4 Mon Sep 17 00:00:00 2001
From: Delia <delia.passalacqua@garr.it>
Date: Thu, 14 Nov 2019 14:28:36 +0100
Subject: [PATCH] Add instructions to create configuration file with variables

---
 .../kb/openstack/rclone_quick_tutorial.rst    | 38 ++++++++++++++-----
 1 file changed, 29 insertions(+), 9 deletions(-)

diff --git a/web/support/kb/openstack/rclone_quick_tutorial.rst b/web/support/kb/openstack/rclone_quick_tutorial.rst
index 0d86a3ad..e83456b6 100644
--- a/web/support/kb/openstack/rclone_quick_tutorial.rst
+++ b/web/support/kb/openstack/rclone_quick_tutorial.rst
@@ -8,28 +8,48 @@ Installing and configuring
 If not yet installed on your machine, you can install **rclone** with the following command::
 
     $ curl https://rclone.org/install.sh | sudo bash
+  
+Download OpenStack credentials
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Create and download an `application credential <https://cloud.garr.it/compute/app-credential/>`_ from openstack dashboard as **app-credentials.sh**
 
-Then edit the Rclone configuration file::
+In order to use **Rclone**, you can either load the configuration from environment either write them directly in the configuration file. Choose the best approach for your needs.
+
+In both cases, you should edit the Rclone configuration file::
 
     $ nano .rclone.conf
     
-to  look like this::
+Case 1: Take variables from environment
+"""""""""""""""""""""""""""""""""""""""
+
+Add the following text to *rclone.conf*::
 
     [garr-cloud]
     type = swift
     env_auth = true
 
-    
-Download OpenStack credentials
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Create and download an `application credential <https://cloud.garr.it/compute/app-credential/>`_ from openstack dashboard as **app-credentials.sh**
-
 Then execute the content of the file::
 
     $ source app-credentials.sh
-    
+   
+Case 2: Write variables in the configuration file
+"""""""""""""""""""""""""""""""""""""""""""""""""
+Take note of these two variables in *app-credentials.sh*::
+
+	OS_APPLICATION_CREDENTIAL_ID
+	OS_APPLICATION_CREDENTIAL_SECRET
+	
+Add the following text to *rclone.conf*::
+
+	[garr-cloud]
+	type = swift
+	auth = https://keystone.cloud.garr.it:5000/v3/
+	auth_version = 3
+	application_credential_id = <insert here the content of OS_APPLICATION_CREDENTIAL_ID>
+	application_credential_secret = <insert here the content of OS_APPLICATION_CREDENTIAL_SECRET>
 
+    
 Check configuration
 ^^^^^^^^^^^^^^^^^^^
 
-- 
GitLab