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.

122 lines
4.6 KiB

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