mirror of
https://github.com/ceph/ceph
synced 2024-12-29 06:52:35 +00:00
…
|
||
---|---|---|
.. | ||
src | ||
ceph-s3-upload.txt | ||
pom.xml | ||
README.md |
Introduction
This directory contains Java code examples on how to upload an object to an S3 bucket running on a Ceph RGW cluster.
Prerequisites
Linux machine running an RGW Ceph cluster. Preferably started with the OSD=1 MON=1 MDS=0 MGR=0 RGW=1 ../src/vstart.sh --debug --new
command.
Java and Maven installed on the Linux machine.
Workflow Procedure
- Install AWS CLI version 1 on your Linux machine as explained here
- Create a bucket on the Ceph cluster with the command
aws --endpoint-url http://localhost:8000 s3 mb s3://sample-bucket
- Navigate through your file system into the
ceph-s3-upload
folder using your terminal. Please ensure you see the pom.xml file. - Run
mvn clean package
to install the required Java packages on the system. - Once successful, run
java -jar target/ceph-s3-upload-1.0-SNAPSHOT-jar-with-dependencies.jar sample-bucket ceph-s3-upload.txt
to test out Java s3 object upload on Ceph RGW cluster.