Skip to content

Commit

Permalink
feat: add ci support for ceph_rados
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhenglin Li committed Feb 17, 2024
1 parent 93e5f65 commit 485253c
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/services/s3/ceph_rados_s3/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

name: ceph_rados_s3
description: 'Behavior test for CEPH OBJECT GATEWAY S3.'

runs:
using: "composite"
steps:
- name: Setup MinIO Server
shell: bash
working-directory: fixtures/s3
run: docker compose -f docker-compose-minio.yml up -d --wait
- name: Set up AWS CLI
shell: bash
run: |
echo "AWS_ACCESS_KEY_ID=ceph_rados_s3_admin" >> $GITHUB_ENV
echo "AWS_SECRET_ACCESS_KEY=ceph_rados_s3_admin" >> $GITHUB_ENV
echo "AWS_DEFAULT_REGION=us-east-1" >> $GITHUB_ENV
- name: Setup test bucket
shell: bash
env:
AWS_ACCESS_KEY_ID: "ceph_rados_s3_admin"
AWS_SECRET_ACCESS_KEY: "ceph_rados_s3_admin"
AWS_EC2_METADATA_DISABLED: "true"
run: aws --endpoint-url http://127.0.0.1:8000/ s3 mb s3://test
- name: Setup
shell: bash
run: |
cat << EOF >> $GITHUB_ENV
OPENDAL_S3_BUCKET=test
OPENDAL_S3_ENDPOINT=http://127.0.0.1:8000
OPENDAL_S3_ACCESS_KEY_ID=ceph_rados_s3_admin
OPENDAL_S3_SECRET_ACCESS_KEY=ceph_rados_s3_admin
OPENDAL_S3_REGION=us-east-1
EOF
53 changes: 53 additions & 0 deletions fixtures/s3/docker-compose-ceph-rados.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

version: '3.8'

services:
ceph-rgw:
image: ceph/daemon:latest
network_mode: host
environment:
- CEPH_DAEMON=rgw
- RGW_FRONTEND_PORT=8000
- RGW_CIVETWEB_PORT=8000
- CEPH_PUBLIC_NETWORK=0.0.0.0/0
- CEPH_CLUSTER_NAME=myceph
- CEPH_RGW_FRONTEND_TYPE=beast
volumes:
- /var/lib/ceph/:/var/lib/ceph/

rgw-admin-user-setup:
image: ceph/ceph:v16
entrypoint: /bin/sh
command: -c "radosgw-admin user create --uid=admin --display-name=Admin [email protected]"
depends_on:
- ceph-rgw
environment:
- CEPH_CLUSTER_NAME=myceph
- CEPH_RGW_FRONTEND_TYPE=beast

rgw-admin-secret-setup:
image: ceph/ceph:v16
entrypoint: /bin/sh
command: -c "radosgw-admin user info --uid=admin"
depends_on:
- rgw-admin-user-setup
environment:
- CEPH_CLUSTER_NAME=myceph
- CEPH_RGW_FRONTEND_TYPE=beast

0 comments on commit 485253c

Please sign in to comment.