yulai.li
3 years ago
677 changed files with 41761 additions and 18550 deletions
-
4.github/FUNDING.yml
-
10.github/dependabot.yml
-
10.github/pull_request_template.md
-
124.github/workflows/binaries_dev.yml
-
40.github/workflows/binaries_release0.yml
-
59.github/workflows/binaries_release1.yml
-
59.github/workflows/binaries_release2.yml
-
59.github/workflows/binaries_release3.yml
-
60.github/workflows/binaries_release4.yml
-
50.github/workflows/binary_test.yml
-
22.github/workflows/cleanup.yml
-
43.github/workflows/codeql.yml
-
66.github/workflows/container_dev.yml
-
82.github/workflows/container_latest.yml
-
121.github/workflows/container_release.yml
-
57.github/workflows/container_release1.yml
-
59.github/workflows/container_release2.yml
-
58.github/workflows/container_release3.yml
-
58.github/workflows/container_release4.yml
-
58.github/workflows/container_release5.yml
-
53.github/workflows/container_test.yml
-
14.github/workflows/depsreview.yml
-
17.github/workflows/go.yml
-
68.github/workflows/release.yml
-
4.gitignore
-
14Makefile
-
46README.md
-
8backers.md
-
56docker/Dockerfile
-
1docker/Dockerfile.gccgo_build
-
6docker/Dockerfile.go_build
-
1docker/Dockerfile.local
-
31docker/Dockerfile.rocksdb_large
-
2docker/Dockerfile.s3tests
-
31docker/Makefile
-
5docker/README.md
-
4docker/compose/fluent.json
-
36docker/compose/local-auditlog-compose.yml
-
29docker/compose/local-cluster-compose.yml
-
89docker/compose/local-hashicorp-raft-compose.yml
-
44docker/compose/local-nextcloud-compose.yml
-
4docker/compose/local-s3tests-compose.yml
-
21docker/compose/local-sync-mount-compose.yml
-
1docker/compose/master-cloud.toml
-
61docker/compose/test-etcd-filer.yml
-
35docker/compose/test-ydb-filer.yml
-
2docker/compose/tls.env
-
26docker/entrypoint.sh
-
3docker/filer_rocksdb.toml
-
1docker/prometheus/prometheus.yml
-
19docker/seaweedfs-compose.yml
-
2docker/seaweedfs.sql
-
286go.mod
-
1679go.sum
-
4k8s/helm_charts2/Chart.yaml
-
15k8s/helm_charts2/templates/_helpers.tpl
-
58k8s/helm_charts2/templates/cronjob.yaml
-
2k8s/helm_charts2/templates/filer-servicemonitor.yaml
-
40k8s/helm_charts2/templates/filer-statefulset.yaml
-
90k8s/helm_charts2/templates/ingress.yaml
-
8k8s/helm_charts2/templates/s3-deployment.yaml
-
2k8s/helm_charts2/templates/s3-servicemonitor.yaml
-
8k8s/helm_charts2/templates/seaweedfs-s3-secret.yaml
-
4k8s/helm_charts2/templates/service-account.yaml
-
2k8s/helm_charts2/templates/volume-servicemonitor.yaml
-
2k8s/helm_charts2/templates/volume-statefulset.yaml
-
72k8s/helm_charts2/values.yaml
-
BINnote/SeaweedFS_Gateway_RemoteObjectStore.png
-
8other/java/client/pom.xml
-
6other/java/client/pom.xml.deploy
-
4other/java/client/pom_debug.xml
-
2other/java/client/src/main/java/seaweedfs/client/ChunkCache.java
-
53other/java/client/src/main/java/seaweedfs/client/FilerClient.java
-
11other/java/client/src/main/java/seaweedfs/client/FilerGrpcClient.java
-
109other/java/client/src/main/java/seaweedfs/client/ReadChunks.java
-
6other/java/client/src/main/java/seaweedfs/client/RemoteUtil.java
-
2other/java/client/src/main/java/seaweedfs/client/SeaweedCipher.java
-
90other/java/client/src/main/java/seaweedfs/client/SeaweedRead.java
-
26other/java/client/src/main/java/seaweedfs/client/SeaweedUtil.java
-
30other/java/client/src/main/java/seaweedfs/client/SeaweedWrite.java
-
2other/java/client/src/main/java/seaweedfs/client/VolumeIdCache.java
-
52other/java/client/src/main/proto/filer.proto
-
123other/java/client/src/test/java/seaweedfs/client/SeaweedReadTest.java
-
6other/java/examples/pom.xml
-
2other/java/hdfs-over-ftp/pom.xml
-
4other/java/hdfs2/dependency-reduced-pom.xml
-
6other/java/hdfs2/pom.xml
-
8other/java/hdfs2/src/main/java/seaweed/hdfs/SeaweedFileSystem.java
-
5other/java/hdfs2/src/main/java/seaweed/hdfs/SeaweedFileSystemStore.java
-
4other/java/hdfs3/dependency-reduced-pom.xml
-
6other/java/hdfs3/pom.xml
-
8other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedFileSystem.java
-
5other/java/hdfs3/src/main/java/seaweed/hdfs/SeaweedFileSystemStore.java
-
16other/metrics/grafana_seaweedfs.json
-
1932other/metrics/grafana_seaweedfs_heartbeat.json
-
15test/s3/basic/basic_test.go
-
2test/s3/compatibility/.gitignore
-
11test/s3/compatibility/Dockerfile
-
13test/s3/compatibility/README.md
-
5test/s3/compatibility/prepare.sh
@ -0,0 +1,4 @@ |
|||
# These are supported funding model platforms |
|||
|
|||
github: chrislusf |
|||
patreon: seaweedfs |
@ -0,0 +1,10 @@ |
|||
version: 2 |
|||
updates: |
|||
- package-ecosystem: "github-actions" |
|||
directory: "/" |
|||
schedule: |
|||
interval: "weekly" |
|||
- package-ecosystem: gomod |
|||
directory: "/" |
|||
schedule: |
|||
interval: weekly |
@ -0,0 +1,10 @@ |
|||
# What problem are we solving? |
|||
|
|||
|
|||
|
|||
# How are we solving the problem? |
|||
|
|||
|
|||
# Checks |
|||
- [ ] I have added unit tests if possible. |
|||
- [ ] I will add related wiki document changes and link to this PR after merging. |
@ -0,0 +1,124 @@ |
|||
name: "go: build dev binaries" |
|||
|
|||
on: |
|||
push: |
|||
branches: [ master ] |
|||
|
|||
permissions: |
|||
contents: read |
|||
|
|||
jobs: |
|||
|
|||
cleanup: |
|||
permissions: |
|||
contents: write # for mknejp/delete-release-assets to delete release assets |
|||
runs-on: ubuntu-latest |
|||
|
|||
steps: |
|||
|
|||
- name: Delete old release assets |
|||
uses: mknejp/delete-release-assets@a8aaab13272b1eaac16cc46dddd3f725b97ee05a # v1 |
|||
with: |
|||
token: ${{ github.token }} |
|||
tag: dev |
|||
fail-if-no-assets: false |
|||
assets: | |
|||
weed-* |
|||
|
|||
build_dev_linux_windows: |
|||
permissions: |
|||
contents: write # for wangyoucao577/go-release-action to upload release assets |
|||
needs: cleanup |
|||
runs-on: ubuntu-latest |
|||
strategy: |
|||
matrix: |
|||
goos: [linux, windows] |
|||
goarch: [amd64] |
|||
|
|||
steps: |
|||
|
|||
- name: Check out code into the Go module directory |
|||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 |
|||
|
|||
- name: Set BUILD_TIME env |
|||
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV} |
|||
|
|||
- name: Go Release Binaries Large Disk |
|||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22 |
|||
with: |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
goos: ${{ matrix.goos }} |
|||
goarch: ${{ matrix.goarch }} |
|||
release_tag: dev |
|||
overwrite: true |
|||
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 |
|||
build_flags: -tags 5BytesOffset # optional, default is |
|||
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} |
|||
# Where to run `go build .` |
|||
project_path: weed |
|||
binary_name: weed-large-disk |
|||
asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}" |
|||
|
|||
- name: Go Release Binaries Normal Volume Size |
|||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22 |
|||
with: |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
goos: ${{ matrix.goos }} |
|||
goarch: ${{ matrix.goarch }} |
|||
release_tag: dev |
|||
overwrite: true |
|||
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 |
|||
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} |
|||
# Where to run `go build .` |
|||
project_path: weed |
|||
binary_name: weed-normal-disk |
|||
asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}" |
|||
|
|||
build_dev_darwin: |
|||
permissions: |
|||
contents: write # for wangyoucao577/go-release-action to upload release assets |
|||
needs: build_dev_linux_windows |
|||
runs-on: ubuntu-latest |
|||
strategy: |
|||
matrix: |
|||
goos: [darwin] |
|||
goarch: [amd64, arm64] |
|||
|
|||
steps: |
|||
|
|||
- name: Check out code into the Go module directory |
|||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 |
|||
|
|||
- name: Set BUILD_TIME env |
|||
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV} |
|||
|
|||
- name: Go Release Binaries Large Disk |
|||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22 |
|||
with: |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
goos: ${{ matrix.goos }} |
|||
goarch: ${{ matrix.goarch }} |
|||
release_tag: dev |
|||
overwrite: true |
|||
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 |
|||
build_flags: -tags 5BytesOffset # optional, default is |
|||
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} |
|||
# Where to run `go build .` |
|||
project_path: weed |
|||
binary_name: weed-large-disk |
|||
asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}" |
|||
|
|||
- name: Go Release Binaries Normal Volume Size |
|||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22 |
|||
with: |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
goos: ${{ matrix.goos }} |
|||
goarch: ${{ matrix.goarch }} |
|||
release_tag: dev |
|||
overwrite: true |
|||
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 |
|||
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} |
|||
# Where to run `go build .` |
|||
project_path: weed |
|||
binary_name: weed-normal-disk |
|||
asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}" |
@ -0,0 +1,59 @@ |
|||
# This is a basic workflow to help you get started with Actions |
|||
|
|||
name: "go: build versioned binaries for linux" |
|||
|
|||
on: |
|||
push: |
|||
tags: |
|||
- '*' |
|||
|
|||
# Allows you to run this workflow manually from the Actions tab |
|||
workflow_dispatch: |
|||
|
|||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
|||
permissions: |
|||
contents: read |
|||
|
|||
jobs: |
|||
|
|||
build-release-binaries_linux: |
|||
permissions: |
|||
contents: write # for wangyoucao577/go-release-action to upload release assets |
|||
runs-on: ubuntu-latest |
|||
strategy: |
|||
matrix: |
|||
goos: [linux] |
|||
goarch: [amd64, arm, arm64] |
|||
|
|||
# Steps represent a sequence of tasks that will be executed as part of the job |
|||
steps: |
|||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
|||
- uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 |
|||
- name: Go Release Binaries Normal Volume Size |
|||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22 |
|||
with: |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
goos: ${{ matrix.goos }} |
|||
goarch: ${{ matrix.goarch }} |
|||
overwrite: true |
|||
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 |
|||
# build_flags: -tags 5BytesOffset # optional, default is |
|||
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} |
|||
# Where to run `go build .` |
|||
project_path: weed |
|||
binary_name: weed |
|||
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}" |
|||
- name: Go Release Large Disk Binaries |
|||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22 |
|||
with: |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
goos: ${{ matrix.goos }} |
|||
goarch: ${{ matrix.goarch }} |
|||
overwrite: true |
|||
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 |
|||
build_flags: -tags 5BytesOffset # optional, default is |
|||
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} |
|||
# Where to run `go build .` |
|||
project_path: weed |
|||
binary_name: weed |
|||
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_large_disk" |
@ -0,0 +1,59 @@ |
|||
# This is a basic workflow to help you get started with Actions |
|||
|
|||
name: "go: build versioned binaries for darwin" |
|||
|
|||
on: |
|||
push: |
|||
tags: |
|||
- '*' |
|||
|
|||
# Allows you to run this workflow manually from the Actions tab |
|||
workflow_dispatch: |
|||
|
|||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
|||
permissions: |
|||
contents: read |
|||
|
|||
jobs: |
|||
|
|||
build-release-binaries_darwin: |
|||
permissions: |
|||
contents: write # for wangyoucao577/go-release-action to upload release assets |
|||
runs-on: ubuntu-latest |
|||
strategy: |
|||
matrix: |
|||
goos: [darwin] |
|||
goarch: [amd64, arm64] |
|||
|
|||
# Steps represent a sequence of tasks that will be executed as part of the job |
|||
steps: |
|||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
|||
- uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 |
|||
- name: Go Release Binaries Normal Volume Size |
|||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22 |
|||
with: |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
goos: ${{ matrix.goos }} |
|||
goarch: ${{ matrix.goarch }} |
|||
overwrite: true |
|||
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 |
|||
# build_flags: -tags 5BytesOffset # optional, default is |
|||
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} |
|||
# Where to run `go build .` |
|||
project_path: weed |
|||
binary_name: weed |
|||
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}" |
|||
- name: Go Release Large Disk Binaries |
|||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22 |
|||
with: |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
goos: ${{ matrix.goos }} |
|||
goarch: ${{ matrix.goarch }} |
|||
overwrite: true |
|||
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 |
|||
build_flags: -tags 5BytesOffset # optional, default is |
|||
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} |
|||
# Where to run `go build .` |
|||
project_path: weed |
|||
binary_name: weed |
|||
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_large_disk" |
@ -0,0 +1,59 @@ |
|||
# This is a basic workflow to help you get started with Actions |
|||
|
|||
name: "go: build versioned binaries for freebsd" |
|||
|
|||
on: |
|||
push: |
|||
tags: |
|||
- '*' |
|||
|
|||
# Allows you to run this workflow manually from the Actions tab |
|||
workflow_dispatch: |
|||
|
|||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
|||
permissions: |
|||
contents: read |
|||
|
|||
jobs: |
|||
|
|||
build-release-binaries_freebsd: |
|||
permissions: |
|||
contents: write # for wangyoucao577/go-release-action to upload release assets |
|||
runs-on: ubuntu-latest |
|||
strategy: |
|||
matrix: |
|||
goos: [freebsd] |
|||
goarch: [amd64, arm, arm64] |
|||
|
|||
# Steps represent a sequence of tasks that will be executed as part of the job |
|||
steps: |
|||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
|||
- uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 |
|||
- name: Go Release Binaries Normal Volume Size |
|||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22 |
|||
with: |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
goos: ${{ matrix.goos }} |
|||
goarch: ${{ matrix.goarch }} |
|||
overwrite: true |
|||
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 |
|||
# build_flags: -tags 5BytesOffset # optional, default is |
|||
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} |
|||
# Where to run `go build .` |
|||
project_path: weed |
|||
binary_name: weed |
|||
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}" |
|||
- name: Go Release Large Disk Binaries |
|||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22 |
|||
with: |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
goos: ${{ matrix.goos }} |
|||
goarch: ${{ matrix.goarch }} |
|||
overwrite: true |
|||
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 |
|||
build_flags: -tags 5BytesOffset # optional, default is |
|||
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} |
|||
# Where to run `go build .` |
|||
project_path: weed |
|||
binary_name: weed |
|||
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_large_disk" |
@ -0,0 +1,60 @@ |
|||
# This is a basic workflow to help you get started with Actions |
|||
|
|||
name: "go: build versioned binaries for linux with all tags" |
|||
|
|||
on: |
|||
push: |
|||
tags: |
|||
- '*' |
|||
|
|||
# Allows you to run this workflow manually from the Actions tab |
|||
workflow_dispatch: |
|||
|
|||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
|||
permissions: |
|||
contents: read |
|||
|
|||
jobs: |
|||
|
|||
build-release-binaries_linux: |
|||
permissions: |
|||
contents: write # for wangyoucao577/go-release-action to upload release assets |
|||
runs-on: ubuntu-latest |
|||
strategy: |
|||
matrix: |
|||
goos: [linux] |
|||
goarch: [amd64] |
|||
|
|||
# Steps represent a sequence of tasks that will be executed as part of the job |
|||
steps: |
|||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
|||
- uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 |
|||
- name: Go Release Binaries Normal Volume Size |
|||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22 |
|||
with: |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
goos: ${{ matrix.goos }} |
|||
goarch: ${{ matrix.goarch }} |
|||
overwrite: true |
|||
build_flags: -tags elastic,ydb,gocdk |
|||
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 |
|||
# build_flags: -tags 5BytesOffset # optional, default is |
|||
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} |
|||
# Where to run `go build .` |
|||
project_path: weed |
|||
binary_name: weed |
|||
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_full" |
|||
- name: Go Release Large Disk Binaries |
|||
uses: wangyoucao577/go-release-action@16624612d4e2b73de613857a362d294700207fff # v1.22 |
|||
with: |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
goos: ${{ matrix.goos }} |
|||
goarch: ${{ matrix.goarch }} |
|||
overwrite: true |
|||
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 |
|||
build_flags: -tags 5BytesOffset,elastic,ydb,gocdk |
|||
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} |
|||
# Where to run `go build .` |
|||
project_path: weed |
|||
binary_name: weed |
|||
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_full_large_disk" |
@ -1,50 +0,0 @@ |
|||
name: "go: test building cross-platform binary" |
|||
|
|||
on: |
|||
pull_request: |
|||
workflow_dispatch: [] |
|||
|
|||
jobs: |
|||
|
|||
build: |
|||
name: Build |
|||
runs-on: ubuntu-latest |
|||
strategy: |
|||
matrix: |
|||
goos: [linux, windows, darwin, freebsd, netbsd, openbsd] |
|||
goarch: [amd64, arm, arm64, 386] |
|||
exclude: |
|||
- goarch: arm |
|||
goos: darwin |
|||
- goarch: 386 |
|||
goos: darwin |
|||
- goarch: arm |
|||
goos: windows |
|||
- goarch: arm64 |
|||
goos: windows |
|||
|
|||
concurrency: |
|||
group: ${{ github.head_ref }}/binary_test/${{ matrix.goos }}/${{ matrix.goarch }} |
|||
cancel-in-progress: true |
|||
|
|||
steps: |
|||
|
|||
- name: Set up Go 1.x |
|||
uses: actions/setup-go@v2 |
|||
with: |
|||
go-version: ^1.13 |
|||
id: go |
|||
|
|||
- name: Check out code into the Go module directory |
|||
uses: actions/checkout@v2 |
|||
|
|||
- name: Get dependencies |
|||
run: | |
|||
cd weed; go get -v -t -d ./... |
|||
if [ -f Gopkg.toml ]; then |
|||
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh |
|||
dep ensure |
|||
fi |
|||
|
|||
- name: Build |
|||
run: cd weed; GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v . |
@ -1,22 +0,0 @@ |
|||
name: "chore: cleanup" |
|||
|
|||
on: |
|||
push: |
|||
branches: [ master ] |
|||
|
|||
jobs: |
|||
|
|||
build: |
|||
name: Build |
|||
runs-on: ubuntu-latest |
|||
|
|||
steps: |
|||
|
|||
- name: Delete old release assets |
|||
uses: mknejp/delete-release-assets@v1 |
|||
with: |
|||
token: ${{ github.token }} |
|||
tag: dev |
|||
fail-if-no-assets: false |
|||
assets: | |
|||
weed-* |
@ -0,0 +1,43 @@ |
|||
name: "Code Scanning - Action" |
|||
|
|||
on: |
|||
pull_request: |
|||
|
|||
jobs: |
|||
CodeQL-Build: |
|||
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest |
|||
runs-on: ubuntu-latest |
|||
|
|||
permissions: |
|||
# required for all workflows |
|||
security-events: write |
|||
|
|||
steps: |
|||
- name: Checkout repository |
|||
uses: actions/checkout@v3 |
|||
|
|||
# Initializes the CodeQL tools for scanning. |
|||
- name: Initialize CodeQL |
|||
uses: github/codeql-action/init@v2 |
|||
# Override language selection by uncommenting this and choosing your languages |
|||
with: |
|||
languages: go |
|||
|
|||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). |
|||
# If this step fails, then you should remove it and run the build manually (see below). |
|||
- name: Autobuild |
|||
uses: github/codeql-action/autobuild@v2 |
|||
|
|||
# ℹ️ Command-line programs to run using the OS shell. |
|||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun |
|||
|
|||
# ✏️ If the Autobuild fails above, remove it and uncomment the following |
|||
# three lines and modify them (or add more) to build your code if your |
|||
# project uses a compiled language |
|||
|
|||
#- run: | |
|||
# make bootstrap |
|||
# make release |
|||
|
|||
- name: Perform CodeQL Analysis |
|||
uses: github/codeql-action/analyze@v2 |
@ -0,0 +1,66 @@ |
|||
name: "docker: build dev containers" |
|||
|
|||
on: |
|||
push: |
|||
branches: [ master ] |
|||
workflow_dispatch: {} |
|||
|
|||
permissions: |
|||
contents: read |
|||
|
|||
jobs: |
|||
|
|||
build-dev-containers: |
|||
runs-on: [ubuntu-latest] |
|||
|
|||
steps: |
|||
- |
|||
name: Checkout |
|||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 |
|||
- |
|||
name: Docker meta |
|||
id: docker_meta |
|||
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3 |
|||
with: |
|||
images: | |
|||
chrislusf/seaweedfs |
|||
ghcr.io/chrislusf/seaweedfs |
|||
tags: | |
|||
type=raw,value=dev |
|||
labels: | |
|||
org.opencontainers.image.title=seaweedfs |
|||
org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast! |
|||
org.opencontainers.image.vendor=Chris Lu |
|||
- |
|||
name: Set up QEMU |
|||
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1 |
|||
- |
|||
name: Set up Docker Buildx |
|||
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1 |
|||
with: |
|||
buildkitd-flags: "--debug" |
|||
- |
|||
name: Login to Docker Hub |
|||
if: github.event_name != 'pull_request' |
|||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1 |
|||
with: |
|||
username: ${{ secrets.DOCKER_USERNAME }} |
|||
password: ${{ secrets.DOCKER_PASSWORD }} |
|||
- |
|||
name: Login to GHCR |
|||
if: github.event_name != 'pull_request' |
|||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1 |
|||
with: |
|||
registry: ghcr.io |
|||
username: ${{ secrets.GHCR_USERNAME }} |
|||
password: ${{ secrets.GHCR_TOKEN }} |
|||
- |
|||
name: Build |
|||
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v2 |
|||
with: |
|||
context: ./docker |
|||
push: ${{ github.event_name != 'pull_request' }} |
|||
file: ./docker/Dockerfile.go_build |
|||
platforms: linux/amd64, linux/arm64 |
|||
tags: ${{ steps.docker_meta.outputs.tags }} |
|||
labels: ${{ steps.docker_meta.outputs.labels }} |
@ -1,121 +0,0 @@ |
|||
name: "docker: build release containers" |
|||
|
|||
on: |
|||
push: |
|||
tags: |
|||
- '*' |
|||
workflow_dispatch: [] |
|||
|
|||
jobs: |
|||
build-default: |
|||
runs-on: [ubuntu-latest] |
|||
|
|||
steps: |
|||
- |
|||
name: Checkout |
|||
uses: actions/checkout@v2 |
|||
- |
|||
name: Docker meta |
|||
id: docker_meta |
|||
uses: docker/metadata-action@v3 |
|||
with: |
|||
images: | |
|||
chrislusf/seaweedfs |
|||
ghcr.io/chrislusf/seaweedfs |
|||
tags: | |
|||
type=ref,event=tag |
|||
flavor: | |
|||
latest=false |
|||
labels: | |
|||
org.opencontainers.image.title=seaweedfs |
|||
org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast! |
|||
org.opencontainers.image.vendor=Chris Lu |
|||
- |
|||
name: Set up QEMU |
|||
uses: docker/setup-qemu-action@v1 |
|||
- |
|||
name: Set up Docker Buildx |
|||
uses: docker/setup-buildx-action@v1 |
|||
with: |
|||
buildkitd-flags: "--debug" |
|||
- |
|||
name: Login to Docker Hub |
|||
if: github.event_name != 'pull_request' |
|||
uses: docker/login-action@v1 |
|||
with: |
|||
username: ${{ secrets.DOCKER_USERNAME }} |
|||
password: ${{ secrets.DOCKER_PASSWORD }} |
|||
- |
|||
name: Login to GHCR |
|||
if: github.event_name != 'pull_request' |
|||
uses: docker/login-action@v1 |
|||
with: |
|||
registry: ghcr.io |
|||
username: ${{ secrets.GHCR_USERNAME }} |
|||
password: ${{ secrets.GHCR_TOKEN }} |
|||
- |
|||
name: Build |
|||
uses: docker/build-push-action@v2 |
|||
with: |
|||
context: ./docker |
|||
push: ${{ github.event_name != 'pull_request' }} |
|||
file: ./docker/Dockerfile.go_build |
|||
platforms: linux/amd64, linux/arm, linux/arm64, linux/386 |
|||
tags: ${{ steps.docker_meta.outputs.tags }} |
|||
labels: ${{ steps.docker_meta.outputs.labels }} |
|||
build-large: |
|||
runs-on: [ubuntu-latest] |
|||
|
|||
steps: |
|||
- |
|||
name: Checkout |
|||
uses: actions/checkout@v2 |
|||
- |
|||
name: Docker meta |
|||
id: docker_meta |
|||
uses: docker/metadata-action@v3 |
|||
with: |
|||
images: | |
|||
chrislusf/seaweedfs |
|||
ghcr.io/chrislusf/seaweedfs |
|||
tags: | |
|||
type=ref,event=tag,suffix=_large_disk |
|||
flavor: | |
|||
latest=false |
|||
labels: | |
|||
org.opencontainers.image.title=seaweedfs |
|||
org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast! |
|||
org.opencontainers.image.vendor=Chris Lu |
|||
- |
|||
name: Set up QEMU |
|||
uses: docker/setup-qemu-action@v1 |
|||
- |
|||
name: Set up Docker Buildx |
|||
uses: docker/setup-buildx-action@v1 |
|||
with: |
|||
buildkitd-flags: "--debug" |
|||
- |
|||
name: Login to Docker Hub |
|||
if: github.event_name != 'pull_request' |
|||
uses: docker/login-action@v1 |
|||
with: |
|||
username: ${{ secrets.DOCKER_USERNAME }} |
|||
password: ${{ secrets.DOCKER_PASSWORD }} |
|||
- |
|||
name: Login to GHCR |
|||
if: github.event_name != 'pull_request' |
|||
uses: docker/login-action@v1 |
|||
with: |
|||
registry: ghcr.io |
|||
username: ${{ secrets.GHCR_USERNAME }} |
|||
password: ${{ secrets.GHCR_TOKEN }} |
|||
- |
|||
name: Build |
|||
uses: docker/build-push-action@v2 |
|||
with: |
|||
context: ./docker |
|||
push: ${{ github.event_name != 'pull_request' }} |
|||
file: ./docker/Dockerfile.go_build_large |
|||
platforms: linux/amd64, linux/arm, linux/arm64, linux/386 |
|||
tags: ${{ steps.docker_meta.outputs.tags }} |
|||
labels: ${{ steps.docker_meta.outputs.labels }} |
@ -0,0 +1,57 @@ |
|||
name: "docker: build release containers for normal volume" |
|||
|
|||
on: |
|||
push: |
|||
tags: |
|||
- '*' |
|||
workflow_dispatch: {} |
|||
|
|||
permissions: |
|||
contents: read |
|||
|
|||
jobs: |
|||
build-default-release-container: |
|||
runs-on: [ubuntu-latest] |
|||
|
|||
steps: |
|||
- |
|||
name: Checkout |
|||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 |
|||
- |
|||
name: Docker meta |
|||
id: docker_meta |
|||
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3 |
|||
with: |
|||
images: | |
|||
chrislusf/seaweedfs |
|||
tags: | |
|||
type=ref,event=tag |
|||
flavor: | |
|||
latest=false |
|||
labels: | |
|||
org.opencontainers.image.title=seaweedfs |
|||
org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast! |
|||
org.opencontainers.image.vendor=Chris Lu |
|||
- |
|||
name: Set up QEMU |
|||
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1 |
|||
- |
|||
name: Set up Docker Buildx |
|||
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1 |
|||
- |
|||
name: Login to Docker Hub |
|||
if: github.event_name != 'pull_request' |
|||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1 |
|||
with: |
|||
username: ${{ secrets.DOCKER_USERNAME }} |
|||
password: ${{ secrets.DOCKER_PASSWORD }} |
|||
- |
|||
name: Build |
|||
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v2 |
|||
with: |
|||
context: ./docker |
|||
push: ${{ github.event_name != 'pull_request' }} |
|||
file: ./docker/Dockerfile.go_build |
|||
platforms: linux/amd64, linux/arm, linux/arm64, linux/386 |
|||
tags: ${{ steps.docker_meta.outputs.tags }} |
|||
labels: ${{ steps.docker_meta.outputs.labels }} |
@ -0,0 +1,59 @@ |
|||
name: "docker: build release containers for large volume" |
|||
|
|||
on: |
|||
push: |
|||
tags: |
|||
- '*' |
|||
workflow_dispatch: {} |
|||
|
|||
permissions: |
|||
contents: read |
|||
|
|||
jobs: |
|||
|
|||
build-large-release-container: |
|||
runs-on: [ubuntu-latest] |
|||
|
|||
steps: |
|||
- |
|||
name: Checkout |
|||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 |
|||
- |
|||
name: Docker meta |
|||
id: docker_meta |
|||
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3 |
|||
with: |
|||
images: | |
|||
chrislusf/seaweedfs |
|||
tags: | |
|||
type=ref,event=tag,suffix=_large_disk |
|||
flavor: | |
|||
latest=false |
|||
labels: | |
|||
org.opencontainers.image.title=seaweedfs |
|||
org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast! |
|||
org.opencontainers.image.vendor=Chris Lu |
|||
- |
|||
name: Set up QEMU |
|||
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1 |
|||
- |
|||
name: Set up Docker Buildx |
|||
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1 |
|||
- |
|||
name: Login to Docker Hub |
|||
if: github.event_name != 'pull_request' |
|||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1 |
|||
with: |
|||
username: ${{ secrets.DOCKER_USERNAME }} |
|||
password: ${{ secrets.DOCKER_PASSWORD }} |
|||
- |
|||
name: Build |
|||
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v2 |
|||
with: |
|||
context: ./docker |
|||
push: ${{ github.event_name != 'pull_request' }} |
|||
file: ./docker/Dockerfile.go_build |
|||
build-args: TAGS=5BytesOffset |
|||
platforms: linux/amd64, linux/arm, linux/arm64, linux/386 |
|||
tags: ${{ steps.docker_meta.outputs.tags }} |
|||
labels: ${{ steps.docker_meta.outputs.labels }} |
@ -0,0 +1,58 @@ |
|||
name: "docker: build release containers for rocksdb" |
|||
|
|||
on: |
|||
push: |
|||
tags: |
|||
- '*' |
|||
workflow_dispatch: {} |
|||
|
|||
permissions: |
|||
contents: read |
|||
|
|||
jobs: |
|||
|
|||
build-large-release-container_rocksdb: |
|||
runs-on: [ubuntu-latest] |
|||
|
|||
steps: |
|||
- |
|||
name: Checkout |
|||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 |
|||
- |
|||
name: Docker meta |
|||
id: docker_meta |
|||
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3 |
|||
with: |
|||
images: | |
|||
chrislusf/seaweedfs |
|||
tags: | |
|||
type=ref,event=tag,suffix=_large_disk_rocksdb |
|||
flavor: | |
|||
latest=false |
|||
labels: | |
|||
org.opencontainers.image.title=seaweedfs |
|||
org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast! |
|||
org.opencontainers.image.vendor=Chris Lu |
|||
- |
|||
name: Set up QEMU |
|||
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1 |
|||
- |
|||
name: Set up Docker Buildx |
|||
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1 |
|||
- |
|||
name: Login to Docker Hub |
|||
if: github.event_name != 'pull_request' |
|||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1 |
|||
with: |
|||
username: ${{ secrets.DOCKER_USERNAME }} |
|||
password: ${{ secrets.DOCKER_PASSWORD }} |
|||
- |
|||
name: Build |
|||
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v2 |
|||
with: |
|||
context: ./docker |
|||
push: ${{ github.event_name != 'pull_request' }} |
|||
file: ./docker/Dockerfile.rocksdb_large |
|||
platforms: linux/amd64 |
|||
tags: ${{ steps.docker_meta.outputs.tags }} |
|||
labels: ${{ steps.docker_meta.outputs.labels }} |
@ -0,0 +1,58 @@ |
|||
name: "docker: build release containers for all tags" |
|||
|
|||
on: |
|||
push: |
|||
tags: |
|||
- '*' |
|||
workflow_dispatch: {} |
|||
|
|||
permissions: |
|||
contents: read |
|||
|
|||
jobs: |
|||
build-default-release-container: |
|||
runs-on: [ubuntu-latest] |
|||
|
|||
steps: |
|||
- |
|||
name: Checkout |
|||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 |
|||
- |
|||
name: Docker meta |
|||
id: docker_meta |
|||
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3 |
|||
with: |
|||
images: | |
|||
chrislusf/seaweedfs |
|||
tags: | |
|||
type=ref,event=tag,suffix=_full |
|||
flavor: | |
|||
latest=false |
|||
labels: | |
|||
org.opencontainers.image.title=seaweedfs |
|||
org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast! |
|||
org.opencontainers.image.vendor=Chris Lu |
|||
- |
|||
name: Set up QEMU |
|||
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1 |
|||
- |
|||
name: Set up Docker Buildx |
|||
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1 |
|||
- |
|||
name: Login to Docker Hub |
|||
if: github.event_name != 'pull_request' |
|||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1 |
|||
with: |
|||
username: ${{ secrets.DOCKER_USERNAME }} |
|||
password: ${{ secrets.DOCKER_PASSWORD }} |
|||
- |
|||
name: Build |
|||
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v2 |
|||
with: |
|||
context: ./docker |
|||
push: ${{ github.event_name != 'pull_request' }} |
|||
file: ./docker/Dockerfile.go_build |
|||
build-args: TAGS=elastic,ydb,gocdk |
|||
platforms: linux/amd64 |
|||
tags: ${{ steps.docker_meta.outputs.tags }} |
|||
labels: ${{ steps.docker_meta.outputs.labels }} |
@ -0,0 +1,58 @@ |
|||
name: "docker: build release containers for all tags and large volume" |
|||
|
|||
on: |
|||
push: |
|||
tags: |
|||
- '*' |
|||
workflow_dispatch: {} |
|||
|
|||
permissions: |
|||
contents: read |
|||
|
|||
jobs: |
|||
build-default-release-container: |
|||
runs-on: [ubuntu-latest] |
|||
|
|||
steps: |
|||
- |
|||
name: Checkout |
|||
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2 |
|||
- |
|||
name: Docker meta |
|||
id: docker_meta |
|||
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a # v3 |
|||
with: |
|||
images: | |
|||
chrislusf/seaweedfs |
|||
tags: | |
|||
type=ref,event=tag,suffix=_large_disk_full |
|||
flavor: | |
|||
latest=false |
|||
labels: | |
|||
org.opencontainers.image.title=seaweedfs |
|||
org.opencontainers.image.description=SeaweedFS is a distributed storage system for blobs, objects, files, and data lake, to store and serve billions of files fast! |
|||
org.opencontainers.image.vendor=Chris Lu |
|||
- |
|||
name: Set up QEMU |
|||
uses: docker/setup-qemu-action@8b122486cedac8393e77aa9734c3528886e4a1a8 # v1 |
|||
- |
|||
name: Set up Docker Buildx |
|||
uses: docker/setup-buildx-action@dc7b9719a96d48369863986a06765841d7ea23f6 # v1 |
|||
- |
|||
name: Login to Docker Hub |
|||
if: github.event_name != 'pull_request' |
|||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b # v1 |
|||
with: |
|||
username: ${{ secrets.DOCKER_USERNAME }} |
|||
password: ${{ secrets.DOCKER_PASSWORD }} |
|||
- |
|||
name: Build |
|||
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v2 |
|||
with: |
|||
context: ./docker |
|||
push: ${{ github.event_name != 'pull_request' }} |
|||
file: ./docker/Dockerfile.go_build |
|||
build-args: TAGS=5BytesOffset,elastic,ydb,gocdk |
|||
platforms: linux/amd64 |
|||
tags: ${{ steps.docker_meta.outputs.tags }} |
|||
labels: ${{ steps.docker_meta.outputs.labels }} |
@ -1,53 +0,0 @@ |
|||
name: "docker: test building container images" |
|||
|
|||
on: |
|||
pull_request: |
|||
workflow_dispatch: [] |
|||
|
|||
concurrency: |
|||
group: ${{ github.head_ref }}/container_test |
|||
cancel-in-progress: true |
|||
|
|||
jobs: |
|||
build-test: |
|||
runs-on: [ubuntu-latest] |
|||
strategy: |
|||
matrix: |
|||
platform: [ linux ] |
|||
arch: [ amd64, arm, arm64, 386 ] |
|||
|
|||
steps: |
|||
- |
|||
name: Checkout |
|||
uses: actions/checkout@v2 |
|||
- |
|||
name: Docker meta |
|||
id: docker_meta |
|||
uses: docker/metadata-action@v3 |
|||
with: |
|||
images: | |
|||
chrislusf/seaweedfs |
|||
ghcr.io/chrislusf/seaweedfs |
|||
tags: | |
|||
type=raw,value=latest |
|||
labels: | |
|||
org.opencontainers.image.title=seaweedfs |
|||
org.opencontainers.image.vendor=Chris Lu |
|||
- |
|||
name: Set up QEMU |
|||
uses: docker/setup-qemu-action@v1 |
|||
- |
|||
name: Set up Docker Buildx |
|||
uses: docker/setup-buildx-action@v1 |
|||
with: |
|||
buildkitd-flags: "--debug" |
|||
- |
|||
name: Build |
|||
uses: docker/build-push-action@v2 |
|||
with: |
|||
context: ./docker |
|||
push: false |
|||
file: ./docker/Dockerfile |
|||
platforms: ${{ matrix.platform }}/${{ matrix.arch }} |
|||
tags: ${{ steps.docker_meta.outputs.tags }} |
|||
labels: ${{ steps.docker_meta.outputs.labels }} |
@ -0,0 +1,14 @@ |
|||
name: 'Dependency Review' |
|||
on: [pull_request] |
|||
|
|||
permissions: |
|||
contents: read |
|||
|
|||
jobs: |
|||
dependency-review: |
|||
runs-on: ubuntu-latest |
|||
steps: |
|||
- name: 'Checkout Repository' |
|||
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748 |
|||
- name: 'Dependency Review' |
|||
uses: actions/dependency-review-action@1c59cdf2a9c7f29c90e8da32237eb04b81bad9f0 |
@ -1,68 +0,0 @@ |
|||
name: "go: build dev binaries" |
|||
|
|||
on: |
|||
push: |
|||
branches: [ master ] |
|||
|
|||
jobs: |
|||
|
|||
build: |
|||
name: Build |
|||
runs-on: ubuntu-latest |
|||
strategy: |
|||
matrix: |
|||
goos: [linux, windows, darwin, freebsd, netbsd, openbsd] |
|||
goarch: [amd64, arm, arm64, 386] |
|||
exclude: |
|||
- goarch: arm |
|||
goos: darwin |
|||
- goarch: 386 |
|||
goos: darwin |
|||
- goarch: arm |
|||
goos: windows |
|||
- goarch: arm64 |
|||
goos: windows |
|||
|
|||
steps: |
|||
|
|||
- name: Check out code into the Go module directory |
|||
uses: actions/checkout@v2 |
|||
|
|||
- name: Wait for the deletion |
|||
uses: jakejarvis/wait-action@master |
|||
with: |
|||
time: '30s' |
|||
|
|||
- name: Set BUILD_TIME env |
|||
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV} |
|||
|
|||
- name: Go Release Binaries |
|||
uses: wangyoucao577/go-release-action@v1.20 |
|||
with: |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
goos: ${{ matrix.goos }} |
|||
goarch: ${{ matrix.goarch }} |
|||
release_tag: dev |
|||
overwrite: true |
|||
pre_command: export CGO_ENABLED=0 |
|||
build_flags: -tags 5BytesOffset # optional, default is |
|||
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} |
|||
# Where to run `go build .` |
|||
project_path: weed |
|||
binary_name: weed-large-disk |
|||
asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}" |
|||
|
|||
- name: Go Release Binaries |
|||
uses: wangyoucao577/go-release-action@v1.20 |
|||
with: |
|||
github_token: ${{ secrets.GITHUB_TOKEN }} |
|||
goos: ${{ matrix.goos }} |
|||
goarch: ${{ matrix.goarch }} |
|||
release_tag: dev |
|||
overwrite: true |
|||
pre_command: export CGO_ENABLED=0 |
|||
ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}} |
|||
# Where to run `go build .` |
|||
project_path: weed |
|||
binary_name: weed |
|||
asset_name: "weed-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}" |
@ -0,0 +1,14 @@ |
|||
BINARY = weed |
|||
|
|||
SOURCE_DIR = . |
|||
|
|||
all: install |
|||
|
|||
install: |
|||
cd weed; go install |
|||
|
|||
full_install: |
|||
cd weed; go install -tags "elastic gocdk sqlite ydb" |
|||
|
|||
test: |
|||
cd weed; go test -tags "elastic gocdk sqlite ydb" -v ./... |
@ -1,56 +0,0 @@ |
|||
FROM alpine |
|||
|
|||
# 'latest' or 'dev' |
|||
ARG RELEASE=latest |
|||
|
|||
RUN \ |
|||
ARCH=$(if [ $(uname -m) == "x86_64" ] && [ $(getconf LONG_BIT) == "64" ]; then echo "amd64"; \ |
|||
elif [ $(uname -m) == "x86_64" ] && [ $(getconf LONG_BIT) == "32" ]; then echo "386"; \ |
|||
elif [ $(uname -m) == "aarch64" ]; then echo "arm64"; \ |
|||
elif [ $(uname -m) == "armv7l" ]; then echo "arm"; \ |
|||
elif [ $(uname -m) == "armv6l" ]; then echo "arm"; \ |
|||
elif [ $(uname -m) == "s390x" ]; then echo "s390x"; \ |
|||
elif [ $(uname -m) == "ppc64le" ]; then echo "ppc64le"; fi;) && \ |
|||
echo "Building for $ARCH" 1>&2 && \ |
|||
SUPERCRONIC_SHA1SUM=$(echo $ARCH | sed 's/386/e0126b0102b9f388ecd55714358e3ad60d0cebdb/g' | sed 's/amd64/5ddf8ea26b56d4a7ff6faecdd8966610d5cb9d85/g' | sed 's/arm64/e2714c43e7781bf1579c85aa61259245f56dbba1/g' | sed 's/arm/47481c3341bc3a1ae91a728e0cc63c8e6d3791ad/g') && \ |
|||
SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.9/supercronic-linux-$ARCH && \ |
|||
SUPERCRONIC=supercronic-linux-$ARCH && \ |
|||
# Install SeaweedFS and Supercronic ( for cron job mode ) |
|||
apk add --no-cache --virtual build-dependencies --update wget curl ca-certificates && \ |
|||
apk add fuse && \ |
|||
wget -P /tmp https://github.com/$(curl -s -L https://github.com/chrislusf/seaweedfs/releases/${RELEASE} | egrep -o "chrislusf/seaweedfs/releases/download/.*/linux_$ARCH.tar.gz" | head -n 1) && \ |
|||
tar -C /usr/bin/ -xzvf /tmp/linux_$ARCH.tar.gz && \ |
|||
curl -fsSLO "$SUPERCRONIC_URL" && \ |
|||
echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - && \ |
|||
chmod +x "$SUPERCRONIC" && \ |
|||
mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" && \ |
|||
ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic && \ |
|||
apk del build-dependencies && \ |
|||
rm -rf /tmp/* |
|||
|
|||
# volume server gprc port |
|||
EXPOSE 18080 |
|||
# volume server http port |
|||
EXPOSE 8080 |
|||
# filer server gprc port |
|||
EXPOSE 18888 |
|||
# filer server http port |
|||
EXPOSE 8888 |
|||
# master server shared gprc port |
|||
EXPOSE 19333 |
|||
# master server shared http port |
|||
EXPOSE 9333 |
|||
# s3 server http port |
|||
EXPOSE 8333 |
|||
# webdav server http port |
|||
EXPOSE 7333 |
|||
|
|||
RUN mkdir -p /data/filerldb2 |
|||
|
|||
VOLUME /data |
|||
|
|||
COPY filer.toml /etc/seaweedfs/filer.toml |
|||
COPY entrypoint.sh /entrypoint.sh |
|||
RUN chmod +x /entrypoint.sh |
|||
|
|||
ENTRYPOINT ["/entrypoint.sh"] |
@ -0,0 +1,4 @@ |
|||
{ |
|||
"fluent_port": 24224, |
|||
"fluent_host": "fluent" |
|||
} |
@ -0,0 +1,36 @@ |
|||
version: '2' |
|||
|
|||
services: |
|||
s3: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 8333:8333 |
|||
- 9333:9333 |
|||
- 19333:19333 |
|||
- 8084:8080 |
|||
- 18084:18080 |
|||
- 8888:8888 |
|||
- 18888:18888 |
|||
- 8000:8000 |
|||
command: "server -ip=s3 -filer -s3 -s3.config=/etc/seaweedfs/s3.json -s3.port=8000 -s3.auditLogConfig=/etc/seaweedfs/fluent.json -volume.max=0 -master.volumeSizeLimitMB=8 -volume.preStopSeconds=1" |
|||
volumes: |
|||
- ./fluent.json:/etc/seaweedfs/fluent.json |
|||
- ./s3.json:/etc/seaweedfs/s3.json |
|||
depends_on: |
|||
- fluent |
|||
fluent: |
|||
image: fluent/fluentd:v1.14 |
|||
ports: |
|||
- 24224:24224 |
|||
#s3tests: |
|||
# image: chrislusf/ceph-s3-tests:local |
|||
# volumes: |
|||
# - ./s3tests.conf:/opt/s3-tests/s3tests.conf |
|||
# environment: |
|||
# S3TEST_CONF: "s3tests.conf" |
|||
# NOSETESTS_OPTIONS: "--verbose --logging-level=ERROR --with-xunit --failure-detail s3tests_boto3.functional.test_s3" |
|||
# NOSETESTS_ATTR: "!tagging,!fails_on_aws,!encryption,!bucket-policy,!versioning,!fails_on_rgw,!bucket-policy,!fails_with_subdomain,!policy_status,!object-lock,!lifecycle,!cors,!user-policy" |
|||
# NOSETESTS_EXCLUDE: "(get_bucket_encryption|put_bucket_encryption|bucket_list_delimiter_basic|bucket_listv2_delimiter_basic|bucket_listv2_encoding_basic|bucket_list_encoding_basic|bucket_list_delimiter_prefix|bucket_listv2_delimiter_prefix_ends_with_delimiter|bucket_list_delimiter_prefix_ends_with_delimiter|bucket_list_delimiter_alt|bucket_listv2_delimiter_alt|bucket_list_delimiter_prefix_underscore|bucket_list_delimiter_percentage|bucket_listv2_delimiter_percentage|bucket_list_delimiter_whitespace|bucket_listv2_delimiter_whitespace|bucket_list_delimiter_dot|bucket_listv2_delimiter_dot|bucket_list_delimiter_unreadable|bucket_listv2_delimiter_unreadable|bucket_listv2_fetchowner_defaultempty|bucket_listv2_fetchowner_empty|bucket_list_prefix_delimiter_alt|bucket_listv2_prefix_delimiter_alt|bucket_list_prefix_delimiter_prefix_not_exist|bucket_listv2_prefix_delimiter_prefix_not_exist|bucket_list_prefix_delimiter_delimiter_not_exist|bucket_listv2_prefix_delimiter_delimiter_not_exist|bucket_list_prefix_delimiter_prefix_delimiter_not_exist|bucket_listv2_prefix_delimiter_prefix_delimiter_not_exist|bucket_list_maxkeys_none|bucket_listv2_maxkeys_none|bucket_list_maxkeys_invalid|bucket_listv2_continuationtoken_empty|bucket_list_return_data|bucket_list_objects_anonymous|bucket_listv2_objects_anonymous|bucket_notexist|bucketv2_notexist|bucket_delete_nonempty|bucket_concurrent_set_canned_acl|object_write_to_nonexist_bucket|object_requestid_matches_header_on_error|object_set_get_metadata_none_to_good|object_set_get_metadata_none_to_empty|object_set_get_metadata_overwrite_to_empty|post_object_anonymous_request|post_object_authenticated_request|post_object_authenticated_no_content_type|post_object_authenticated_request_bad_access_key|post_object_set_success_code|post_object_set_invalid_success_code|post_object_upload_larger_than_chunk|post_object_set_key_from_filename|post_object_ignored_header|post_object_case_insensitive_condition_fields|post_object_escaped_field_values|post_object_success_redirect_action|post_object_invalid_signature|post_object_invalid_access_key|post_object_missing_policy_condition|post_object_user_specified_header|post_object_request_missing_policy_specified_field|post_object_expired_policy|post_object_invalid_request_field_value|get_object_ifunmodifiedsince_good|put_object_ifmatch_failed|object_raw_get_bucket_gone|object_delete_key_bucket_gone|object_raw_get_bucket_acl|object_raw_get_object_acl|object_raw_response_headers|object_raw_authenticated_bucket_gone|object_raw_get_x_amz_expires_out_max_range|object_raw_get_x_amz_expires_out_positive_range|object_anon_put_write_access|object_raw_put_authenticated_expired|bucket_create_exists|bucket_create_naming_bad_short_one|bucket_create_naming_bad_short_two|bucket_get_location|bucket_acl_default|bucket_acl_canned|bucket_acl_canned_publicreadwrite|bucket_acl_canned_authenticatedread|object_acl_default|object_acl_canned_during_create|object_acl_canned|object_acl_canned_publicreadwrite|object_acl_canned_authenticatedread|object_acl_canned_bucketownerread|object_acl_canned_bucketownerfullcontrol|object_acl_full_control_verify_attributes|bucket_acl_canned_private_to_private|bucket_acl_grant_nonexist_user|bucket_acl_no_grants|bucket_acl_grant_email_not_exist|bucket_acl_revoke_all|bucket_recreate_not_overriding|object_copy_verify_contenttype|object_copy_to_itself_with_metadata|object_copy_not_owned_bucket|object_copy_not_owned_object_bucket|object_copy_retaining_metadata|object_copy_replacing_metadata|multipart_upload_empty|multipart_copy_invalid_range|multipart_copy_special_names|multipart_upload_resend_part|multipart_upload_size_too_small|abort_multipart_upload_not_found|multipart_upload_missing_part|multipart_upload_incorrect_etag|100_continue|ranged_request_invalid_range|ranged_request_empty_object|access_bucket)" |
|||
# depends_on: |
|||
# - s3 |
|||
# - fluent |
@ -0,0 +1,89 @@ |
|||
version: '2' |
|||
|
|||
services: |
|||
master0: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 9333:9333 |
|||
- 19333:19333 |
|||
command: "-v=4 master -volumeSizeLimitMB 100 -raftHashicorp -ip=master0 -port=9333 -peers=master1:9334,master2:9335 -mdir=/data" |
|||
volumes: |
|||
- ./master/0:/data |
|||
environment: |
|||
WEED_MASTER_VOLUME_GROWTH_COPY_1: 1 |
|||
WEED_MASTER_VOLUME_GROWTH_COPY_2: 2 |
|||
WEED_MASTER_VOLUME_GROWTH_COPY_OTHER: 1 |
|||
master1: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 9334:9334 |
|||
- 19334:19334 |
|||
command: "-v=4 master -volumeSizeLimitMB 100 -raftHashicorp -ip=master1 -port=9334 -peers=master0:9333,master2:9335 -mdir=/data" |
|||
volumes: |
|||
- ./master/1:/data |
|||
environment: |
|||
WEED_MASTER_VOLUME_GROWTH_COPY_1: 1 |
|||
WEED_MASTER_VOLUME_GROWTH_COPY_2: 2 |
|||
WEED_MASTER_VOLUME_GROWTH_COPY_OTHER: 1 |
|||
master2: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 9335:9335 |
|||
- 19335:19335 |
|||
command: "-v=4 master -volumeSizeLimitMB 100 -raftHashicorp -ip=master2 -port=9335 -peers=master0:9333,master1:9334 -mdir=/data" |
|||
volumes: |
|||
- ./master/2:/data |
|||
environment: |
|||
WEED_MASTER_VOLUME_GROWTH_COPY_1: 1 |
|||
WEED_MASTER_VOLUME_GROWTH_COPY_2: 2 |
|||
WEED_MASTER_VOLUME_GROWTH_COPY_OTHER: 1 |
|||
volume1: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 8080:8080 |
|||
- 18080:18080 |
|||
command: 'volume -dataCenter=dc1 -rack=v1 -mserver="master0:9333,master1:9334,master2:9335" -port=8080 -ip=volume1 -publicUrl=localhost:8080 -preStopSeconds=1' |
|||
depends_on: |
|||
- master0 |
|||
- master1 |
|||
volume2: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 8082:8082 |
|||
- 18082:18082 |
|||
command: 'volume -dataCenter=dc2 -rack=v2 -mserver="master0:9333,master1:9334,master2:9335" -port=8082 -ip=volume2 -publicUrl=localhost:8082 -preStopSeconds=1' |
|||
depends_on: |
|||
- master0 |
|||
- master1 |
|||
volume3: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 8083:8083 |
|||
- 18083:18083 |
|||
command: 'volume -dataCenter=dc3 -rack=v3 -mserver="master0:9333,master1:9334,master2:9335" -port=8083 -ip=volume3 -publicUrl=localhost:8083 -preStopSeconds=1' |
|||
depends_on: |
|||
- master0 |
|||
- master1 |
|||
filer: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 8888:8888 |
|||
- 18888:18888 |
|||
- 8111:8111 |
|||
command: 'filer -defaultReplicaPlacement=100 -iam -master="master0:9333,master1:9334,master2:9335"' |
|||
depends_on: |
|||
- master0 |
|||
- master1 |
|||
- volume1 |
|||
- volume2 |
|||
s3: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 8333:8333 |
|||
command: '-v=9 s3 -ip.bind="s3" -filer="filer:8888"' |
|||
depends_on: |
|||
- master0 |
|||
- master1 |
|||
- volume1 |
|||
- volume2 |
|||
- filer |
@ -0,0 +1,44 @@ |
|||
version: '2' |
|||
|
|||
services: |
|||
master: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 9333:9333 |
|||
- 19333:19333 |
|||
command: "master -ip=master" |
|||
volume: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 8080:8080 |
|||
- 18080:18080 |
|||
command: "volume -mserver=master:9333 -port=8080 -ip=volume" |
|||
depends_on: |
|||
- master |
|||
s3: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 8888:8888 |
|||
- 18888:18888 |
|||
- 8333:8333 |
|||
command: '-v 9 filer -master="master:9333" -s3' |
|||
depends_on: |
|||
- master |
|||
- volume |
|||
nextcloud: |
|||
image: nextcloud:23.0.5-apache |
|||
environment: |
|||
- OBJECTSTORE_S3_HOST=s3 |
|||
- OBJECTSTORE_S3_BUCKET=nextcloud |
|||
- OBJECTSTORE_S3_KEY=some_access_key1 |
|||
- OBJECTSTORE_S3_SECRET=some_secret_key1 |
|||
- OBJECTSTORE_S3_PORT=8333 |
|||
- OBJECTSTORE_S3_SSL=false |
|||
- OBJECTSTORE_S3_USEPATH_STYLE=true |
|||
- SQLITE_DATABASE=nextcloud |
|||
- NEXTCLOUD_ADMIN_USER=admin |
|||
- NEXTCLOUD_ADMIN_PASSWORD=admin |
|||
ports: |
|||
- 80:80 |
|||
depends_on: |
|||
- s3 |
@ -0,0 +1,21 @@ |
|||
version: '3.9' |
|||
services: |
|||
node1: |
|||
image: chrislusf/seaweedfs:local |
|||
command: "server -master -volume -filer" |
|||
mount1: |
|||
image: chrislusf/seaweedfs:local |
|||
privileged: true |
|||
command: "mount -filer=node1:8888 -dir=/mnt -dirAutoCreate" |
|||
node2: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 7888:8888 |
|||
command: "server -master -volume -filer" |
|||
mount2: |
|||
image: chrislusf/seaweedfs:local |
|||
privileged: true |
|||
command: "mount -filer=node2:8888 -dir=/mnt -dirAutoCreate" |
|||
sync: |
|||
image: chrislusf/seaweedfs:local |
|||
command: "-v=4 filer.sync -a=node1:8888 -b=node2:8888 -a.debug -b.debug" |
@ -0,0 +1,61 @@ |
|||
version: '2' |
|||
|
|||
services: |
|||
etcd: |
|||
image: quay.io/coreos/etcd:v3.5.4 |
|||
command: "etcd --advertise-client-urls http://etcd:2379 --listen-client-urls http://0.0.0.0:2379" |
|||
ports: |
|||
- 2379:2379 |
|||
master: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 9333:9333 |
|||
- 19333:19333 |
|||
command: "master -ip=master -volumeSizeLimitMB=1024" |
|||
volume: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 8080:8080 |
|||
- 18080:18080 |
|||
command: "volume -mserver=master:9333 -port=8080 -ip=volume -max=0 -preStopSeconds=1" |
|||
depends_on: |
|||
- master |
|||
s3: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 8888:8888 |
|||
- 18888:18888 |
|||
- 8333:8333 |
|||
command: '-v 9 filer -master="master:9333" -s3 -s3.config=/etc/seaweedfs/s3.json -s3.port=8333' |
|||
environment: |
|||
WEED_LEVELDB2_ENABLED: 'false' |
|||
WEED_ETCD_ENABLED: 'true' |
|||
WEED_ETCD_SERVERS: "http://etcd:2379" |
|||
volumes: |
|||
- ./s3.json:/etc/seaweedfs/s3.json |
|||
depends_on: |
|||
- etcd |
|||
- master |
|||
- volume |
|||
registry: |
|||
image: registry:2 |
|||
environment: |
|||
REGISTRY_HTTP_ADDR: "0.0.0.0:5001" # seaweedfs s3 |
|||
REGISTRY_LOG_LEVEL: "debug" |
|||
REGISTRY_STORAGE: "s3" |
|||
REGISTRY_STORAGE_S3_REGION: "us-east-1" |
|||
REGISTRY_STORAGE_S3_REGIONENDPOINT: "http://s3:8333" |
|||
REGISTRY_STORAGE_S3_BUCKET: "registry" |
|||
REGISTRY_STORAGE_S3_ACCESSKEY: "some_access_key1" |
|||
REGISTRY_STORAGE_S3_SECRETKEY: "some_secret_key1" |
|||
REGISTRY_STORAGE_S3_V4AUTH: "true" |
|||
REGISTRY_STORAGE_S3_SECURE: "false" |
|||
REGISTRY_STORAGE_S3_SKIPVERIFY: "true" |
|||
REGISTRY_STORAGE_S3_ROOTDIRECTORY: "/" |
|||
REGISTRY_STORAGE_DELETE_ENABLED: "true" |
|||
REGISTRY_STORAGE_REDIRECT_DISABLE: "true" |
|||
REGISTRY_VALIDATION_DISABLED: "true" |
|||
ports: |
|||
- 5001:5001 |
|||
depends_on: |
|||
- s3 |
@ -0,0 +1,35 @@ |
|||
version: '2' |
|||
|
|||
services: |
|||
ydb: |
|||
image: cr.yandex/yc/yandex-docker-local-ydb |
|||
ports: |
|||
- 2135:2135 |
|||
- 8765:8765 |
|||
- 2136:2136 |
|||
environment: |
|||
- YDB_DEFAULT_LOG_LEVEL=DEBUG |
|||
- GRPC_TLS_PORT=2135 |
|||
- GRPC_PORT=2136 |
|||
- MON_PORT=8765 |
|||
s3: |
|||
image: chrislusf/seaweedfs:local |
|||
ports: |
|||
- 9333:9333 |
|||
- 19333:19333 |
|||
- 8888:8888 |
|||
- 8000:8000 |
|||
- 18888:18888 |
|||
command: "server -ip=s3 -filer -master.volumeSizeLimitMB=16 -volume.max=0 -volume -volume.preStopSeconds=1 -s3 -s3.config=/etc/seaweedfs/s3.json -s3.port=8000 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=false" |
|||
volumes: |
|||
- ./s3.json:/etc/seaweedfs/s3.json |
|||
environment: |
|||
WEED_LEVELDB2_ENABLED: "false" |
|||
WEED_YDB_ENABLED: "true" |
|||
WEED_YDB_DSN: "grpc://ydb:2136/?database=local" |
|||
WEED_YDB_PREFIX: "seaweedfs" |
|||
YDB_ANONYMOUS_CREDENTIALS: 1 |
|||
WEED_MASTER_VOLUME_GROWTH_COPY_1: 1 |
|||
WEED_MASTER_VOLUME_GROWTH_COPY_OTHER: 1 |
|||
depends_on: |
|||
- ydb |
@ -0,0 +1,3 @@ |
|||
[rocksdb] |
|||
enabled = true |
|||
dir = "/data/filer_rocksdb" |
1679
go.sum
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,5 +1,5 @@ |
|||
apiVersion: v1 |
|||
description: SeaweedFS |
|||
name: seaweedfs |
|||
appVersion: "2.65" |
|||
version: "2.65" |
|||
appVersion: "3.12" |
|||
version: "3.12" |
@ -1,58 +0,0 @@ |
|||
{{- if .Values.cronjob }} |
|||
{{- if .Values.cronjob.enabled }} |
|||
apiVersion: batch/v1beta1 |
|||
kind: CronJob |
|||
metadata: |
|||
name: {{ include "seaweedfs.fullname" . }}-cronjob |
|||
spec: |
|||
schedule: "{{ .Values.cronjob.schedule }}" |
|||
startingDeadlineSeconds: 200 |
|||
concurrencyPolicy: Forbid |
|||
failedJobsHistoryLimit: 2 |
|||
successfulJobsHistoryLimit: 2 |
|||
jobTemplate: |
|||
spec: |
|||
backoffLimit: 2 |
|||
template: |
|||
spec: |
|||
{{- if .Values.cronjob.nodeSelector }} |
|||
nodeSelector: |
|||
{{ tpl .Values.cronjob.nodeSelector . | indent 12 | trim }} |
|||
{{- end }} |
|||
{{- if .Values.cronjob.tolerations }} |
|||
tolerations: |
|||
{{ tpl .Values.cronjob.tolerations . | nindent 12 | trim }} |
|||
{{- end }} |
|||
restartPolicy: OnFailure |
|||
containers: |
|||
- name: shell |
|||
image: {{ template "cronjob.image" . }} |
|||
imagePullPolicy: {{ default "IfNotPresent" .Values.global.imagePullPolicy }} |
|||
resources: |
|||
{{- toYaml .Values.cronjob.resources| nindent 16 }} |
|||
command: |
|||
- sh |
|||
- -c |
|||
- | |
|||
set -ex |
|||
echo -e "lock\n\ |
|||
volume.balance -force \ |
|||
{{ if .Values.volume.dataCenter }} -dataCenter {{ .Values.volume.dataCenter }}{{ end }}\ |
|||
{{ if .Values.cronjob.collection }} -collection {{ .Values.cronjob.collection }}{{ end }}\n\ |
|||
{{- if .Values.cronjob.enableFixReplication }} |
|||
volume.fix.replication -collectionPattern={{ .Values.cronjob.collectionPattern }} \n\ |
|||
{{- end }} |
|||
unlock\n" | \ |
|||
/usr/bin/weed shell \ |
|||
{{- if .Values.cronjob.master }} |
|||
-master {{ .Values.cronjob.master }} \ |
|||
{{- else }} |
|||
-master {{ template "seaweedfs.name" . }}-master.{{ .Release.Namespace }}.svc:{{ .Values.master.port }} \ |
|||
{{- end }} |
|||
{{- if .Values.cronjob.filer }} |
|||
-filer {{ .Values.cronjob.filer }} |
|||
{{- else }} |
|||
-filer {{ template "seaweedfs.name" . }}-filer.{{ .Release.Namespace }}.svc:{{ .Values.filer.port }} |
|||
{{- end }} |
|||
{{- end }} |
|||
{{- end }} |
@ -1,59 +1,67 @@ |
|||
{{- if .Values.filer.ingress.enabled }} |
|||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} |
|||
apiVersion: networking.k8s.io/v1 |
|||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }} |
|||
apiVersion: networking.k8s.io/v1beta1 |
|||
{{- else }} |
|||
apiVersion: extensions/v1beta1 |
|||
{{- end }} |
|||
kind: Ingress |
|||
metadata: |
|||
name: ingress-{{ template "seaweedfs.name" . }}-filer |
|||
annotations: |
|||
kubernetes.io/ingress.class: "nginx" |
|||
nginx.ingress.kubernetes.io/auth-type: "basic" |
|||
nginx.ingress.kubernetes.io/auth-secret: "default/ingress-basic-auth-secret" |
|||
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - SW-Filer' |
|||
nginx.ingress.kubernetes.io/service-upstream: "true" |
|||
nginx.ingress.kubernetes.io/rewrite-target: /$1 |
|||
nginx.ingress.kubernetes.io/use-regex: "true" |
|||
nginx.ingress.kubernetes.io/enable-rewrite-log: "true" |
|||
nginx.ingress.kubernetes.io/ssl-redirect: "false" |
|||
nginx.ingress.kubernetes.io/force-ssl-redirect: "false" |
|||
nginx.ingress.kubernetes.io/configuration-snippet: | |
|||
sub_filter '<head>' '<head> <base href="/sw-filer/">'; #add base url |
|||
sub_filter '="/' '="./'; #make absolute paths to relative |
|||
sub_filter '=/' '=./'; |
|||
sub_filter '/seaweedfsstatic' './seaweedfsstatic'; |
|||
sub_filter_once off; |
|||
name: ingress-{{ template "seaweedfs.name" . }}-filer |
|||
namespace: {{ .Release.Namespace }} |
|||
annotations: |
|||
{{ omit .Values.filer.ingress.annotations "kubernetes.io/ingress.class" | toYaml | nindent 4 }} |
|||
spec: |
|||
rules: |
|||
- http: |
|||
paths: |
|||
- path: /sw-filer/?(.*) |
|||
backend: |
|||
serviceName: {{ template "seaweedfs.name" . }}-filer |
|||
servicePort: {{ .Values.filer.port }} |
|||
ingressClassName: {{ .Values.filer.ingress.className | quote }} |
|||
rules: |
|||
- http: |
|||
paths: |
|||
- path: /sw-filer/?(.*) |
|||
pathType: ImplementationSpecific |
|||
backend: |
|||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} |
|||
service: |
|||
name: {{ template "seaweedfs.name" . }}-filer |
|||
port: |
|||
number: {{ .Values.filer.port }} |
|||
#name: |
|||
{{- else }} |
|||
serviceName: {{ template "seaweedfs.name" . }}-filer |
|||
servicePort: {{ .Values.filer.port }} |
|||
{{- end }} |
|||
{{- end }} |
|||
--- |
|||
{{- if .Values.master.ingress.enabled }} |
|||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} |
|||
apiVersion: networking.k8s.io/v1 |
|||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }} |
|||
apiVersion: networking.k8s.io/v1beta1 |
|||
{{- else }} |
|||
apiVersion: extensions/v1beta1 |
|||
{{- end }} |
|||
kind: Ingress |
|||
metadata: |
|||
name: ingress-{{ template "seaweedfs.name" . }}-master |
|||
namespace: {{ .Release.Namespace }} |
|||
annotations: |
|||
kubernetes.io/ingress.class: "nginx" |
|||
nginx.ingress.kubernetes.io/auth-type: "basic" |
|||
nginx.ingress.kubernetes.io/auth-secret: "default/ingress-basic-auth-secret" |
|||
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - SW-Master' |
|||
nginx.ingress.kubernetes.io/service-upstream: "true" |
|||
nginx.ingress.kubernetes.io/rewrite-target: /$1 |
|||
nginx.ingress.kubernetes.io/use-regex: "true" |
|||
nginx.ingress.kubernetes.io/enable-rewrite-log: "true" |
|||
nginx.ingress.kubernetes.io/ssl-redirect: "false" |
|||
nginx.ingress.kubernetes.io/force-ssl-redirect: "false" |
|||
nginx.ingress.kubernetes.io/configuration-snippet: | |
|||
sub_filter '<head>' '<head> <base href="/sw-master/">'; #add base url |
|||
sub_filter '="/' '="./'; #make absolute paths to relative |
|||
sub_filter '=/' '=./'; |
|||
sub_filter '/seaweedfsstatic' './seaweedfsstatic'; |
|||
sub_filter_once off; |
|||
{{ omit .Values.master.ingress.annotations "kubernetes.io/ingress.class" | toYaml | nindent 4 }} |
|||
spec: |
|||
ingressClassName: {{ .Values.master.ingress.className | quote }} |
|||
rules: |
|||
- http: |
|||
paths: |
|||
- path: /sw-master/?(.*) |
|||
pathType: ImplementationSpecific |
|||
backend: |
|||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} |
|||
service: |
|||
name: {{ template "seaweedfs.name" . }}-master |
|||
port: |
|||
number: {{ .Values.master.port }} |
|||
#name: |
|||
{{- else }} |
|||
serviceName: {{ template "seaweedfs.name" . }}-master |
|||
servicePort: {{ .Values.master.port }} |
|||
{{- end }} |
|||
{{- end }} |
After Width: 1017 | Height: 633 | Size: 127 KiB |
@ -0,0 +1,109 @@ |
|||
package seaweedfs.client; |
|||
|
|||
import java.io.IOException; |
|||
import java.util.ArrayList; |
|||
import java.util.Collections; |
|||
import java.util.Comparator; |
|||
import java.util.List; |
|||
|
|||
public class ReadChunks { |
|||
|
|||
public static List<SeaweedRead.VisibleInterval> readResolvedChunks(List<FilerProto.FileChunk> chunkList) throws IOException { |
|||
List<Point> points = new ArrayList<>(chunkList.size() * 2); |
|||
for (FilerProto.FileChunk chunk : chunkList) { |
|||
points.add(new Point(chunk.getOffset(), chunk, true)); |
|||
points.add(new Point(chunk.getOffset() + chunk.getSize(), chunk, false)); |
|||
} |
|||
Collections.sort(points, new Comparator<Point>() { |
|||
@Override |
|||
public int compare(Point a, Point b) { |
|||
int x = (int) (a.x - b.x); |
|||
if (a.x != b.x) { |
|||
return (int) (a.x - b.x); |
|||
} |
|||
if (a.ts != b.ts) { |
|||
return (int) (a.ts - b.ts); |
|||
} |
|||
if (!a.isStart) { |
|||
return -1; |
|||
} |
|||
return 1; |
|||
} |
|||
}); |
|||
|
|||
long prevX = 0; |
|||
List<SeaweedRead.VisibleInterval> visibles = new ArrayList<>(); |
|||
ArrayList<Point> queue = new ArrayList<>(); |
|||
for (Point point : points) { |
|||
if (point.isStart) { |
|||
if (queue.size() > 0) { |
|||
int lastIndex = queue.size() - 1; |
|||
Point lastPoint = queue.get(lastIndex); |
|||
if (point.x != prevX && lastPoint.ts < point.ts) { |
|||
addToVisibles(visibles, prevX, lastPoint, point); |
|||
prevX = point.x; |
|||
} |
|||
} |
|||
// insert into queue |
|||
for (int i = queue.size(); i >= 0; i--) { |
|||
if (i == 0 || queue.get(i - 1).ts <= point.ts) { |
|||
if (i == queue.size()) { |
|||
prevX = point.x; |
|||
} |
|||
queue.add(i, point); |
|||
break; |
|||
} |
|||
} |
|||
} else { |
|||
int lastIndex = queue.size() - 1; |
|||
int index = lastIndex; |
|||
Point startPoint = null; |
|||
for (; index >= 0; index--) { |
|||
startPoint = queue.get(index); |
|||
if (startPoint.ts == point.ts) { |
|||
queue.remove(index); |
|||
break; |
|||
} |
|||
} |
|||
if (index == lastIndex && startPoint != null) { |
|||
addToVisibles(visibles, prevX, startPoint, point); |
|||
prevX = point.x; |
|||
} |
|||
} |
|||
} |
|||
|
|||
return visibles; |
|||
|
|||
} |
|||
|
|||
private static void addToVisibles(List<SeaweedRead.VisibleInterval> visibles, long prevX, Point startPoint, Point point) { |
|||
if (prevX < point.x) { |
|||
FilerProto.FileChunk chunk = startPoint.chunk; |
|||
visibles.add(new SeaweedRead.VisibleInterval( |
|||
prevX, |
|||
point.x, |
|||
chunk.getFileId(), |
|||
chunk.getMtime(), |
|||
prevX - chunk.getOffset(), |
|||
chunk.getOffset() == prevX && chunk.getSize() == prevX - startPoint.x, |
|||
chunk.getCipherKey().toByteArray(), |
|||
chunk.getIsCompressed() |
|||
)); |
|||
} |
|||
} |
|||
|
|||
static class Point { |
|||
long x; |
|||
long ts; |
|||
FilerProto.FileChunk chunk; |
|||
boolean isStart; |
|||
|
|||
public Point(long x, FilerProto.FileChunk chunk, boolean isStart) { |
|||
this.x = x; |
|||
this.ts = chunk.getMtime(); |
|||
this.chunk = chunk; |
|||
this.isStart = isStart; |
|||
} |
|||
} |
|||
|
|||
} |
1932
other/metrics/grafana_seaweedfs_heartbeat.json
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,2 @@ |
|||
/s3-tests |
|||
/tmp |
@ -0,0 +1,11 @@ |
|||
# the tests only support python 3.6, not newer |
|||
FROM ubuntu:latest |
|||
|
|||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y git-core sudo tzdata |
|||
RUN git clone https://github.com/ceph/s3-tests.git |
|||
WORKDIR s3-tests |
|||
|
|||
# we pin a certain commit |
|||
RUN git checkout 9a6a1e9f197fc9fb031b809d1e057635c2ff8d4e |
|||
|
|||
RUN ./bootstrap |
@ -0,0 +1,13 @@ |
|||
# Running S3 Compatibility tests against SeaweedFS |
|||
|
|||
This is using [the tests from CephFS](https://github.com/ceph/s3-tests). |
|||
|
|||
## Prerequisites |
|||
|
|||
- have Docker installed |
|||
- this has been executed on Mac. On Linux, the hostname in `s3tests.conf` needs to be adjusted. |
|||
|
|||
## Running tests |
|||
|
|||
- `./prepare.sh` to build the docker image |
|||
- `./run.sh` to execute all tests |
@ -0,0 +1,5 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
set -ex |
|||
|
|||
docker build --progress=plain -t s3tests . |
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue