mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-30 05:39:12 +02:00
Vagrant build improvements:
* Miminize TeXLive package list to save time during VM builds. * General cleanup and added timestamps. * Pin to specific box version.
This commit is contained in:
parent
07898d33e3
commit
6f34fbc695
@ -184,6 +184,10 @@
|
|||||||
<release-item>
|
<release-item>
|
||||||
<p>Regression tests can now be run as any properly-configured user, not just vagrant.</p>
|
<p>Regression tests can now be run as any properly-configured user, not just vagrant.</p>
|
||||||
</release-item>
|
</release-item>
|
||||||
|
|
||||||
|
<release-item>
|
||||||
|
<p>Miminize TeXLive package list to save time during VM builds.</p>
|
||||||
|
</release-item>
|
||||||
</release-refactor-list>
|
</release-refactor-list>
|
||||||
</release-test-list>
|
</release-test-list>
|
||||||
</release>
|
</release>
|
||||||
|
27
test/Vagrantfile
vendored
27
test/Vagrantfile
vendored
@ -5,18 +5,25 @@ Vagrant.configure(2) do |config|
|
|||||||
end
|
end
|
||||||
|
|
||||||
config.vm.box = "bento/ubuntu-16.04"
|
config.vm.box = "bento/ubuntu-16.04"
|
||||||
|
config.vm.box_version = "2.2.9";
|
||||||
|
|
||||||
config.vm.provider :virtualbox do |vb|
|
config.vm.provider :virtualbox do |vb|
|
||||||
vb.name = "backrest-test"
|
vb.name = "pgbackrest-test"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Provision the VM
|
# Provision the VM
|
||||||
config.vm.provision "shell", inline: <<-SHELL
|
config.vm.provision "shell", inline: <<-SHELL
|
||||||
|
echo 'Build Begin' && date
|
||||||
|
|
||||||
# Suppress "dpkg-reconfigure: unable to re-open stdin: No file or directory" warning
|
# Suppress "dpkg-reconfigure: unable to re-open stdin: No file or directory" warning
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
# Install Docker
|
# Update Apt
|
||||||
|
echo 'Update Apt' && date
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|
||||||
|
# Install Docker
|
||||||
|
echo 'Install Docker' && date
|
||||||
apt-get install -y apt-transport-https ca-certificates
|
apt-get install -y apt-transport-https ca-certificates
|
||||||
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
|
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
|
||||||
echo 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' > /etc/apt/sources.list.d/docker.list
|
echo 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' > /etc/apt/sources.list.d/docker.list
|
||||||
@ -27,26 +34,34 @@ Vagrant.configure(2) do |config|
|
|||||||
sudo usermod -aG docker vagrant
|
sudo usermod -aG docker vagrant
|
||||||
|
|
||||||
# Install Perl modules
|
# Install Perl modules
|
||||||
|
echo 'Install Perl Modules' && date
|
||||||
apt-get install -y libdbd-pg-perl libxml-checker-perl libperl-critic-perl
|
apt-get install -y libdbd-pg-perl libxml-checker-perl libperl-critic-perl
|
||||||
|
|
||||||
# Install additional modules
|
# Install utilities
|
||||||
|
echo 'Install Utilities' && date
|
||||||
apt-get install -y vim htop
|
apt-get install -y vim htop
|
||||||
|
|
||||||
# Install Texlive
|
# Install TeX Live
|
||||||
apt-get install -y texlive
|
echo 'Install TeX Live' && date
|
||||||
apt-get install -y --no-install-recommends texlive-latex-extra
|
apt-get install -y --no-install-recommends texlive-latex-base texlive-latex-extra texlive-fonts-recommended
|
||||||
|
apt-get install -y texlive-font-utils
|
||||||
|
|
||||||
# Create backrest user and postgres group
|
# Create backrest user and postgres group
|
||||||
|
echo 'Create Postgres Group & pgBackRest User' && date
|
||||||
groupadd -g5000 postgres
|
groupadd -g5000 postgres
|
||||||
adduser --uid=5001 --ingroup=postgres --disabled-password --gecos "" backrest
|
adduser --uid=5001 --ingroup=postgres --disabled-password --gecos "" backrest
|
||||||
|
|
||||||
# Make postgres the primary group for vagrant user (and preserve vagrant group)
|
# Make postgres the primary group for vagrant user (and preserve vagrant group)
|
||||||
|
echo 'Add Vagrant User to Postgres Group' && date
|
||||||
usermod -g postgres vagrant
|
usermod -g postgres vagrant
|
||||||
usermod -a -G vagrant vagrant
|
usermod -a -G vagrant vagrant
|
||||||
|
|
||||||
# Build VM images
|
# Build VM images
|
||||||
|
echo 'Build VM Images' && date
|
||||||
rm -f /backrest/test/.vagrant/docker/*
|
rm -f /backrest/test/.vagrant/docker/*
|
||||||
sudo su - vagrant -c '/backrest/test/test.pl --vm-build'
|
sudo su - vagrant -c '/backrest/test/test.pl --vm-build'
|
||||||
|
|
||||||
|
echo 'Build End' && date
|
||||||
SHELL
|
SHELL
|
||||||
|
|
||||||
# Don't share the default vagrant folder
|
# Don't share the default vagrant folder
|
||||||
|
Loading…
x
Reference in New Issue
Block a user