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.

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