Project: Xline (Orchestration & Management / Coordination & Service Discovery)
File: README.md

```bash docker run -it --name=xline ghcr.io/xline-kv/xline \ xline \ --name xline \ --storage-engine rocksdb \ --members xline=127.0.0.1:2379 \ --data-dir /usr/local/xline/data-dir ``` ```bash sudo apt-get install -y autoconf autogen libtool git clone --branch v3.21.12 --recurse-submodules https://github.com/protocolbuffers/protobuf cd protobuf ./autogen.sh ./configure make -j sudo make install ``` ```bash brew install protobuf ``` ```bash git clone --recurse-submodules https://github.com/datenlord/Xline cd Xline cargo build --release ``` ```bash ./target/release/xline --name xline \ --storage-engine rocksdb \ --members xline=127.0.0.1:2379 \ --data-dir <path-to-data-dir> ``` ```bash docker pull ghcr.io/xline-kv/xline:latest ``` ```bash git clone --recurse-submodules https://github.com/datenlord/Xline cd Xline docker build . -t ghcr.io/xline-kv/xline -f doc/quick-start/Dockerfile ``` ```bash cp ./fixtures/{private,public}.pem ./scripts ./scripts/quick_start.sh ``` ```bash docker exec client /bin/sh -c "/usr/local/bin/etcdctl --endpoints=\"http://172.20.0.3:2379\" put A 1" docker exec client /bin/sh -c "/usr/local/bin/etcdctl --endpoints=\"http://172.20.0.3:2379\" get A" ``` ```bash $ docker exec client /bin/sh -c "/usr/local/bin/etcdctl --endpoints=\"http://172.20.0.3:2379\" member list -w table" +++-++++ | ID | STATUS | NAME | PEER ADDRS | CLIENT ADDRS | IS LEARNER | +++-++++ | c446f1764cf82129 | started | node3 | 172.20.0.5:2379,172.20.0.5:2380 | 172.20.0.5:2379,172.20.0.5:2380 | false | | 536070dcd739623d | started | node1 | 172.20.0.3:2379,172.20.0.3:2380 | 172.20.0.3:2379,172.20.0.3:2380 | false | | c58a7f879100c944 | started | node2 | 172.20.0.4:2379,172.20.0.4:2380 | 172.20.0.4:2379,172.20.0.4:2380 | false | +++-++++ $ docker exec client /bin/sh -c "/usr/local/bin/etcdctl --endpoints=\"http://172.20.0.3:2379\" member add node4 --peer-urls=http://172.20.0.6:2379,http://172.20.0.6:2380" Member 7bcbb7db4adc6890 added to cluster 73917cf4cbc75001 ETCD_NAME="node4" ETCDINITIALCLUSTER="node4=http://172.20.0.6:2379,node4=http://172.20.0.6:2380,node2=172.20.0.4:2379,node2=172.20.0.4:2380,node3=172.20.0.5:2379,node3=172.20.0.5:2380,node1=172.20.0.3:2379,node1=172.20.0.3:2380" ETCDINITIALADVERTISEPEERURLS="http://172.20.0.6:2379,http://172.20.0.6:2380" ETCDINITIALCLUSTER_STATE="existing" $ docker run -d -it --rm --name=node4 --net=xlinenet --ip=172.20.0.6 --cap-add=NETADMIN --cpu-shares=1024 -m=512M -v /home/jiawei/Xline/scripts:/mnt ghcr.io/xline-kv/xline:latest bash $ docker exec -e RUST_LOG=debug -d node4 "/usr/local/bin/xline --name node4 --members node1=172.20.0.3:2379,172.20.0.3:2380,node2=172.20.0.4:2379,172.20.0.4:2380,node3=172.20.0.5:2379,172.20.0.5:2380,node4=172.20.0.6:2379,172.20.0.6:2380 --storage-engine rocksdb --data-dir /usr/local/xline/data-dir --auth-public-key /mnt/public.pem --auth-private-key /mnt/private.pem --initial-cluster-state=existing" $ docker exec client /bin/sh -c "/usr/local/bin/etcdctl --endpoints=\"http://172.20.0.3:2379\" member list -w table" +++-+--+--++ | ID | STATUS | NAME | PEER ADDRS | CLIENT ADDRS | IS LEARNER | +++-+--+--++ | 7bcbb7db4adc6890 | started | node4 | http://172.20.0.6:2379,http://172.20.0.6:2380 | http://172.20.0.6:2379,http://172.20.0.6:2380 | false | | c58a7f879100c944 | started | node2 | 172.20.0.4:2379,172.20.0.4:2380 | 172.20.0.4:2379,172.20.0.4:2380 | false | | c446f1764cf82129 | started | node3 | 172.20.0.5:2379,172.20.0.5:2380 | 172.20.0.5:2379,172.20.0.5:2380 | false | | 536070dcd739623d | started | node1 | 172.20.0.3:2379,172.20.0.3:2380 | 172.20.0.3:2379,172.20.0.3:2380 | false | +++-+--+--++ $ docker exec client /bin/sh -c "/usr/local/bin/etcdctl --endpoints=\"http://172.20.0.3:2379\" member remove 7bcbb7db4adc6890" Member 7bcbb7db4adc6890 removed from cluster 73917cf4cbc75001 $ docker exec client /bin/sh -c "/usr/local/bin/etcdctl --endpoints=\"http://172.20.0.3:2379\" member list -w table" +++-++++ | ID | STATUS | NAME | PEER ADDRS | CLIENT ADDRS | IS LEARNER | +++-++++ | c58a7f879100c944 | started | node2 | 172.20.0.4:2379,172.20.0.4:2380 | 172.20.0.4:2379,172.20.0.4:2380 | false | | c446f1764cf82129 | started | node3 | 172.20.0.5:2379,172.20.0.5:2380 | 172.20.0.5:2379,172.20.0.5:2380 | false | | 536070dcd739623d | started | node1 | 172.20.0.3:2379,172.20.0.3:2380 | 172.20.0.3:2379,172.20.0.3:2380 | false | +++-++++ ``` ```bash docker cp node1:/usr/local/bin/lock_client ./scripts ./scripts/validation_test.sh ``` ```bash ./scripts/benchmark.sh ``` | directory name | description | |-|| | benchmark | a customized benchmark using CURP protocol based client | | curp | the CURP protocol | | xline | xline services | | engine | persistent storage | | utils | some utilities, like lock, config, etc. | | scripts | the shell scripts for env deployment or benchmarking |