diff --git a/web/support/kb/objstore/s3_quick_tutorial.rst b/web/support/kb/objstore/s3_quick_tutorial.rst index f70efb4b14afd2e0c264b3260382db5c71b5cbf3..9a942d3f76c3b4fe5a351031248196e92af28b5e 100644 --- a/web/support/kb/objstore/s3_quick_tutorial.rst +++ b/web/support/kb/objstore/s3_quick_tutorial.rst @@ -8,6 +8,23 @@ You may use: * `s3cmd`_ to manipulate buckets (create, get/put objects) from command line * `s3fs <https://github.com/s3fs-fuse/s3fs-fuse>`_ to mount containers as filesystems +Both tools need ec2 credentials to be created. + +Create EC2 credentials +---------------------- + +Create and download an `application credential <https://cloud.garr.it/compute/app-credential/>`_ from openstack dashboard as *app-credentials.sh*. + +You need to install the Openstack cli as described here in the `cli tutorial <https://cloud.garr.it/compute/install-cli/>`. + +Then execute the content of the file:: + + $ source app-credentials.sh + +And create the ec2 credentials:: + + $ openstack ec2 credentials create -c access -c secret -f value | paste -sd: | tee ~/.passwd-s3fs ~/.s3cfg + S3cmd: manipulate object storage from command line -------------------------------------------------- @@ -24,10 +41,16 @@ commands:: Configure environment ********************* -Create and download an `application credential <https://cloud.garr.it/compute/app-credential/>`_ from openstack dashboard, and take note of the *access_key* and -the *secret_key*. -Create a file ``~/.s3cfg`` with the following content:: +Modify ``~/.s3cfg``:: + + $ nano `~/.s3cfg + +Comment the content adding ``#`` before the string:: + + #<ACCESS-KEY>:<SECRET-KEY> + +and add the following content:: [default] access_key = <put_your_ACCESS-KEY_here> @@ -108,22 +131,10 @@ N.B. These instructions refer to version 1.86 available on Ubuntu 20.04. Differe Uncomment *user_allow_other* option by removing the *#*:: $ nano /etc/fuse.conf + +Assign the right permissions to configuration file:: -Create application credential -***************************** - -Create and download an `application credential <https://cloud.garr.it/compute/app-credential/>`_ from openstack dashboard as *app-credentials.sh*. - -You need to install the Openstack cli as described here in the `cli tutorial <https://cloud.garr.it/compute/install-cli/>`. - -Then execute the content of the file:: - - $ source app-credentials.sh - -And create the ec2 credentials:: - - $ openstack ec2 credentials create -c access -c secret -f value | paste -sd: > ${HOME}/.passwd-s3fs - $ chmod 600 .passwd-s3fs + $ chmod 600 ~/.passwd-s3fs Mount a container ********************