From 67f7b34d3387fa37dec1fe544c06c964e0b00c97 Mon Sep 17 00:00:00 2001 From: Robert Lu Date: Mon, 24 Jul 2017 19:17:33 +0800 Subject: [PATCH 1/3] etcd default port is 2379 etcd client has register port 2379 at https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt --- src/Client.php | 2 +- src/Command/EtcdGetCommand.php | 2 +- src/Command/EtcdLsCommand.php | 2 +- src/Command/EtcdMkCommand.php | 2 +- src/Command/EtcdMkdirCommand.php | 2 +- src/Command/EtcdRmCommand.php | 2 +- src/Command/EtcdRmdirCommand.php | 2 +- src/Command/EtcdUpdateCommand.php | 2 +- src/Command/EtcdUpdateDirCommand.php | 2 +- src/Command/EtcdWatchCommand.php | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Client.php b/src/Client.php index 193f206..884305d 100644 --- a/src/Client.php +++ b/src/Client.php @@ -11,7 +11,7 @@ class Client { - private $server = 'http://127.0.0.1:4001'; + private $server = 'http://127.0.0.1:2379'; private $guzzleclient; diff --git a/src/Command/EtcdGetCommand.php b/src/Command/EtcdGetCommand.php index 9d688dc..bfa1c3c 100644 --- a/src/Command/EtcdGetCommand.php +++ b/src/Command/EtcdGetCommand.php @@ -25,7 +25,7 @@ protected function configure() 'server', InputArgument::OPTIONAL, 'Base url of etcd server', - 'http://127.0.0.1:4001' + 'http://127.0.0.1:2379' ); } diff --git a/src/Command/EtcdLsCommand.php b/src/Command/EtcdLsCommand.php index 738a8e4..cd09dd4 100644 --- a/src/Command/EtcdLsCommand.php +++ b/src/Command/EtcdLsCommand.php @@ -27,7 +27,7 @@ protected function configure() ->addArgument( 'server', InputArgument::OPTIONAL, - 'Base url of etcd server and the default is http://127.0.0.1:4001' + 'Base url of etcd server and the default is http://127.0.0.1:2379' ) ->addOption( 'recursive', diff --git a/src/Command/EtcdMkCommand.php b/src/Command/EtcdMkCommand.php index ab9d7df..f81aa53 100644 --- a/src/Command/EtcdMkCommand.php +++ b/src/Command/EtcdMkCommand.php @@ -31,7 +31,7 @@ protected function configure() )->addArgument( 'server', InputArgument::OPTIONAL, - 'Base url of etcd server and the default is http://127.0.0.1:4001' + 'Base url of etcd server and the default is http://127.0.0.1:2379' ); } diff --git a/src/Command/EtcdMkdirCommand.php b/src/Command/EtcdMkdirCommand.php index f0f8859..cf48e8c 100644 --- a/src/Command/EtcdMkdirCommand.php +++ b/src/Command/EtcdMkdirCommand.php @@ -24,7 +24,7 @@ protected function configure() )->addArgument( 'server', InputArgument::OPTIONAL, - 'Base url of etcd server and the default is http://127.0.0.1:4001' + 'Base url of etcd server and the default is http://127.0.0.1:2379' )->addOption( 'ttl', null, diff --git a/src/Command/EtcdRmCommand.php b/src/Command/EtcdRmCommand.php index 7f81985..15661cb 100644 --- a/src/Command/EtcdRmCommand.php +++ b/src/Command/EtcdRmCommand.php @@ -25,7 +25,7 @@ protected function configure() ->addArgument( 'server', InputArgument::OPTIONAL, - 'Base url of etcd server and the default is http://127.0.0.1:4001' + 'Base url of etcd server and the default is http://127.0.0.1:2379' ); } diff --git a/src/Command/EtcdRmdirCommand.php b/src/Command/EtcdRmdirCommand.php index 457a59f..b8b6e8f 100644 --- a/src/Command/EtcdRmdirCommand.php +++ b/src/Command/EtcdRmdirCommand.php @@ -26,7 +26,7 @@ protected function configure() ->addArgument( 'server', InputArgument::OPTIONAL, - 'Base url of etcd server and the default is http://127.0.0.1:4001' + 'Base url of etcd server and the default is http://127.0.0.1:2379' ) ->addOption( 'recursive', diff --git a/src/Command/EtcdUpdateCommand.php b/src/Command/EtcdUpdateCommand.php index c97f34b..ef14074 100644 --- a/src/Command/EtcdUpdateCommand.php +++ b/src/Command/EtcdUpdateCommand.php @@ -30,7 +30,7 @@ protected function configure() )->addArgument( 'server', InputArgument::OPTIONAL, - 'Base url of etcd server and the default is http://127.0.0.1:4001' + 'Base url of etcd server and the default is http://127.0.0.1:2379' )->addOption( 'ttl', null, diff --git a/src/Command/EtcdUpdateDirCommand.php b/src/Command/EtcdUpdateDirCommand.php index a82f802..fcf9273 100644 --- a/src/Command/EtcdUpdateDirCommand.php +++ b/src/Command/EtcdUpdateDirCommand.php @@ -26,7 +26,7 @@ protected function configure() ->addArgument( 'server', InputArgument::OPTIONAL, - 'Base url of etcd server and the default is http://127.0.0.1:4001' + 'Base url of etcd server and the default is http://127.0.0.1:2379' )->addOption( 'ttl', null, diff --git a/src/Command/EtcdWatchCommand.php b/src/Command/EtcdWatchCommand.php index ad8e410..1272331 100644 --- a/src/Command/EtcdWatchCommand.php +++ b/src/Command/EtcdWatchCommand.php @@ -26,7 +26,7 @@ protected function configure() ->addArgument( 'server', InputArgument::OPTIONAL, - 'Base url of etcd server and the default is http://127.0.0.1:4001' + 'Base url of etcd server and the default is http://127.0.0.1:2379' )->addOption( 'recursive', null, From 646c1953a7bbe4f7fd372116aa7b9dadc907d919 Mon Sep 17 00:00:00 2001 From: Robert Lu Date: Mon, 24 Jul 2017 20:44:49 +0800 Subject: [PATCH 2/3] download etcd binary package --- bin/build_etcd | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/bin/build_etcd b/bin/build_etcd index 0e91e58..faabbb1 100755 --- a/bin/build_etcd +++ b/bin/build_etcd @@ -1,14 +1,11 @@ #!/bin/bash -wget -c https://storage.googleapis.com/golang/go1.4.linux-amd64.tar.gz -tar -zxf go1.4.linux-amd64.tar.gz -git clone https://github.com/coreos/etcd.git -export GOROOT=$PWD/go -#export GOPATH=$PWD/go -export PATH=$GOPATH/bin:$PATH -go get golang.org/x/tools/cmd/cove -go get golang.org/x/tools/cmd/vet -cd etcd && ./build +ETCD_VERSION=v3.2.4 + +wget -c https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz +tar -zxf etcd-${ETCD_VERSION}-linux-amd64.tar.gz + +cd etcd-${ETCD_VERSION}-linux-amd64 # Start etcd -./bin/etcd > /dev/null 2>&1 & +./etcd > /dev/null 2>&1 & From f27cac10c10a97c0fa592777d638b774092e54e0 Mon Sep 17 00:00:00 2001 From: Robert Lu Date: Mon, 24 Jul 2017 20:49:40 +0800 Subject: [PATCH 3/3] move to trusty, add php 5.6, 7.0, 7.1 --- .travis.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3df878f..d334be8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,14 @@ language: php +dist: trusty before_install: bash bin/build_etcd php: -- 5.4 -- 5.5 -- hhvm + - '5.4' + - '5.5' + - '5.6' + - '7.0' + - '7.1' + - hhvm + - nightly before_script: - composer install script: vendor/bin/phpunit \ No newline at end of file