From 6deda27b4ca01af1e3f8a5e71fa8a7875232bba6 Mon Sep 17 00:00:00 2001 From: ZHENGLIN LI <63448884+ZhengLin-Li@users.noreply.github.com> Date: Mon, 26 Feb 2024 02:52:35 -0600 Subject: [PATCH] feat: add ci support for ceph_rados (#4191) * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * feat: add ci support for ceph_rados * Add ceph rados Signed-off-by: Xuanwo * Make sure minio is the default CI Signed-off-by: Xuanwo * Create bucket Signed-off-by: Xuanwo * Oh, ceph Signed-off-by: Xuanwo --------- Signed-off-by: Xuanwo Co-authored-by: Xuanwo --- .../s3/{minio_s3 => 0_minio_s3}/action.yml | 0 .github/services/s3/ceph_rados_s3/action.yml | 44 +++++++++++++++++ fixtures/s3/docker-compose-ceph-rados.yml | 48 +++++++++++++++++++ 3 files changed, 92 insertions(+) rename .github/services/s3/{minio_s3 => 0_minio_s3}/action.yml (100%) create mode 100644 .github/services/s3/ceph_rados_s3/action.yml create mode 100644 fixtures/s3/docker-compose-ceph-rados.yml diff --git a/.github/services/s3/minio_s3/action.yml b/.github/services/s3/0_minio_s3/action.yml similarity index 100% rename from .github/services/s3/minio_s3/action.yml rename to .github/services/s3/0_minio_s3/action.yml 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..dfb4b5ad6a6f --- /dev/null +++ b/.github/services/s3/ceph_rados_s3/action.yml @@ -0,0 +1,44 @@ +# 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 compose -f docker-compose-ceph-rados.yml up -d --wait + + # ceph/demo has support for CEPH_DEMO_BUCKET, but it doesn't work as expected. + - name: Create bucket + shell: bash + working-directory: fixtures/s3 + run: docker exec ceph-demo s3cmd mb s3://demo + + - name: Setup + shell: bash + run: | + cat << EOF >> $GITHUB_ENV + OPENDAL_S3_BUCKET=demo + OPENDAL_S3_ENDPOINT=http://127.0.0.1:8080 + OPENDAL_S3_ACCESS_KEY_ID=demo + OPENDAL_S3_SECRET_ACCESS_KEY=demo + OPENDAL_S3_REGION=us-east-1 + EOF diff --git a/fixtures/s3/docker-compose-ceph-rados.yml b/fixtures/s3/docker-compose-ceph-rados.yml new file mode 100644 index 000000000000..bcb2a153f379 --- /dev/null +++ b/fixtures/s3/docker-compose-ceph-rados.yml @@ -0,0 +1,48 @@ +# 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-demo: + image: quay.io/ceph/demo + container_name: ceph-demo + environment: + - MON_IP=127.0.0.1 + - CEPH_PUBLIC_NETWORK=0.0.0.0/0 + - DEMO_DAEMONS=osd,mds,rgw + - CEPH_DEMO_UID=demo + - CEPH_DEMO_ACCESS_KEY=demo + - CEPH_DEMO_SECRET_KEY=demo + # ceph/demo failed to create bucket for us, let's create it by hand. + # - CEPH_DEMO_BUCKET=demo + ports: + - "8080:8080" # Dashboard + - "5000:5000" # REST API + - "6789:6789" # Ceph monitor + volumes: + - ceph-vol:/var/lib/ceph/ + network_mode: "host" + # Give ceph enough time to start up, it's really, really slow. + # We will wait up to 10 minutes. + healthcheck: + test: [ "CMD", "s3cmd", "ls" ] + interval: 6s + retries: 100 + +volumes: + ceph-vol: