You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-05-22 10:15:16 +02:00
VM build improvements.
* Properly set user env before calling test.pl --vm-build. * Remove squid proxy made obsolete by more efficient builds.
This commit is contained in:
Vendored
+1
-16
@@ -29,21 +29,6 @@ Vagrant.configure(2) do |config|
|
||||
# Install additional modules
|
||||
apt-get install -y vim htop
|
||||
|
||||
# Install squid proxy (to speed container builds)
|
||||
apt-get install -y squid3
|
||||
mkdir -m 700 /var/lib/squid
|
||||
chown proxy /var/lib/squid
|
||||
cp /etc/squid/squid.conf /etc/squid/squid.conf.old
|
||||
echo 'http_port 172.17.0.1:3128' > /etc/squid/squid.conf
|
||||
echo 'maximum_object_size 100 MB' >> /etc/squid/squid.conf
|
||||
echo 'cache_replacement_policy heap LFUDA' >> /etc/squid/squid.conf
|
||||
echo 'refresh_pattern . 0 20% 4320' >> /etc/squid/squid.conf
|
||||
echo 'acl docker_network src 172.17.0.0/16' >> /etc/squid/squid.conf
|
||||
echo 'http_access allow docker_network' >> /etc/squid/squid.conf
|
||||
echo 'cache_dir ufs /var/lib/squid 4096 16 256' >> /etc/squid/squid.conf
|
||||
echo 'cache_mem 16 MB' >> /etc/squid/squid.conf
|
||||
service squid restart
|
||||
|
||||
# Install Texlive
|
||||
mkdir /root/texlive
|
||||
wget -q -O - http://mirror.hmc.edu/ctan/systems/texlive/tlnet/install-tl-unx.tar.gz \
|
||||
@@ -69,7 +54,7 @@ Vagrant.configure(2) do |config|
|
||||
usermod -a -G vagrant vagrant
|
||||
|
||||
# Build VM images
|
||||
sudo -u vagrant /backrest/test/test.pl --vm-build --vm-force
|
||||
sudo su - vagrant -c '/backrest/test/test.pl --vm-build --vm-force'
|
||||
SHELL
|
||||
|
||||
# Don't share the default vagrant folder
|
||||
|
||||
@@ -324,23 +324,8 @@ sub containerBuild
|
||||
my $strImageParent = "$$oVm{$strOS}{&VM_IMAGE}";
|
||||
my $strImage = "${strOS}-base";
|
||||
|
||||
# Install package proxy
|
||||
my $strScript =
|
||||
"# Use squid proxy\n";
|
||||
|
||||
if ($$oVm{$strOS}{&VM_OS_BASE} eq VM_OS_BASE_RHEL)
|
||||
{
|
||||
$strScript .=
|
||||
"RUN echo 'proxy=http://172.17.0.1:3128' >> /etc/yum.conf";
|
||||
}
|
||||
elsif ($$oVm{$strOS}{&VM_OS_BASE} eq VM_OS_BASE_DEBIAN)
|
||||
{
|
||||
$strScript .=
|
||||
"RUN echo 'Acquire {Retries \"0\"; HTTP {Proxy \"http://172.17.0.1:3128\";};};' > /etc/apt/apt.conf.d/vmproxy";
|
||||
}
|
||||
|
||||
# Install base packages
|
||||
$strScript .= "\n\n# Install base packages\n";
|
||||
my $strScript = "# Install base packages\n";
|
||||
|
||||
if ($$oVm{$strOS}{&VM_OS_BASE} eq VM_OS_BASE_RHEL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user