auth_proxy.j2 744 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. usage="$0 start/stop"
  3. if [ $# -ne 1 ]; then
  4. echo USAGE: $usage
  5. exit 1
  6. fi
  7. case $1 in
  8. start)
  9. set -e
  10. /usr/bin/docker run --rm \
  11. -p 10000:{{ auth_proxy_port }} \
  12. --net=host --name=auth-proxy \
  13. -e NO_NETMASTER_STARTUP_CHECK=1 \
  14. -v /var/contiv:/var/contiv:z \
  15. {{ auth_proxy_image }} \
  16. --tls-key-file={{ auth_proxy_key }} \
  17. --tls-certificate={{ auth_proxy_cert }} \
  18. --data-store-address={{ auth_proxy_datastore }} \
  19. --netmaster-address={{ service_vip }}:9999 \
  20. --listen-address=:10000
  21. ;;
  22. stop)
  23. # don't stop on error
  24. /usr/bin/docker stop auth-proxy
  25. /usr/bin/docker rm -f -v auth-proxy
  26. ;;
  27. *)
  28. echo USAGE: $usage
  29. exit 1
  30. ;;
  31. esac