diff options
author | hakonhall <hakon@yahoo-inc.com> | 2017-06-07 10:31:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-07 10:31:30 +0200 |
commit | 86e1f3e7b711c2d7787ed8a546f9c809c4ccc787 (patch) | |
tree | 0e1efa63a8b5a96304793b6ed7393f9e4bf9f9d8 | |
parent | fe435fbe60780dbd50fc5225d9a463c72c8bbb17 (diff) | |
parent | 8472caf97dd558d6f0ac3d4310e1eb6ca4264495 (diff) |
Merge pull request #2638 from yahoo/hakon/support-deploying-to-specific-config-server
Support deploying to specific config server
-rwxr-xr-x | config-model/src/main/perl/deploy | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/config-model/src/main/perl/deploy b/config-model/src/main/perl/deploy index 6c165951ab0..8ddc948c3f2 100755 --- a/config-model/src/main/perl/deploy +++ b/config-model/src/main/perl/deploy @@ -72,7 +72,7 @@ readConfFile(); use strict; use warnings; use feature qw(switch say); -use vars qw/ $opt_h $opt_n $opt_v $opt_f $opt_t $opt_1 $opt_a $opt_e $opt_E $opt_r $opt_i $opt_p $opt_H $opt_R /; +use vars qw/ $opt_c $opt_h $opt_n $opt_v $opt_f $opt_t $opt_1 $opt_a $opt_e $opt_E $opt_r $opt_i $opt_p $opt_H $opt_R /; use Env qw($HOME); use JSON; use Getopt::Std; @@ -99,15 +99,20 @@ my $environment = "prod"; my $region = "default"; my $instance = "default"; my $version = "v2"; +my $configserver = ""; my $port = "19071"; -getopts('fhnt:v1e:E:r:a:i:p:HR:'); +getopts('c:fhnt:v1e:E:r:a:i:p:HR:'); if ($opt_h) { usage(); exit 0; } +if ($opt_c) { + $configserver = $opt_c; +} + if ($opt_e) { $tenant = $opt_e; } @@ -303,7 +308,13 @@ sub fetch_directory { sub get_configsource_url { my ($command) = @_; - my @configsources = split(' ', `$VESPA_HOME/bin/vespa-print-default configservers_http`); + my @configsources; + if ($configserver and $configserver ne "") { + @configsources = ('http://' . $configserver . ':' . $port . '/'); + } else { + @configsources = split(' ', `$VESPA_HOME/bin/vespa-print-default configservers_http`); + } + my $configsource_url = shift(@configsources); if (!$configsource_url) { die "Could not get url to config server, make sure that VESPA_HOME and services.addr_configserver is set\n"; |