0e01551957e8cc71971cbdda138c66d49f2b6a86.svn-base 803 B

12345678910111213
  1. 1 部署docker
  2. docker run -p 2379:2379 -p 2380:2380 --mount type=bind,source=/tmp/etcd-data.tmp,destination=/etcd-data --name etcd-gcr-v3.4.7 gcr.io/etcd-development/etcd:v3.4.7 /usr/local/bin/etcd --name s1 --data-dir /etcd-data --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2379 --listen-peer-urls http://0.0.0.0:2380 --initial-advertise-peer-urls http://0.0.0.0:2380 --initial-cluster s1=http://0.0.0.0:2380 --initial-cluster-token tkn --initial-cluster-state new --log-level info --logger zap --log-outputs stderr
  3. 2 进入容器
  4. docker exec -it 127211f71a26[设置自己运行容器的ID] /sh
  5. 3 设置属性值
  6. etcdctl put call_service_d "0" 表示降级,不调用
  7. etcdctl put call_service_d "1" 表示不降级,调用