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.

94 lines
3.3 KiB

3 years ago
4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
  1. all: gen
  2. .PHONY : gen
  3. gen: dev
  4. binary:
  5. export SWCOMMIT=$(shell git rev-parse --short HEAD)
  6. export SWLDFLAGS="-X github.com/chrislusf/seaweedfs/weed/util.COMMIT=$(SWCOMMIT)"
  7. cd ../weed; CGO_ENABLED=0 GOOS=linux go build -tags "$(tags)" -ldflags "-extldflags -static $(SWLDFLAGS)"; mv weed ../docker/
  8. build: binary
  9. docker build --no-cache -t chrislusf/seaweedfs:local -f Dockerfile.local .
  10. rm ./weed
  11. go_build: # make go_build tags=elastic,ydb,gocdk,hdfs,5BytesOffset
  12. docker build --build-arg TAGS=$(tags) --no-cache -t chrislusf/seaweedfs:go_build -f Dockerfile.go_build .
  13. go_build_large_disk:
  14. docker build --build-arg TAGS=large_disk --no-cache -t chrislusf/seaweedfs:large_disk -f Dockerfile.go_build .
  15. build_rocksdb:
  16. docker build --no-cache -t chrislusf/seaweedfs:rocksdb -f Dockerfile.rocksdb_large .
  17. s3tests_build:
  18. docker build --no-cache -t chrislusf/ceph-s3-tests:local -f Dockerfile.s3tests .
  19. dev: build
  20. docker-compose -f compose/local-dev-compose.yml -p seaweedfs up
  21. dev_tls: build certstrap
  22. ENV_FILE="tls.env" docker-compose -f compose/local-dev-compose.yml -p seaweedfs up
  23. dev_mount: build
  24. docker-compose -f compose/local-mount-compose.yml -p seaweedfs up
  25. run_image: build
  26. docker run --rm -ti --device /dev/fuse --cap-add SYS_ADMIN --entrypoint /bin/sh chrislusf/seaweedfs:local
  27. profile_mount: build
  28. docker-compose -f compose/local-mount-profile-compose.yml -p seaweedfs up
  29. k8s: build
  30. docker-compose -f compose/local-k8s-compose.yml -p seaweedfs up
  31. dev_registry: build
  32. docker-compose -f compose/local-registry-compose.yml -p seaweedfs up
  33. dev_replicate: build
  34. docker-compose -f compose/local-replicate-compose.yml -p seaweedfs up
  35. dev_auditlog: build
  36. docker-compose -f compose/local-auditlog-compose.yml -p seaweedfs up
  37. cluster: build
  38. docker-compose -f compose/local-cluster-compose.yml -p seaweedfs up
  39. 2clusters: build
  40. docker-compose -f compose/local-clusters-compose.yml -p seaweedfs up
  41. 2mount: build
  42. docker-compose -f compose/local-sync-mount-compose.yml -p seaweedfs up
  43. hashicorp_raft: build
  44. docker-compose -f compose/local-hashicorp-raft-compose.yml -p seaweedfs up
  45. s3tests: build s3tests_build
  46. docker-compose -f compose/local-s3tests-compose.yml -p seaweedfs up
  47. filer_etcd: build
  48. docker stack deploy -c compose/swarm-etcd.yml fs
  49. test_etcd: build
  50. docker-compose -f compose/test-etcd-filer.yml -p seaweedfs up
  51. test_ydb: tags = ydb
  52. test_ydb: build
  53. export
  54. docker-compose -f compose/test-ydb-filer.yml -p seaweedfs up
  55. clean:
  56. rm ./weed
  57. certstrap:
  58. go get github.com/square/certstrap
  59. certstrap --depot-path compose/tls init --passphrase "" --common-name "SeaweedFS CA" || true
  60. certstrap --depot-path compose/tls request-cert --passphrase "" --common-name volume01.dev || true
  61. certstrap --depot-path compose/tls request-cert --passphrase "" --common-name master01.dev || true
  62. certstrap --depot-path compose/tls request-cert --passphrase "" --common-name filer01.dev || true
  63. certstrap --depot-path compose/tls request-cert --passphrase "" --common-name client01.dev || true
  64. certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" volume01.dev || true
  65. certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" master01.dev || true
  66. certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" filer01.dev || true
  67. certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" client01.dev || true