]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Object Gateway user configuration 25494/head
authorLaura Paduano <lpaduano@suse.com>
Tue, 11 Dec 2018 16:24:52 +0000 (17:24 +0100)
committerLaura Paduano <lpaduano@suse.com>
Tue, 11 Dec 2018 16:24:52 +0000 (17:24 +0100)
In order to be able to access and test the Object Gateway
within our end-to-end tests it needs to be configured properly.
This script will now take care of creating and configuring
a user and will set the corresponding credentials for the user.

Signed-off-by: Laura Paduano <lpaduano@suse.com>
src/pybind/mgr/dashboard/run-frontend-e2e-tests.sh

index eda537cc246d8037f75525d9a45b0e05073b9845..87a1e6b4697b4a9212d931f548ff60177a3b09ec 100755 (executable)
@@ -46,6 +46,16 @@ if [ "$BASE_URL" == "" ]; then
     MGR=2 RGW=1 ../src/vstart.sh -n -d
     sleep 10
 
+    # Create an Object Gateway User
+    ./bin/radosgw-admin user create --uid=dev --display-name=Developer --system
+    # Set the user-id
+    ./bin/ceph dashboard set-rgw-api-user-id dev
+    # Obtain and set access and secret key for the previously created user
+    ./bin/ceph dashboard set-rgw-api-access-key `./bin/radosgw-admin user info --uid=dev | jq .keys[0].access_key | sed -e 's/^"//' -e 's/"$//'`
+    ./bin/ceph dashboard set-rgw-api-secret-key `./bin/radosgw-admin user info --uid=dev | jq .keys[0].secret_key | sed -e 's/^"//' -e 's/"$//'`
+    # Set SSL verify to False
+    ./bin/ceph dashboard set-rgw-api-ssl-verify False
+
     BASE_URL=`./bin/ceph mgr services | jq .dashboard`
 fi