{"id":20757400,"url":"https://github.com/hetznercloud/ceph-s3-box","last_synced_at":"2025-04-29T16:27:02.337Z","repository":{"id":223853613,"uuid":"761712878","full_name":"hetznercloud/ceph-s3-box","owner":"hetznercloud","description":"Containerized Ceph and Radosgw Playground","archived":false,"fork":false,"pushed_at":"2024-05-03T07:44:58.000Z","size":15,"stargazers_count":19,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T12:11:55.770Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hetznercloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-22T10:52:17.000Z","updated_at":"2025-02-17T05:28:25.000Z","dependencies_parsed_at":"2024-02-22T12:31:06.273Z","dependency_job_id":"1030df99-1123-441e-bf56-e4b2b7b32121","html_url":"https://github.com/hetznercloud/ceph-s3-box","commit_stats":null,"previous_names":["hetznercloud/ceph-s3-box"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hetznercloud%2Fceph-s3-box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hetznercloud%2Fceph-s3-box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hetznercloud%2Fceph-s3-box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hetznercloud%2Fceph-s3-box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hetznercloud","download_url":"https://codeload.github.com/hetznercloud/ceph-s3-box/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251538787,"owners_count":21605588,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T09:42:01.748Z","updated_at":"2025-04-29T16:27:02.300Z","avatar_url":"https://github.com/hetznercloud.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RadosGW Testing Container\n\nThis container provides an easy way to test clients with the RadosGW.\nIt's designed not to persist any data,\nutilizing the Ceph OSD with Memstore as a backend.\n\n## Dockerfile Details\n\n1. Updates and installs necessary dependencies for Ceph installation.\n2. Fetches the Ceph repository key and adds the repository for Ceph.\n3. Installs Ceph and RadosGW packages.\n4. Cleans up the container after installations to reduce its footprint.\n\n## Usage\n\n### Building the Container\n\nYou can build the container using the provided Dockerfile. Run the following command:\n\n```bash\npodman build -t radosgw .\n```\n\n### Running the Container (basic)\n\n```bash\npodman run \\\n    -p 7480:7480 \\\n    -p 8080:8080 \\\n    -e MAIN=\"none\" \\\n    -e ACCESS_KEY=\"radosgwadmin\" \\\n    -e SECRET_KEY=\"radosgwadmin\" \\\n    -ti radosgw\n```\n\nthis will start a cephcluster with a radosgw set to defaults\n\n### Running the Container in multiside-mode\n\nThe multiside mode will make use of the internal DNS in podman and will need additional aliases for the containers.\nHostnames need to be set like `zone [a-z]` `cluster [0-9]` - `name [0-9a-z]` \n\nThe Hostname will be splitt and reused for the radosgw configuration:\n\n| variable  | hostname-part                | example |\n|-----------|------------------------------|---------|\n| REALM     | `zone [a-z]`                 | dev     |\n| ZONEGROUP | `zone [a-z]`                 | dev     |\n| ZONE      | `zone [a-z]` `cluster [0-9]` | dev1    |\n\n* create a netwwork\n```bash\npodman network create local\n```\n\n* start the main-zone radosgw container\n```bash\npodman run \\\n    --hostname dev1-rgw1.dev.s3.localhost \\\n    --network-alias=dev1-dev.s3.localhost \\\n    --network-alias=dev.s3.localhost \\\n    --network=local \\\n    --ip 10.89.0.20 \\\n    -p7480:7480 \\\n    -p8080:8080 \\\n    -e MAIN=yes \\\n    -e ACCESS_KEY=\"radosgwadmin\" \\\n    -e SECRET_KEY=\"radosgwadmin\" \\\n    -e MGR_USERNAME=\"admin\" \\\n    -e MGR_PASSWORD=\"admin\" \\\n    -ti radosgw\n```\n\n* start the sub-zone radosgw container\n```bash\npodman run \\\n    --hostname dev2-rgw1.dev.s3.localhost \\\n    --network-alias=dev2-dev.s3.localhost \\\n    --network=local \\\n    --ip 10.89.0.21 \\\n    -p7481:7480 \\\n    -p8081:8080 \\\n    -e MAIN=no \\\n    -e ACCESS_KEY=\"radosgwadmin\" \\\n    -e SECRET_KEY=\"radosgwadmin\" \\\n    -e MGR_USERNAME=\"admin\" \\\n    -e MGR_PASSWORD=\"admin\" \\\n    -ti radosgw\n```\n\n\n## Environment Variables\n\n| Name         | Usage                                         |\n|--------------|-----------------------------------------------|\n| MAIN         | Is zongroup-master (yes/no), set to \"none\" by default (no multi-site setup). |\n| ACCESS_KEY   | Set to \"radosgwadmin\" by default.             |\n| SECRET_KEY   | Set to \"radosgwadmin\" by default.             |\n| MGR_USERNAME | Set zo \"admin\" by default.                    |\n| MGR_PASSWORD | Set to radosgwadmin\" by default.              |\n\n## Exposed Ports\n\n| Port | Proto | Usage            |\n|------|-------|------------------|\n| 7480 | TCP   | Ceph-RadosGW API | \n| 8080 | TCP   | Ceph-Dashboard   | \n\n## Entrypoint\n\nThe entrypoint script creates a new ceph-cluster with a radosgw expsing the s3 API. It performs the following key tasks:\n\n1. Ceph Configuration File Generation: Generates the ceph.conf file with essential configurations for Ceph.\n2. Mon (Monitor) Initialization: Creates monitor keys and initializes the monitor with associated settings.\n3. Manager Creation: Sets up Ceph manager configurations.\n4. OSD (Object Storage Daemon) Creation: Creates OSD and initializes its data directory.\n5. RadosGW (RADOS Gateway) Configuration: Sets up RADOS Gateway and generates necessary keys.\n6. S3 Admin Creation: Creates an S3 admin user.\n7. Foreground Logging: Continuously logs Ceph-related output to monitor activity.\n\n## Example usage\n\nThese examples are performed using the MinIO Client (mc) but any other s3 clients will work, too.\n\n* Set up an alias for MinIO to interact with the RADOS Gateway\n```bash\nmc alias set test http://127.0.0.1:7480 radosgwadmin radosgwadmin --api \"s3v4\" --path \"on\"\n```\n* Create a bucket named \"my-bucket\"\n```bash\nmc mb test/my-bucket\n```\n* List all buckets\n```bash\nmc ls test\n```\n* Upload a file named \"example.txt\" to the \"my-bucket\" bucket\n```bash\nmc cp example.txt test/my-bucket/example.txt\n```\n* Download the \"example.txt\" file from the \"my-bucket\" bucket\n```bash\nmc cp test/my-bucket/example.txt ./downloaded-example.txt\n```\n* Remove the \"example.txt\" file from the \"my-bucket\" bucket\n```bash\nmc rm test/my-bucket/example.txt\n```\n* Remove the \"my-bucket\" bucket\n```bash\nmc rb --force test/my-bucket\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhetznercloud%2Fceph-s3-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhetznercloud%2Fceph-s3-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhetznercloud%2Fceph-s3-box/lists"}