From 7f7b1fe8942a89bb1aef3bb6aaf0e6950a9429a2 Mon Sep 17 00:00:00 2001 From: Laura Paduano Date: Tue, 11 Dec 2018 17:24:52 +0100 Subject: [PATCH] mgr/dashboard: Object Gateway user configuration 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 --- src/pybind/mgr/dashboard/run-frontend-e2e-tests.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pybind/mgr/dashboard/run-frontend-e2e-tests.sh b/src/pybind/mgr/dashboard/run-frontend-e2e-tests.sh index eda537cc246d..87a1e6b4697b 100755 --- a/src/pybind/mgr/dashboard/run-frontend-e2e-tests.sh +++ b/src/pybind/mgr/dashboard/run-frontend-e2e-tests.sh @@ -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 -- 2.47.3