You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-11-06 08:49:29 +02:00
Added ssh control master config to speed regression testing.
Added vagrant config for Centos 7.
This commit is contained in:
27
test/vm/Vagrantfile
vendored
27
test/vm/Vagrantfile
vendored
@@ -33,6 +33,7 @@ Vagrant.configure(2) do |config|
|
||||
# Setup SSH
|
||||
adduser --ingroup=vagrant --disabled-password --gecos "" backrest
|
||||
/backrest/test/vm/ssh/setup.sh
|
||||
/backrest/test/vm/ssh/setup-cm.sh
|
||||
|
||||
# Install required Perl modules
|
||||
apt-get install -y libdbd-pg-perl
|
||||
@@ -71,6 +72,7 @@ Vagrant.configure(2) do |config|
|
||||
# Setup SSH
|
||||
adduser --ingroup=vagrant --disabled-password --gecos "" backrest
|
||||
/backrest/test/vm/ssh/setup.sh
|
||||
/backrest/test/vm/ssh/setup-cm.sh
|
||||
|
||||
# Install required Perl modules
|
||||
apt-get install -y libdbd-pg-perl
|
||||
@@ -110,6 +112,31 @@ Vagrant.configure(2) do |config|
|
||||
SHELL
|
||||
end
|
||||
|
||||
config.vm.define "co7" do |co7|
|
||||
co7.vm.box = "chef/centos-7.1"
|
||||
|
||||
co7.vm.provider :virtualbox do |vb|
|
||||
vb.name = "backrest-test-centos-7.1"
|
||||
end
|
||||
|
||||
# Provision the VM
|
||||
co7.vm.provision "shell", inline: <<-SHELL
|
||||
# Install db
|
||||
sudo rpm -ivh http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-1.noarch.rpm
|
||||
sudo rpm -ivh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-1.noarch.rpm
|
||||
yum -y install postgresql93-server
|
||||
yum -y install postgresql94-server
|
||||
|
||||
# Install Perl and required modules
|
||||
yum -y install perl perl-IO-String perl-Thread-Queue perl-JSON-PP perl-Digest-SHA perl-DBD-Pg
|
||||
|
||||
# Setup SSH
|
||||
adduser -gvagrant -n backrest
|
||||
/backrest/test/vm/ssh/setup.sh
|
||||
/backrest/test/vm/ssh/setup-cm.sh
|
||||
SHELL
|
||||
end
|
||||
|
||||
# Don't share the default vagrant folder
|
||||
config.vm.synced_folder ".", "/vagrant", disabled: true
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Host *
|
||||
StrictHostKeyChecking no
|
||||
StrictHostKeyChecking no
|
||||
|
||||
5
test/vm/ssh/config-cm
Normal file
5
test/vm/ssh/config-cm
Normal file
@@ -0,0 +1,5 @@
|
||||
Host 127.0.0.1
|
||||
StrictHostKeyChecking no
|
||||
ControlMaster auto
|
||||
ControlPath /tmp/%r@%h:%p
|
||||
ControlPersist 30
|
||||
5
test/vm/ssh/setup-cm.sh
Executable file
5
test/vm/ssh/setup-cm.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Copy ControlMaster ssh configs when the OS supports it
|
||||
|
||||
cp -f /backrest/test/vm/ssh/config-cm /home/vagrant/.ssh/config
|
||||
cp -f /backrest/test/vm/ssh/config-cm /home/backrest/.ssh/config
|
||||
Reference in New Issue
Block a user