From 06bc766b6e13ad0cd0fcdbb12579d37a95ae0172 Mon Sep 17 00:00:00 2001 From: qiuwenhuifx Date: Mon, 19 Aug 2019 10:43:58 +0800 Subject: [PATCH 1/5] Update install-consul.sh fix bug --- test/bin/install-consul.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/bin/install-consul.sh b/test/bin/install-consul.sh index caf3002..64d5478 100755 --- a/test/bin/install-consul.sh +++ b/test/bin/install-consul.sh @@ -28,6 +28,8 @@ PROG_NAME="$(basename $0)" # Note: Run this as root #--------------------------------------------------------------# function download_consul() { + #loss system command + yum install unzip gzip -y local target_location=${1-'/usr/local/bin/consul'} local cache_location=${2-'/opt/pkg/consul'} local consul_version=${3-'1.4.2'} @@ -235,4 +237,4 @@ function main(){ # 5 get local IP failed # 6 launch consul.service failed #==============================================================# -main $@ \ No newline at end of file +main $@ From 4f89ac21622b5632926c6758b37a6eac514c2bf4 Mon Sep 17 00:00:00 2001 From: qiuwenhuifx Date: Mon, 19 Aug 2019 10:47:35 +0800 Subject: [PATCH 2/5] Update install-consul.sh fix bug --- test/bin/install-consul.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/bin/install-consul.sh b/test/bin/install-consul.sh index 64d5478..7c740f5 100755 --- a/test/bin/install-consul.sh +++ b/test/bin/install-consul.sh @@ -29,7 +29,7 @@ PROG_NAME="$(basename $0)" #--------------------------------------------------------------# function download_consul() { #loss system command - yum install unzip gzip -y + yum install unzip gzip tar vim sysstat -y local target_location=${1-'/usr/local/bin/consul'} local cache_location=${2-'/opt/pkg/consul'} local consul_version=${3-'1.4.2'} From 1bf5b70697c4b6dd1f9fc01dd0d3daac22931764 Mon Sep 17 00:00:00 2001 From: qiuwenhuifx Date: Mon, 19 Aug 2019 10:52:44 +0800 Subject: [PATCH 3/5] Update install-utils.sh fix bug --- test/bin/install-utils.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/bin/install-utils.sh b/test/bin/install-utils.sh index a21f0e3..ade2805 100755 --- a/test/bin/install-utils.sh +++ b/test/bin/install-utils.sh @@ -99,12 +99,13 @@ function install_utils() { lsof \ wget \ unzip $@ >/dev/null 2>&1 - + if [[ $? != 0 ]]; then echo 'error: install utils failed' return 3 fi - + # retry install + yum install -y ntp uuid readline lz4 nc libxml2 libxslt lsof wget unzip sysstat vim systemctl enable ntpd > /dev/null 2>&1 systemctl start ntpd > /dev/null 2>&1 @@ -144,4 +145,4 @@ function main(){ return $? } -main $@ \ No newline at end of file +main $@ From 532333362e21908084144987fb9fb82b9ce70eb3 Mon Sep 17 00:00:00 2001 From: qiuwenhuifx Date: Mon, 19 Aug 2019 11:06:18 +0800 Subject: [PATCH 4/5] Update Vagrantfile fix monitor forwarded_port bug --- test/Vagrantfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/Vagrantfile b/test/Vagrantfile index ec72304..310e2ed 100644 --- a/test/Vagrantfile +++ b/test/Vagrantfile @@ -94,6 +94,8 @@ Vagrant.configure("2") do |config| monitor.vm.box = "centos/7" monitor.vm.hostname = 'monitor' monitor.vm.network "private_network", ip: "10.10.10.20" + monitor.vm.network "forwarded_port", guest: 3000, host: 3000 + monitor.vm.network "forwarded_port", guest: 9000, host: 9000 monitor.vm.box_check_update = false monitor.vm.provider "virtualbox" do |v| v.linked_clone = true @@ -122,4 +124,4 @@ Vagrant.configure("2") do |config| monitor.vm.provision "shell", inline: "sudo -iu postgres /opt/bin/init-primary.sh postgres:///meta" end -end \ No newline at end of file +end From cc5b4ef0b5b68696a6e5cc1ad2e0f56cc49edb72 Mon Sep 17 00:00:00 2001 From: qiuwenhuifx Date: Mon, 19 Aug 2019 11:08:50 +0800 Subject: [PATCH 5/5] Update install-consul.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 找到缺少包的脚本,不在这边,不过再次确认包安装也可以, --- test/bin/install-consul.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/bin/install-consul.sh b/test/bin/install-consul.sh index 7c740f5..a5a8921 100755 --- a/test/bin/install-consul.sh +++ b/test/bin/install-consul.sh @@ -28,8 +28,6 @@ PROG_NAME="$(basename $0)" # Note: Run this as root #--------------------------------------------------------------# function download_consul() { - #loss system command - yum install unzip gzip tar vim sysstat -y local target_location=${1-'/usr/local/bin/consul'} local cache_location=${2-'/opt/pkg/consul'} local consul_version=${3-'1.4.2'}