You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
4.8 KiB

8 months ago
3 years ago
4 years ago
4 years ago
4 years ago
11 months ago
3 years ago
3 years ago
3 years ago
  1. all: gen
  2. .PHONY : gen
  3. gen: dev
  4. cgo ?= 0
  5. binary:
  6. export SWCOMMIT=$(shell git rev-parse --short HEAD)
  7. export SWLDFLAGS="-X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=$(SWCOMMIT)"
  8. cd ../weed && CGO_ENABLED=$(cgo) GOOS=linux go build $(options) -tags "$(tags)" -ldflags "-s -w -extldflags -static $(SWLDFLAGS)" && mv weed ../docker/
  9. cd ../weed/mq/client/cmd/weed_pub_kv && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_pub_kv ../../../../../docker/
  10. cd ../weed/mq/client/cmd/weed_pub_record && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_pub_record ../../../../../docker/
  11. cd ../weed/mq/client/cmd/weed_sub_kv && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_sub_kv ../../../../../docker/
  12. cd ../weed/mq/client/cmd/weed_sub_record && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_sub_record ../../../../../docker/
  13. binary_race: options = -race
  14. binary_race: cgo = 1
  15. binary_race: binary
  16. build: binary
  17. docker build --no-cache -t chrislusf/seaweedfs:local -f Dockerfile.local .
  18. build_e2e: binary_race
  19. docker build --no-cache -t chrislusf/seaweedfs:e2e -f Dockerfile.e2e .
  20. go_build: # make go_build tags=elastic,ydb,gocdk,hdfs,5BytesOffset
  21. docker build --build-arg TAGS=$(tags) --no-cache -t chrislusf/seaweedfs:go_build -f Dockerfile.go_build .
  22. go_build_large_disk:
  23. docker build --build-arg TAGS=large_disk --no-cache -t chrislusf/seaweedfs:large_disk -f Dockerfile.go_build .
  24. build_rocksdb_dev_env:
  25. docker build --no-cache -t chrislusf/rocksdb_dev_env -f Dockerfile.rocksdb_dev_env .
  26. build_rocksdb_local: build_rocksdb_dev_env
  27. cd .. ; docker build --no-cache -t chrislusf/seaweedfs:rocksdb_local -f docker/Dockerfile.rocksdb_large_local .
  28. build_rocksdb:
  29. docker build --no-cache -t chrislusf/seaweedfs:rocksdb -f Dockerfile.rocksdb_large .
  30. s3tests_build:
  31. docker build --no-cache -t chrislusf/ceph-s3-tests:local -f Dockerfile.s3tests .
  32. dev: build
  33. docker compose -f compose/local-dev-compose.yml -p seaweedfs up
  34. dev_race: binary_race
  35. docker compose -f compose/local-dev-compose.yml -p seaweedfs up
  36. dev_tls: build certstrap
  37. ENV_FILE="tls.env" docker compose -f compose/local-dev-compose.yml -p seaweedfs up
  38. dev_mount: build
  39. docker compose -f compose/local-mount-compose.yml -p seaweedfs up
  40. run_image: build
  41. docker run --rm -ti --device /dev/fuse --cap-add SYS_ADMIN --entrypoint /bin/sh chrislusf/seaweedfs:local
  42. profile_mount: build
  43. docker compose -f compose/local-mount-profile-compose.yml -p seaweedfs up
  44. k8s: build
  45. docker compose -f compose/local-k8s-compose.yml -p seaweedfs up
  46. dev_registry: build
  47. docker compose -f compose/local-registry-compose.yml -p seaweedfs up
  48. dev_replicate:
  49. docker build --build-arg TAGS=gocdk --no-cache -t chrislusf/seaweedfs:local -f Dockerfile.go_build .
  50. docker compose -f compose/local-replicate-compose.yml -p seaweedfs up
  51. dev_auditlog: build
  52. docker compose -f compose/local-auditlog-compose.yml -p seaweedfs up
  53. dev_nextcloud: build
  54. docker compose -f compose/local-nextcloud-compose.yml -p seaweedfs up
  55. cluster: build
  56. docker compose -f compose/local-cluster-compose.yml -p seaweedfs up
  57. 2clusters: build
  58. docker compose -f compose/local-clusters-compose.yml -p seaweedfs up
  59. 2mount: build
  60. docker compose -f compose/local-sync-mount-compose.yml -p seaweedfs up
  61. filer_backup: build
  62. docker compose -f compose/local-filer-backup-compose.yml -p seaweedfs up
  63. hashicorp_raft: build
  64. docker compose -f compose/local-hashicorp-raft-compose.yml -p seaweedfs up
  65. s3tests: build s3tests_build
  66. docker compose -f compose/local-s3tests-compose.yml -p seaweedfs up
  67. brokers: build
  68. docker compose -f compose/local-brokers-compose.yml -p seaweedfs up
  69. filer_etcd: build
  70. docker stack deploy -c compose/swarm-etcd.yml fs
  71. test_etcd: build
  72. docker compose -f compose/test-etcd-filer.yml -p seaweedfs up
  73. test_ydb: tags = ydb
  74. test_ydb: build
  75. export
  76. docker compose -f compose/test-ydb-filer.yml -p seaweedfs up
  77. clean:
  78. rm ./weed
  79. certstrap:
  80. go install -v github.com/square/certstrap@latest
  81. certstrap --depot-path compose/tls init --curve P-256 --passphrase "" --common-name "SeaweedFS CA" || true
  82. certstrap --depot-path compose/tls request-cert --ou "SeaweedFS" --curve P-256 --passphrase "" --domain localhost --common-name volume01.dev || true
  83. certstrap --depot-path compose/tls request-cert --ou "SeaweedFS" --curve P-256 --passphrase "" --common-name master01.dev || true
  84. certstrap --depot-path compose/tls request-cert --ou "SeaweedFS" --curve P-256 --passphrase "" --common-name filer01.dev || true
  85. certstrap --depot-path compose/tls request-cert --ou "SeaweedFS" --curve P-256 --passphrase "" --common-name client01.dev || true
  86. certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" volume01.dev || true
  87. certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" master01.dev || true
  88. certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" filer01.dev || true
  89. certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" client01.dev || true