2020-02-26 13:56:15 +08:00
|
|
|
all: gen
|
|
|
|
|
|
|
|
.PHONY : gen
|
|
|
|
|
2020-02-27 08:46:29 +08:00
|
|
|
gen: dev
|
|
|
|
|
2022-08-26 16:28:03 +08:00
|
|
|
cgo ?= 0
|
2021-03-12 18:54:08 +08:00
|
|
|
binary:
|
2021-05-01 15:20:11 +08:00
|
|
|
export SWCOMMIT=$(shell git rev-parse --short HEAD)
|
2022-07-29 15:17:28 +08:00
|
|
|
export SWLDFLAGS="-X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=$(SWCOMMIT)"
|
2023-09-22 02:58:03 +08:00
|
|
|
cd ../weed && CGO_ENABLED=$(cgo) GOOS=linux go build $(options) -tags "$(tags)" -ldflags "-s -w -extldflags -static $(SWLDFLAGS)" && mv weed ../docker/
|
2024-05-04 12:27:06 +08:00
|
|
|
cd ../weed/mq/client/cmd/weed_pub_kv && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_pub_kv ../../../../../docker/
|
|
|
|
cd ../weed/mq/client/cmd/weed_pub_record && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_pub_record ../../../../../docker/
|
|
|
|
cd ../weed/mq/client/cmd/weed_sub_kv && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_sub_kv ../../../../../docker/
|
|
|
|
cd ../weed/mq/client/cmd/weed_sub_record && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_sub_record ../../../../../docker/
|
2022-09-01 00:27:53 +08:00
|
|
|
|
|
|
|
binary_race: options = -race
|
|
|
|
binary_race: cgo = 1
|
|
|
|
binary_race: binary
|
2021-03-12 18:54:08 +08:00
|
|
|
|
|
|
|
build: binary
|
2020-03-02 10:23:07 +08:00
|
|
|
docker build --no-cache -t chrislusf/seaweedfs:local -f Dockerfile.local .
|
2022-09-01 00:27:53 +08:00
|
|
|
|
|
|
|
build_e2e: binary_race
|
|
|
|
docker build --no-cache -t chrislusf/seaweedfs:e2e -f Dockerfile.e2e .
|
2020-02-27 08:46:29 +08:00
|
|
|
|
2022-05-16 15:58:11 +08:00
|
|
|
go_build: # make go_build tags=elastic,ydb,gocdk,hdfs,5BytesOffset
|
2022-05-14 21:40:32 +08:00
|
|
|
docker build --build-arg TAGS=$(tags) --no-cache -t chrislusf/seaweedfs:go_build -f Dockerfile.go_build .
|
|
|
|
|
|
|
|
go_build_large_disk:
|
|
|
|
docker build --build-arg TAGS=large_disk --no-cache -t chrislusf/seaweedfs:large_disk -f Dockerfile.go_build .
|
|
|
|
|
2022-09-02 00:44:48 +08:00
|
|
|
build_rocksdb_dev_env:
|
|
|
|
docker build --no-cache -t chrislusf/rocksdb_dev_env -f Dockerfile.rocksdb_dev_env .
|
|
|
|
|
2023-05-30 14:14:45 +08:00
|
|
|
build_rocksdb_local: build_rocksdb_dev_env
|
2022-09-02 00:44:48 +08:00
|
|
|
cd .. ; docker build --no-cache -t chrislusf/seaweedfs:rocksdb_local -f docker/Dockerfile.rocksdb_large_local .
|
|
|
|
|
2021-10-01 12:10:23 +08:00
|
|
|
build_rocksdb:
|
|
|
|
docker build --no-cache -t chrislusf/seaweedfs:rocksdb -f Dockerfile.rocksdb_large .
|
|
|
|
|
2021-02-18 07:03:42 +08:00
|
|
|
s3tests_build:
|
|
|
|
docker build --no-cache -t chrislusf/ceph-s3-tests:local -f Dockerfile.s3tests .
|
|
|
|
|
2020-02-27 08:46:29 +08:00
|
|
|
dev: build
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/local-dev-compose.yml -p seaweedfs up
|
2020-02-27 08:46:29 +08:00
|
|
|
|
2022-09-01 00:27:53 +08:00
|
|
|
dev_race: binary_race
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/local-dev-compose.yml -p seaweedfs up
|
2022-08-26 16:28:03 +08:00
|
|
|
|
2021-03-09 00:39:44 +08:00
|
|
|
dev_tls: build certstrap
|
2022-10-17 05:02:33 +08:00
|
|
|
ENV_FILE="tls.env" docker compose -f compose/local-dev-compose.yml -p seaweedfs up
|
2021-03-09 00:39:44 +08:00
|
|
|
|
2021-01-23 14:47:23 +08:00
|
|
|
dev_mount: build
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/local-mount-compose.yml -p seaweedfs up
|
2021-01-23 14:47:23 +08:00
|
|
|
|
2021-07-04 03:52:58 +08:00
|
|
|
run_image: build
|
|
|
|
docker run --rm -ti --device /dev/fuse --cap-add SYS_ADMIN --entrypoint /bin/sh chrislusf/seaweedfs:local
|
|
|
|
|
2021-03-12 18:54:08 +08:00
|
|
|
profile_mount: build
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/local-mount-profile-compose.yml -p seaweedfs up
|
2021-03-12 18:54:08 +08:00
|
|
|
|
2020-12-21 23:58:41 +08:00
|
|
|
k8s: build
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/local-k8s-compose.yml -p seaweedfs up
|
2020-12-21 23:58:41 +08:00
|
|
|
|
2020-11-11 18:02:30 +08:00
|
|
|
dev_registry: build
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/local-registry-compose.yml -p seaweedfs up
|
2020-11-11 18:02:30 +08:00
|
|
|
|
2023-02-28 11:19:12 +08:00
|
|
|
dev_replicate:
|
|
|
|
docker build --build-arg TAGS=gocdk --no-cache -t chrislusf/seaweedfs:local -f Dockerfile.go_build .
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/local-replicate-compose.yml -p seaweedfs up
|
2021-01-27 01:50:25 +08:00
|
|
|
|
2021-12-10 22:40:32 +08:00
|
|
|
dev_auditlog: build
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/local-auditlog-compose.yml -p seaweedfs up
|
2021-12-10 22:40:32 +08:00
|
|
|
|
2022-05-23 21:53:35 +08:00
|
|
|
dev_nextcloud: build
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/local-nextcloud-compose.yml -p seaweedfs up
|
2022-05-23 21:53:35 +08:00
|
|
|
|
2020-02-27 08:46:29 +08:00
|
|
|
cluster: build
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/local-cluster-compose.yml -p seaweedfs up
|
2020-02-27 08:46:29 +08:00
|
|
|
|
2021-01-24 16:00:42 +08:00
|
|
|
2clusters: build
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/local-clusters-compose.yml -p seaweedfs up
|
2021-01-24 16:00:42 +08:00
|
|
|
|
2022-05-06 18:53:36 +08:00
|
|
|
2mount: build
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/local-sync-mount-compose.yml -p seaweedfs up
|
2022-05-06 18:53:36 +08:00
|
|
|
|
2024-03-08 00:35:51 +08:00
|
|
|
filer_backup: build
|
|
|
|
docker compose -f compose/local-filer-backup-compose.yml -p seaweedfs up
|
|
|
|
|
2022-04-04 20:51:51 +08:00
|
|
|
hashicorp_raft: build
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/local-hashicorp-raft-compose.yml -p seaweedfs up
|
2022-04-04 20:51:51 +08:00
|
|
|
|
2021-02-18 07:03:42 +08:00
|
|
|
s3tests: build s3tests_build
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/local-s3tests-compose.yml -p seaweedfs up
|
2021-02-18 07:03:42 +08:00
|
|
|
|
2024-02-01 13:31:10 +08:00
|
|
|
brokers: build
|
|
|
|
docker compose -f compose/local-brokers-compose.yml -p seaweedfs up
|
|
|
|
|
2021-01-31 05:38:44 +08:00
|
|
|
filer_etcd: build
|
2021-02-04 05:09:28 +08:00
|
|
|
docker stack deploy -c compose/swarm-etcd.yml fs
|
2021-01-31 05:38:44 +08:00
|
|
|
|
2022-05-06 16:50:34 +08:00
|
|
|
test_etcd: build
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/test-etcd-filer.yml -p seaweedfs up
|
2022-05-06 16:50:34 +08:00
|
|
|
|
2022-05-12 15:23:02 +08:00
|
|
|
test_ydb: tags = ydb
|
|
|
|
test_ydb: build
|
|
|
|
export
|
2022-10-17 05:02:33 +08:00
|
|
|
docker compose -f compose/test-ydb-filer.yml -p seaweedfs up
|
2022-05-12 15:23:02 +08:00
|
|
|
|
2020-02-27 08:46:29 +08:00
|
|
|
clean:
|
2020-02-26 13:56:15 +08:00
|
|
|
rm ./weed
|
2021-03-09 00:39:44 +08:00
|
|
|
|
|
|
|
certstrap:
|
2023-09-25 21:47:38 +08:00
|
|
|
go install -v github.com/square/certstrap@latest
|
|
|
|
certstrap --depot-path compose/tls init --curve P-256 --passphrase "" --common-name "SeaweedFS CA" || true
|
|
|
|
certstrap --depot-path compose/tls request-cert --ou "SeaweedFS" --curve P-256 --passphrase "" --domain localhost --common-name volume01.dev || true
|
|
|
|
certstrap --depot-path compose/tls request-cert --ou "SeaweedFS" --curve P-256 --passphrase "" --common-name master01.dev || true
|
|
|
|
certstrap --depot-path compose/tls request-cert --ou "SeaweedFS" --curve P-256 --passphrase "" --common-name filer01.dev || true
|
|
|
|
certstrap --depot-path compose/tls request-cert --ou "SeaweedFS" --curve P-256 --passphrase "" --common-name client01.dev || true
|
2021-03-10 17:02:13 +08:00
|
|
|
certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" volume01.dev || true
|
|
|
|
certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" master01.dev || true
|
|
|
|
certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" filer01.dev || true
|
2022-05-06 16:50:34 +08:00
|
|
|
certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" client01.dev || true
|