2015-07-07 03:00:48 +02:00
|
|
|
Vagrant.configure(2) do |config|
|
2015-07-10 15:20:28 +02:00
|
|
|
config.vm.define "u12" do |u12|
|
|
|
|
u12.vm.box = "ubuntu/precise64"
|
2015-07-07 03:00:48 +02:00
|
|
|
|
2015-07-10 15:20:28 +02:00
|
|
|
# Provision the VM
|
|
|
|
u12.vm.provision "shell", inline: <<-SHELL
|
|
|
|
# Install db
|
|
|
|
echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list
|
|
|
|
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
|
|
|
sudo apt-get update
|
|
|
|
apt-get install -y postgresql-9.4
|
|
|
|
pg_dropcluster --stop 9.4 main
|
2015-07-11 23:16:35 +02:00
|
|
|
apt-get install -y postgresql-9.3
|
|
|
|
pg_dropcluster --stop 9.3 main
|
|
|
|
apt-get install -y postgresql-9.2
|
|
|
|
pg_dropcluster --stop 9.2 main
|
|
|
|
apt-get install -y postgresql-9.1
|
|
|
|
pg_dropcluster --stop 9.1 main
|
|
|
|
apt-get install -y postgresql-9.0
|
|
|
|
pg_dropcluster --stop 9.0 main
|
|
|
|
apt-get install -y postgresql-8.4
|
|
|
|
pg_dropcluster --stop 8.4 main
|
2015-07-07 03:00:48 +02:00
|
|
|
|
2015-07-10 15:20:28 +02:00
|
|
|
# Setup SSH
|
|
|
|
adduser --ingroup=vagrant --disabled-password --gecos "" backrest
|
|
|
|
/backrest/test/vm/ssh/setup.sh
|
2015-07-07 03:00:48 +02:00
|
|
|
|
2015-07-10 15:20:28 +02:00
|
|
|
# Install packages required for testing
|
|
|
|
apt-get install -y libdbd-pg-perl
|
2015-07-07 03:00:48 +02:00
|
|
|
|
2015-07-10 15:20:28 +02:00
|
|
|
# Run the actual test
|
2015-07-11 23:16:35 +02:00
|
|
|
# /backrest/test/test.pl --db-version=all --thread-max=4
|
2015-07-10 15:20:28 +02:00
|
|
|
SHELL
|
|
|
|
end
|
2015-07-07 03:00:48 +02:00
|
|
|
|
2015-07-10 15:20:28 +02:00
|
|
|
config.vm.define "co6" do |co6|
|
|
|
|
co6.vm.box = "chef/centos-6.6"
|
2015-07-07 03:00:48 +02:00
|
|
|
|
2015-07-10 15:20:28 +02:00
|
|
|
# Provision the VM
|
|
|
|
co6.vm.provision "shell", inline: <<-SHELL
|
|
|
|
# Install db
|
2015-07-12 04:47:22 +02:00
|
|
|
sudo rpm -ivh http://yum.postgresql.org/9.0/redhat/rhel-6-x86_64/pgdg-centos90-9.0-5.noarch.rpm
|
|
|
|
sudo rpm -ivh http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/pgdg-centos91-9.1-4.noarch.rpm
|
|
|
|
sudo rpm -ivh http://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-6.noarch.rpm
|
|
|
|
sudo rpm -ivh http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
|
2015-07-10 15:20:28 +02:00
|
|
|
sudo rpm -ivh http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-1.noarch.rpm
|
2015-07-12 04:47:22 +02:00
|
|
|
yum -y install postgresql90-server
|
|
|
|
yum -y install postgresql91-server
|
|
|
|
yum -y install postgresql92-server
|
|
|
|
yum -y install postgresql93-server
|
2015-07-10 15:20:28 +02:00
|
|
|
yum -y install postgresql94-server
|
2015-07-07 03:00:48 +02:00
|
|
|
|
2015-07-10 15:20:28 +02:00
|
|
|
# Install Perl
|
|
|
|
yum -y install perl
|
|
|
|
yum -y install perl-Time-HiRes
|
|
|
|
yum -y install perl-Compress-Raw-Zlib
|
|
|
|
yum -y install perl-IO-String
|
|
|
|
yum -y install perl-parent
|
|
|
|
yum -y install perl-JSON
|
|
|
|
yum -y install perl-Digest-SHA
|
2015-07-07 03:00:48 +02:00
|
|
|
|
2015-07-10 15:20:28 +02:00
|
|
|
# Setup SSH
|
|
|
|
adduser -gvagrant -n backrest
|
|
|
|
/backrest/test/vm/ssh/setup.sh
|
2015-07-07 03:00:48 +02:00
|
|
|
|
2015-07-10 15:20:28 +02:00
|
|
|
# Install packages required for testing
|
|
|
|
yum -y install perl-DBD-Pg
|
|
|
|
SHELL
|
|
|
|
end
|
2015-07-07 03:00:48 +02:00
|
|
|
|
|
|
|
# Don't share the default vagrant folder
|
|
|
|
config.vm.synced_folder ".", "/vagrant", disabled: true
|
|
|
|
|
|
|
|
# Mount backrest path for testing
|
2015-07-13 19:25:04 +02:00
|
|
|
config.vm.synced_folder "../..", "/backrest"
|
2015-07-07 03:00:48 +02:00
|
|
|
end
|