summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/perl
diff options
context:
space:
mode:
authorHarald Musum <musum@yahoo-inc.com>2017-06-07 10:38:51 +0200
committerHarald Musum <musum@yahoo-inc.com>2017-06-07 10:38:51 +0200
commit125a73cd75b8db5caf0a67f7019faf57411e3a45 (patch)
treec8033a7954d57393580afe3640acf39af1193f3c /config-model/src/main/perl
parentf7ca4ca6e113aba0f7648d6ddcac18ee7757fb79 (diff)
parent86e1f3e7b711c2d7787ed8a546f9c809c4ccc787 (diff)
Merge branch 'master' into hmusum/remove-support-for-removed-api
Diffstat (limited to 'config-model/src/main/perl')
-rwxr-xr-xconfig-model/src/main/perl/deploy17
1 files changed, 14 insertions, 3 deletions
diff --git a/config-model/src/main/perl/deploy b/config-model/src/main/perl/deploy
index 1a594065a33..dc7b2132792 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_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_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:ve:E:r:a:i:p:HR:');
+getopts('c:fhnt:ve:E:r:a:i:p:HR:');
if ($opt_h) {
usage();
exit 0;
}
+if ($opt_c) {
+ $configserver = $opt_c;
+}
+
if ($opt_e) {
$tenant = $opt_e;
}
@@ -297,7 +302,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";