You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2024/02/26 08:52:40 UTC
(opendal) branch main updated: feat: add ci support for ceph_rados (#4191)
This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 6deda27b4c feat: add ci support for ceph_rados (#4191)
6deda27b4c is described below
commit 6deda27b4ca01af1e3f8a5e71fa8a7875232bba6
Author: ZHENGLIN LI <63...@users.noreply.github.com>
AuthorDate: Mon Feb 26 02:52:35 2024 -0600
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 <gi...@xuanwo.io>
* Make sure minio is the default CI
Signed-off-by: Xuanwo <gi...@xuanwo.io>
* Create bucket
Signed-off-by: Xuanwo <gi...@xuanwo.io>
* Oh, ceph
Signed-off-by: Xuanwo <gi...@xuanwo.io>
---------
Signed-off-by: Xuanwo <gi...@xuanwo.io>
Co-authored-by: Xuanwo <gi...@xuanwo.io>
---
.../s3/{minio_s3 => 0_minio_s3}/action.yml | 0
.../s3/{minio_s3 => ceph_rados_s3}/action.yml | 28 ++++++-------
fixtures/s3/docker-compose-ceph-rados.yml | 48 ++++++++++++++++++++++
3 files changed, 62 insertions(+), 14 deletions(-)
diff --git a/.github/services/s3/minio_s3/action.yml b/.github/services/s3/0_minio_s3/action.yml
similarity index 100%
copy from .github/services/s3/minio_s3/action.yml
copy to .github/services/s3/0_minio_s3/action.yml
diff --git a/.github/services/s3/minio_s3/action.yml b/.github/services/s3/ceph_rados_s3/action.yml
similarity index 64%
rename from .github/services/s3/minio_s3/action.yml
rename to .github/services/s3/ceph_rados_s3/action.yml
index 1be2e5a7d0..dfb4b5ad6a 100644
--- a/.github/services/s3/minio_s3/action.yml
+++ b/.github/services/s3/ceph_rados_s3/action.yml
@@ -15,30 +15,30 @@
# specific language governing permissions and limitations
# under the License.
-name: minio_s3
-description: 'Behavior test for Minio S3.'
+name: ceph_rados_s3
+description: 'Behavior test for CEPH OBJECT GATEWAY S3'
runs:
using: "composite"
steps:
- - name: Setup MinIO Server
+ - name: Setup Ceph Rados Server
shell: bash
working-directory: fixtures/s3
- run: docker compose -f docker-compose-minio.yml up -d --wait
- - name: Setup test bucket
+ 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
- env:
- AWS_ACCESS_KEY_ID: "minioadmin"
- AWS_SECRET_ACCESS_KEY: "minioadmin"
- AWS_EC2_METADATA_DISABLED: "true"
- run: aws --endpoint-url http://127.0.0.1:9000/ s3 mb s3://test
+ 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=test
- OPENDAL_S3_ENDPOINT=http://127.0.0.1:9000
- OPENDAL_S3_ACCESS_KEY_ID=minioadmin
- OPENDAL_S3_SECRET_ACCESS_KEY=minioadmin
+ 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 0000000000..bcb2a153f3
--- /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: