github.com/noironetworks/cilium-net@v1.6.12/contrib/scripts/cilium-up.sh (about) 1 #!/usr/bin/env bash 2 3 dir=$(cd $(dirname ${BASH_SOURCE})/../.. && pwd) 4 5 function cleanup { 6 docker rm -f "cilium-consul" 2> /dev/null || true 7 killall -9 cilium-docker 2> /dev/null 8 killall -9 cilium-agent 2> /dev/null 9 } 10 11 trap cleanup EXIT 12 cleanup 13 14 if [ -z $(which clang) ]; then 15 echo "Looking for LLVM installation..." 16 llvm_dir=$($dir/contrib/scripts/find-llvm.sh) 17 echo "Adding $llvm_dir/bin to PATH" 18 export PATH="$llvm_dir/bin:$PATH" 19 fi 20 21 sleep 3s 22 23 docker run -d \ 24 --name "cilium-consul" \ 25 -p 8501:8500 \ 26 -e 'CONSUL_LOCAL_CONFIG={"skip_leave_on_interrupt": true, "disable_update_check": true}' \ 27 consul:0.8.3 \ 28 agent -client=0.0.0.0 -server -bootstrap-expect 1 29 30 $dir/plugins/cilium-docker/cilium-docker& 31 $dir/daemon/cilium-agent --kvstore consul --kvstore-opt consul.address=127.0.0.1:8501 $*