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 18, 2024
1 parent 93e5f65 commit 5873e29
Show file tree
Hide file tree
Showing 2 changed files with 189 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/services/s3/ceph_rados_s3/action.yml
Original file line number Diff line number Diff line change
@@ -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
143 changes: 143 additions & 0 deletions fixtures/s3/docker-compose-ceph-rados.yml
Original file line number Diff line number Diff line change
@@ -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


0 comments on commit 5873e29

Please sign in to comment.