1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-05-22 10:15:16 +02:00

Use minio as local S3 emulator in documentation.

The documentation was relying on a ScalityS3 container built for testing which wasn't very transparent.  Instead, use the stock minio container and configure it in the documentation.

Also, install certificates and CA so that TLS verification can be enabled.
This commit is contained in:
David Steele
2019-05-27 07:37:20 -04:00
parent a474ba54c5
commit 3e1b06acaa
13 changed files with 188 additions and 53 deletions
@@ -59,19 +59,17 @@ sub hostAdd
$strOperation,
$oHost,
$rstryHostName,
$bUpdateHosts,
) =
logDebugParam
(
__PACKAGE__ . '->hostAdd', \@_,
{name => 'oHost'},
{name => 'rstryHostName', optional => true},
{name => 'bUpdateHosts', default => true, optional => true},
);
$self->{host}{$oHost->{strName}} = $oHost;
if ($bUpdateHosts)
if ($oHost->hostUpdateGet())
{
$oHost->executeSimple("echo \"\" >> /etc/hosts", undef, 'root', {bLoadEnv => false});
$oHost->executeSimple("echo \"# Test Hosts\" >> /etc/hosts", undef, 'root', {bLoadEnv => false});
@@ -87,10 +85,14 @@ sub hostAdd
if ($strOtherHostName ne $oHost->{strName})
{
# Add this host IP to all hosts
$oOtherHost->executeSimple("echo \"$oHost->{strIP} ${strHostList}\" >> /etc/hosts", undef, 'root', {bLoadEnv => false});
if ($oOtherHost->hostUpdateGet())
{
$oOtherHost->executeSimple(
"echo \"$oHost->{strIP} ${strHostList}\" >> /etc/hosts", undef, 'root', {bLoadEnv => false});
}
# Add all other host IPs to this host
if ($bUpdateHosts)
if ($oHost->hostUpdateGet())
{
$oHost->executeSimple(
"echo \"$oOtherHost->{strIP} ${strOtherHostName}\" >> /etc/hosts", undef, 'root', {bLoadEnv => false});
@@ -41,6 +41,7 @@ sub new
$self->{stryMount},
$self->{strOption},
$self->{strParam},
$self->{bHostUpdate},
) =
logDebugParam
(
@@ -53,6 +54,7 @@ sub new
{name => 'stryMount', required => false, trace => true},
{name => 'strOption', required => false, trace => true},
{name => 'strParam', required => false, trace => true},
{name => 'bHostUpdate', required => false, trace => true, default => true},
);
executeTest("docker rm -f $self->{strContainer}", {bSuppressError => true});
@@ -250,6 +252,16 @@ sub copyFrom
return logDebugReturn($strOperation);
}
####################################################################################################################################
# hostUpdateGet
####################################################################################################################################
sub hostUpdateGet
{
my $self = shift;
return $self->{bHostUpdate};
}
####################################################################################################################################
# ipGet
####################################################################################################################################