diff --git a/.github/services/s3/ceph_rados_s3/action.yml b/.github/services/s3/ceph_rados_s3/action.yml new file mode 100644 index 000000000000..c9094265f8bf --- /dev/null +++ b/.github/services/s3/ceph_rados_s3/action.yml @@ -0,0 +1,46 @@ +# 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 Ceph Rados Server + shell: bash + working-directory: fixtures/s3 + run: | + docker network create --driver bridge ceph-cluster-net + docker compose -f docker-compose-ceph-rados.yml up -d + - 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 + uses: 1password/load-secrets-action@v1 + with: + export-env: true + env: + OPENDAL_S3_ROOT: op://services/s3/root + OPENDAL_S3_BUCKET: op://services/s3/bucket + OPENDAL_S3_ENDPOINT: op://services/s3/endpoint + OPENDAL_S3_ACCESS_KEY_ID: op://services/s3/access_key_id + OPENDAL_S3_SECRET_ACCESS_KEY: op://services/s3/secret_access_key + OPENDAL_S3_REGION: op://services/s3/region \ No newline at end of file diff --git a/fixtures/s3/docker-compose-ceph-rados.yml b/fixtures/s3/docker-compose-ceph-rados.yml new file mode 100644 index 000000000000..d60b7ab9bb8d --- /dev/null +++ b/fixtures/s3/docker-compose-ceph-rados.yml @@ -0,0 +1,143 @@ +# 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' + +networks: + cluster-net: + external: true + name: ceph-cluster-net + +services: + mon1: + image: ceph/daemon:latest + command: "mon" + environment: + MON_IP: 172.18.0.2 + CEPH_PUBLIC_NETWORK: 172.18.0.0/16 + LANG: en_US.utf8 + TZ: UTC + volumes: + - ~/volumes_data/ceph/ceph:/etc/ceph + - ~/volumes_data/ceph/lib/:/var/lib/ceph/ + networks: + - cluster-net + + mgr: + image: ceph/daemon:latest + command: "mgr" + environment: + LANG: en_US.utf8 + TZ: UTC + volumes: + - ~/volumes_data/ceph/ceph:/etc/ceph + - ~/volumes_data/ceph/lib/:/var/lib/ceph/ + depends_on: + - mon1 + networks: + - cluster-net + ports: + - 8443:8443 + + osd1: + pid: host + privileged: true + image: ceph/daemon:latest + command: "osd_directory" + environment: + LANG: en_US.utf8 + TZ: UTC + volumes: + - ~/volumes_data/ceph/ceph:/etc/ceph + - ~/volumes_data/ceph/lib/:/var/lib/ceph/ + - ~/volumes_data/osds/osd1:/var/lib/ceph/osd + depends_on: + - mon1 + networks: + - cluster-net + + osd2: + pid: host + privileged: true + image: ceph/daemon:latest + command: "osd_directory" + environment: + LANG: en_US.utf8 + TZ: UTC + volumes: + - ~/volumes_data/ceph/ceph:/etc/ceph + - ~/volumes_data/ceph/lib/:/var/lib/ceph/ + - ~/volumes_data/osds/osd2:/var/lib/ceph/osd + depends_on: + - mon1 + networks: + - cluster-net + + osd3: + pid: host + privileged: true + image: ceph/daemon:latest + command: "osd_directory" + environment: + LANG: en_US.utf8 + TZ: UTC + volumes: + - ~/volumes_data/ceph/ceph:/etc/ceph + - ~/volumes_data/ceph/lib/:/var/lib/ceph/ + - ~/volumes_data/osds/osd3:/var/lib/ceph/osd + depends_on: + - mon1 + networks: + - cluster-net + + rgw1: + image: ceph/daemon:latest + command: "rgw" + environment: + LANG: en_US.utf8 + TZ: UTC + volumes: + - ~/volumes_data/ceph/ceph:/etc/ceph + - ~/volumes_data/ceph/lib/:/var/lib/ceph/ + depends_on: + - osd1 + - osd2 + - osd3 + networks: + - cluster-net + ports: + - 8080:7480 + + mds1: + image: ceph/daemon:latest + command: "mds" + hostname: "ceph-mds1-host" + environment: + CEPHFS_CREATE: 1 + LANG: en_US.utf8 + TZ: UTC + volumes: + - ~/volumes_data/ceph/ceph:/etc/ceph + - ~/volumes_data/ceph/lib/:/var/lib/ceph/ + depends_on: + - osd1 + - osd2 + - osd3 + networks: + - cluster-net + +