Browse Source

feat: Send commands to weed shell from the docker image.

Add the ability to send commands to weed shell from the docker image.

Allows an operator to perform maintenance commands like so:
```
docker run \
  --rm \
  -e SHELL_FILER=localhost:8888 \
  -e SHELL_MASTER=localhost:9333 \
  chrislusf/seaweedfs:local \
  "shell" \
  "fs.configure -locationPrefix=/buckets/foo -volumeGrowthCount=3 -replication=002 -apply"
```
pull/3135/head
Kaiwalya Joshi 3 years ago
parent
commit
47d335cf8c
No known key found for this signature in database GPG Key ID: 99DF5226286CD44
  1. 6
      docker/entrypoint.sh

6
docker/entrypoint.sh

@ -57,6 +57,12 @@ case "$1" in
exec /usr/bin/weed -logtostderr=true s3 $ARGS $@ exec /usr/bin/weed -logtostderr=true s3 $ARGS $@
;; ;;
'shell')
ARGS="-cluster=$SHELL_CLUSTER -filer=$SHELL_FILER -filerGroup=$SHELL_FILER_GROUP -master=$SHELL_MASTER -options=$SHELL_OPTIONS"
shift
exec echo "$@" | /usr/bin/weed -logtostderr=true shell $ARGS
;;
*) *)
exec /usr/bin/weed $@ exec /usr/bin/weed $@
;; ;;

Loading…
Cancel
Save