forked from seaweedfs/seaweedfs
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an e2e workflow to test FUSE mount
- Loading branch information
Showing
5 changed files
with
121 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: "go: build binary" | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
concurrency: | ||
group: ${{ github.head_ref }}/e2e | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
defaults: | ||
run: | ||
working-directory: docker | ||
|
||
jobs: | ||
e2e: | ||
name: End to End | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v2 | ||
|
||
- name: Build SeaweedFS + docker image | ||
run: make build | ||
|
||
- name: Install mount binary | ||
run: cp ./weed /usr/local/sbin/mount.weed | ||
|
||
- name: Start containers | ||
run: docker-compose -f ./compose/e2e.yml up --wait | ||
|
||
- name: Mount | ||
run: mount -t weed fuse /mnt -o 'filer=localhost:8888,filer.path=/' | ||
|
||
- name: TEST | ||
run: ls -las --color /mnt; echo 'fregregerger' > /mnt/test; ls -las --color /mnt; cat /mnt/test | ||
|
||
- name: Stop containers | ||
if: always() | ||
run: docker-compose -f ./compose/e2e.yml down --volumes --remove-orphans --rmi all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
version: '3.9' | ||
|
||
services: | ||
master: | ||
image: chrislusf/seaweedfs:local | ||
ports: | ||
- "9333:9333" | ||
- "19333:19333" | ||
command: "-v=1 master -ip=master" | ||
healthcheck: | ||
test: [ "CMD", "curl", "--fail", "-I", "http://localhost:9333/cluster/healthz" ] | ||
interval: 3s | ||
timeout: 30s | ||
|
||
volume: | ||
image: chrislusf/seaweedfs:local | ||
ports: | ||
- "8080:8080" | ||
- "18080:18080" | ||
command: "-v=1 volume -mserver=master:9333 -port=8080 -ip=volume -preStopSeconds=1" | ||
healthcheck: | ||
test: [ "CMD", "curl", "--fail", "-I", "http://localhost:8080/healthz" ] | ||
interval: 3s | ||
timeout: 30s | ||
depends_on: | ||
master: | ||
condition: service_healthy | ||
|
||
filer: | ||
image: chrislusf/seaweedfs:local | ||
ports: | ||
- "8111:8111" | ||
- "8888:8888" | ||
- "18888:18888" | ||
command: "-v=1 filer -ip.bind=0.0.0.0 -master='master:9333'" | ||
healthcheck: | ||
test: [ "CMD", "curl", "--fail", "-I", "http://localhost:8888" ] | ||
interval: 3s | ||
timeout: 30s | ||
depends_on: | ||
master: | ||
condition: service_healthy | ||
volume: | ||
condition: service_healthy | ||
|
||
mount: | ||
image: chrislusf/seaweedfs:local | ||
cap_add: | ||
- SYS_ADMIN | ||
deploy: | ||
resources: | ||
limits: | ||
memory: 4096m | ||
command: "-v=4 mount -filer='filer:8888' -dirAutoCreate -dir=/mnt/seaweedfs -cacheCapacityMB=100 -concurrentWriters=128" | ||
healthcheck: | ||
test: [ "CMD", "mountpoint", "-q", "--", "/mnt/seaweedfs" ] | ||
interval: 3s | ||
timeout: 30s | ||
depends_on: | ||
master: | ||
condition: service_healthy | ||
volume: | ||
condition: service_healthy | ||
filer: | ||
condition: service_healthy |