Makefile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 -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. s3tests_build:
  12. docker build --no-cache -t chrislusf/ceph-s3-tests:local -f Dockerfile.s3tests .
  13. dev: build
  14. docker-compose -f compose/local-dev-compose.yml -p seaweedfs up
  15. dev_tls: build certstrap
  16. ENV_FILE="tls.env" docker-compose -f compose/local-dev-compose.yml -p seaweedfs up
  17. dev_mount: build
  18. docker-compose -f compose/local-mount-compose.yml -p seaweedfs up
  19. run_image: build
  20. docker run --rm -ti --device /dev/fuse --cap-add SYS_ADMIN --entrypoint /bin/sh chrislusf/seaweedfs:local
  21. profile_mount: build
  22. docker-compose -f compose/local-mount-profile-compose.yml -p seaweedfs up
  23. k8s: build
  24. docker-compose -f compose/local-k8s-compose.yml -p seaweedfs up
  25. dev_registry: build
  26. docker-compose -f compose/local-registry-compose.yml -p seaweedfs up
  27. dev_replicate: build
  28. docker-compose -f compose/local-replicate-compose.yml -p seaweedfs up
  29. cluster: build
  30. docker-compose -f compose/local-cluster-compose.yml -p seaweedfs up
  31. 2clusters: build
  32. docker-compose -f compose/local-clusters-compose.yml -p seaweedfs up
  33. s3tests: build s3tests_build
  34. docker-compose -f compose/local-s3tests-compose.yml -p seaweedfs up
  35. filer_etcd: build
  36. docker stack deploy -c compose/swarm-etcd.yml fs
  37. clean:
  38. rm ./weed
  39. certstrap:
  40. go get github.com/square/certstrap
  41. certstrap --depot-path compose/tls init --passphrase "" --common-name "SeaweedFS CA" || true
  42. certstrap --depot-path compose/tls request-cert --passphrase "" --common-name volume01.dev || true
  43. certstrap --depot-path compose/tls request-cert --passphrase "" --common-name master01.dev || true
  44. certstrap --depot-path compose/tls request-cert --passphrase "" --common-name filer01.dev || true
  45. certstrap --depot-path compose/tls request-cert --passphrase "" --common-name client01.dev || true
  46. certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" volume01.dev || true
  47. certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" master01.dev || true
  48. certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" filer01.dev || true
  49. certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" client01.dev || true