Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloud transition: Getting the cloud user creds securely from cephci-j… #571

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rgw/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
boto
boto3
ConfigParser
configobj
jinja2
names
python-swiftclient
Expand Down
14 changes: 10 additions & 4 deletions rgw/v2/tests/s3_swift/reusable.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import time
import timeit

import configobj
viduship marked this conversation as resolved.
Show resolved Hide resolved
import v2.lib.manage_data as manage_data
import v2.lib.resource_op as s3lib
import v2.utils.utils as utils
Expand Down Expand Up @@ -1622,19 +1623,24 @@ def prepare_for_bucket_lc_transition(config):
)
else:
if config.test_ops.get("test_ibm_cloud_transition", False):
target_path = "13-ibm-bucket-1"
wget_cmd = "curl -o ibm_cloud.env http://magna002.ceph.redhat.com/cephci-jenkins/ibm_cloud_file"
utils.exec_shell_cmd(cmd=f"{wget_cmd}")
ibm_config = configobj.ConfigObj("ibm_cloud.env")
target_path = ibm_config["TARGET"]
access = ibm_config["ACCESS"]
secret = ibm_config["SECRET"]
endpoint = ibm_config["ENDPOINT"]
utils.exec_shell_cmd(
f"radosgw-admin zonegroup placement add --rgw-zonegroup {zonegroup} --placement-id default-placement --storage-class CLOUDIBM --tier-type=cloud-s3"
)
if config.test_ops.get("test_retain_head", False):
utils.exec_shell_cmd(
f"radosgw-admin zonegroup placement add --rgw-zonegroup {zonegroup} --placement-id default-placement --storage-class CLOUDIBM --tier-type=cloud-s3 --tier-config=endpoint=http://s3.au-syd.cloud-object-storage.appdomain.cloud,access_key=2ee29c1e110d4f4bae3e98d54eb42123,secret=0198297e5fede60c94c49fbc77574bd294fad1ce5232e02c,target_path={target_path},multipart_sync_threshold=44432,multipart_min_part_size=44432,retain_head_object=true,region=au-syd"
f"radosgw-admin zonegroup placement add --rgw-zonegroup {zonegroup} --placement-id default-placement --storage-class CLOUDIBM --tier-type=cloud-s3 --tier-config=endpoint={endpoint},access_key={access},secret={secret},target_path={target_path},multipart_sync_threshold=44432,multipart_min_part_size=44432,retain_head_object=true,region=au-syd"
)
else:
utils.exec_shell_cmd(
f"radosgw-admin zonegroup placement add --rgw-zonegroup {zonegroup} --placement-id default-placement --storage-class CLOUDIBM --tier-type=cloud-s3 --tier-config=endpoint=http://s3.au-syd.cloud-object-storage.appdomain.cloud,access_key=2ee29c1e110d4f4bae3e98d54eb42123,secret=0198297e5fede60c94c49fbc77574bd294fad1ce5232e02c,target_path={target_path},multipart_sync_threshold=44432,multipart_min_part_size=44432,retain_head_object=false,region=au-syd"
f"radosgw-admin zonegroup placement add --rgw-zonegroup {zonegroup} --placement-id default-placement --storage-class CLOUDIBM --tier-type=cloud-s3 --tier-config=endpoint={endpoint},access_key={access},secret={secret},target_path={target_path},multipart_sync_threshold=44432,multipart_min_part_size=44432,retain_head_object=false,region=au-syd"
)

else:
target_path = "aws-bucket-01"
utils.exec_shell_cmd(
Expand Down
Loading