mirror of
https://github.com/ceph/ceph
synced 2024-12-28 22:43:29 +00:00
…
|
||
---|---|---|
.. | ||
fortuna.txt | ||
go.mod | ||
go.sum | ||
object-upload.go | ||
README.md |
Introduction
This directory contains Golang code examples on how to upload an object to an S3 bucket running on a Ceph RGW cluster.
Prerequisite
Linux machine running an RGW Ceph cluster. Preferrably started with the OSD=1 MON=1 MDS=0 MGR=0 RGW=1 ../src/vstart.sh --debug --new
command.
Go installed on the Linux machine.
Workflow Procedure
- Install AWS CLI version one 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 to where the Go example code is using your terminal.
- Run
go mod tidy
to install the required Go packages on the system. - Run the Go program as
go run object-upload.go sample-bucket fortuna.txt
on the terminal window to test out object upload to Ceph RGW cluster.