2. Upload objects: swift upload my -container /path/to/file1 /path/to/file2 3. Verify the uploaded files: swift list my -container Explanation: Swift compatibility ensures seamless integration with OpenStack and other Swift -based object storage systems. Set up bucket replication between two zones in a multisite RADOS Gateway setup and verify replication status. ee the solution below. Solution: 1. Enable replication in the zonegroup: radosgw -admin zonegroup modify --rgw-zonegroup=multi -zone -group --replication=enabled 2. Set up bucket replication: radosgw -admin bucket sync enable --bucket=bucket -name 3. Verify replication status: radosgw -admin bucket sync status --bucket=bucket -name Explanation: Bucket replication in multisite setups ensures data consistency and redundancy across geographically distributed zones. Export RADOS Gateway logs to an external logging service and verify log forwarding. ee the solution below. Solution:
1. Enable external logging in the configuration: rgw_log_http_headers = true rgw_log_object_name = true rgw_log_sharded_index = true 2. Forward logs to an external service (e.g., Fluentd): logger -t radosgw <log -entry> 3. Verify logs in the external service. Explanation: Exporting logs to external services centralizes monitoring and improves observability in enterprise environments. Configure lifecycle rules for automatic object expiration in a Swift container. ee the solution below. Solution: 1. Create a lifecycle rule: swift post my -container -m "X -Delete -After:2592000" 2. Verify the lifecycle rule: swift stat my -container 3. Test the expiration by uploading a file and observing deletion after the specified time. Explanation: Lifecycle rules automate object deletion, optimizing storage usage and reducing costs for inactive objects. Enable cross -origin resource sharing (CORS) for a bucket in RADOS Gateway and verify access from a web application. ee the solution below.
Solution: 1. Enable CORS in the bucket policy: aws s3api put -bucket -cors --bucket bucket -name --cors-configuration file://cors.json 2. Verify the CORS configuration: aws s3api get -bucket -cors --bucket bucket -name Explanation: CORS enables web applications in one domain to access resources in another, facilitating secure cross - domain integrations. Enable logging for a Swift container and verify access logs for uploaded and downloaded objects. ee the solution below. Solution: 1. Enable container logging: swift post my -container -m "X -Container -Read:.r:*" 2. Verify logs in the storage backend for object access. Explanation: Enabling logging for Swift containers provides visibility into object access and operations for monitoring and troubleshooting. Configure a bucket policy in RADOS Gateway to allow public read access to specific objects. ee the solution below. Solution: 1. Create a bucket policy JSON file (policy.json): { "Version": "2012 -10-17", "Statement": [
{ "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::bucket -name/*" } ] } 2. Apply the bucket policy: aws s3api put -bucket -policy --bucket bucket -name --policy file://policy.json 3. Verify public access: Test access to objects via a browser or command line. Explanation: Bucket policies enable fine -grained access control, allowing public read access for specific use cases. Deploy a RADOS Gateway with SSL termination and verify secure access. ee the solution below. Solution: 1. Generate an SSL certificate: openssl req -newkey rsa:2048 -nodes -keyout rgw.key -x509 -days 365 -out rgw.crt 2. Update the RADOS Gateway configuration: rgw_frontends = beast ssl_port=443 ssl_certificate=/path/to/rgw.crt 3. Restart the RADOS Gateway: systemctl restart ceph -radosgw@rgw.<hostname> 4. Verify HTTPS access: Test access via https://<rgw -host> in a browser. Explanation: SSL termination ensures secure communications to the RADOS Gateway, protecting sensitive data.
Create a lifecycle policy to transition objects to a different storage tier after 30 days in RADOS Gateway. ee the solution below. Solution: 1. Define a lifecycle policy (lifecycle.json): { "Rules": [ { "ID": "TransitionRule", "Status": "Enabled", "Transitions": [ { "Days": 30, "StorageClass": "GLACIER" } ] } ] } 2. Apply the policy to a bucket: aws s3api put-bucket -lifecycle -configuration --bucket bucket -name --lifecycle -configuration file://lifecycle.json 3. Verify the policy: aws s3api get -bucket -lifecycle -configuration --bucket bucket -name Explanation: Lifecycle policies automate object transitions to cost -effective storage tiers, optimizing storage costs. Configure user quotas in RADOS Gateway to limit the number of objects a user can store. ee the solution below. Solution: 1. Set a user object quota:
3. Apply the new CRUSH map: crushtool -c crush.txt -o crush.map ceph osd setcrushmap -i crush.map Explanation: CRUSH maps define how data is distributed across OSDs. Customizing these maps allows fine-grained control over data placement. Set up Ceph storage with authentication enabled and verify that clients require keys to access the cluster. ee the solution below. Solution: 1. Enable authentication in the Ceph configuration file: ceph config set mon auth_allow_insecure_global_id_reclaim false 2. Generate a client key: ceph auth get -or-create client.admin 3. Verify client access using the key: ceph -s --keyring /etc/ceph/ceph.client.admin.keyring Explanation: Enabling authentication adds a layer of security, ensuring only authorized clients can interact with the cluster. Deploy Ceph storage and configure BlueStore as the OSD backend for optimal performance. ee the solution below. Solution: 1. Update the playbook with BlueStore settings: osd_objectstore: bluestore