summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2019-07-08 16:18:14 +0200
committerGitHub <noreply@github.com>2019-07-08 16:18:14 +0200
commit50c7f85062c24158e84c255ee38097c8ec7c7d01 (patch)
treec9cac1ba4bd0bcc231747e9bb654f5a257803460
parent94a3be26bb620b270fe75f4b52e67e5bbbb7332e (diff)
parentfbe9bfdecb7c8a74e265ba93c18b181900be7c60 (diff)
Merge pull request #9988 from vespa-engine/bjorncs/tls-vespa-deploy
Use vespa-curl-wrapper in vespa-deploy
-rwxr-xr-xconfig-model/src/main/perl/vespa-deploy31
1 files changed, 4 insertions, 27 deletions
diff --git a/config-model/src/main/perl/vespa-deploy b/config-model/src/main/perl/vespa-deploy
index ffde937bea0..fede8b994c1 100755
--- a/config-model/src/main/perl/vespa-deploy
+++ b/config-model/src/main/perl/vespa-deploy
@@ -87,7 +87,7 @@ readConfFile();
use strict;
use warnings;
use feature qw(switch say);
-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_z $opt_H $opt_R $opt_F $opt_V /;
+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 $opt_F $opt_V /;
use Env qw($HOME);
use JSON;
use Getopt::Std;
@@ -101,9 +101,6 @@ my $configsource_url_used_file = "$cloudconfig_dir/deploy-configsource-url-used"
my $pathPrefix;
-my $siaPath;
-my $siaCertsPath;
-my $siaKeysPath;
my $tenant = "default";
my $application = "default";
my $environment = "prod";
@@ -112,8 +109,7 @@ my $instance = "default";
my $version = "v2";
my $configserver = "";
my $port = "19071";
-my $cert = "";
-getopts('c:fhnt:ve:E:r:a:i:p:z:HR:F:V:');
+getopts('c:fhnt:ve:E:r:a:i:p:HR:F:V:');
if ($opt_h) {
usage();
@@ -148,18 +144,8 @@ if ($opt_p) {
$port = $opt_p;
}
-if ($opt_z) {
- $cert = $opt_z;
-}
-
$pathPrefix = "/application/v2/tenant/$tenant/session";
-$siaPath = "/var/lib/sia/";
-
-$siaCertsPath = $siaPath . "certs/";
-
-$siaKeysPath = $siaPath . "keys/";
-
create_cloudconfig_dir();
$session_id_file = "$cloudconfig_dir/$tenant/deploy-session-id";
@@ -167,10 +153,7 @@ $session_id_file = "$cloudconfig_dir/$tenant/deploy-session-id";
my $command = shift;
$command ||= "help";
-my $curl_command = 'curl -A vespa-deploy --silent --show-error --connect-timeout 30 --max-time 1200';
-if ($cert) {
- $curl_command = $curl_command . " -k --cert " . $siaCertsPath . $cert . ".cert.pem --key " . $siaKeysPath . $cert . ".key.pem ";
-}
+my $curl_command = $VESPA_HOME . '/libexec/vespa/vespa-curl-wrapper -A vespa-deploy --silent --show-error --connect-timeout 30 --max-time 1200';
my $CURL_PUT = $curl_command . ' --write-out \%{http_code} --request PUT';
my $CURL_GET = $curl_command . ' --request GET';
@@ -264,8 +247,6 @@ sub usage {
print " '-t <timeout>' (timeout in seconds)\n";
print " '-c <server>' (config server hostname)\n";
print " '-p <port>' (config server http port)\n";
- print " '-z <cert>' (cert/key name)\n\n";
-
print "Try 'vespa-deploy help <command>' to get more help\n";
}
@@ -347,11 +328,7 @@ sub get_configsource_url {
my @configsources;
if ($configserver and $configserver ne "") {
- if ($cert and $cert ne "") {
- @configsources = ('https://' . $configserver . ':' . $port . '/');
- } else {
- @configsources = ('http://' . $configserver . ':' . $port . '/');
- }
+ @configsources = ('http://' . $configserver . ':' . $port . '/');
} else {
@configsources = split(' ', `$VESPA_HOME/bin/vespa-print-default configservers_http`);
}