From fbd1da05230bb4790f143443dd515453fada0bba Mon Sep 17 00:00:00 2001 From: David Steele Date: Wed, 13 Jun 2018 13:43:17 -0400 Subject: [PATCH] Create a new section to describe building pgBackRest and build on a separate host. --- doc/xml/release.xml | 6 ++ doc/xml/user-guide.xml | 169 +++++++++++++++++++++-------------------- 2 files changed, 93 insertions(+), 82 deletions(-) diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 6855f4ec6..5aa0d3a8d 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -44,6 +44,12 @@ + + +

Create a new section to describe building and build on a separate host.

+
+
+

Build containers from scratch for more accurate testing. Use a prebuilt s3 server container.

diff --git a/doc/xml/user-guide.xml b/doc/xml/user-guide.xml index e76ae0ea6..3162dec1e 100644 --- a/doc/xml/user-guide.xml +++ b/doc/xml/user-guide.xml @@ -105,7 +105,7 @@ {[host-image]} {[host-mount]} - pg1 + build build root {[host-image]} @@ -266,7 +266,7 @@ - apt-get install sudo ssh + apt-get install sudo ssh wget -y 2>&1 @@ -294,7 +294,7 @@ - yum install openssh-server openssh-clients sudo + yum install openssh-server openssh-clients sudo wget -y 2>&1 @@ -319,16 +319,6 @@ Install <postgres/> - - apt-get install wget - -y 2>&1 - - - - yum install wget - -y 2>&1 - - echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' | @@ -381,57 +371,18 @@ -

{[user-guide-os]} packages for are available at apt.postgresql.org. If they are not provided for your distribution/version it is easy to download the source and install manually.

- -

{[user-guide-os]} packages for are available from Crunchy Data or yum.postgresql.org, but it is also easy to download the source and install manually.

+

needs to be installed from a package or installed manually as shown here.

- Download version <id>{[version]}</id> of <backrest/> + Copy <backrest/> binary from build host - - - wget -q -O - - {[github-url-release]}/{[version]}.tar.gz | - sudo tar zx -C /root - - - - - mkdir /root/pgbackrest-release-{[version]} - - - cp -r /backrest/libc /root/pgbackrest-release-{[version]} - - - cp -r /backrest/src /root/pgbackrest-release-{[version]} - - - - -

The executable is written in C. This allows certain time-critical commands (like async archive-push/archive-get) to run more quickly.

- - - Install build dependencies - - - apt-get install build-essential libssl-dev libperl-dev - -y 2>&1 - - - - yum install build-essential gcc openssl-devel perl-ExtUtils-Embed - -y 2>&1 - - - - - Build and install binary - - - make -C /root/pgbackrest-release-{[version]}/src - - make -C /root/pgbackrest-release-{[version]}/src install + scp {[host-build]}:/root/pgbackrest-release-{[version]}/src/pgbackrest /usr/bin + 2>&1 + + + + chmod 755 /usr/bin/pgbackrest @@ -586,9 +537,9 @@ - -
- Installation + +
+ Build @@ -598,6 +549,79 @@ +

{[user-guide-os]} packages for are available at apt.postgresql.org. If they are not provided for your distribution/version it is easy to download the source and install manually.

+ +

{[user-guide-os]} packages for are available from Crunchy Data or yum.postgresql.org, but it is also easy to download the source and install manually.

+ + + + + {[host-build]} + + +

When building from source it is best to use a build host rather than building on production. Many of the tools required for the build should generally not be installed in production. consists of a single executable so it is easy to copy to a new host once it is built.

+ + + Download version <id>{[version]}</id> of <backrest/> + + + + wget -q -O - + {[github-url-release]}/{[version]}.tar.gz | + sudo tar zx -C /root + + + + + mkdir /root/pgbackrest-release-{[version]} + + + cp -r /backrest/libc /root/pgbackrest-release-{[version]} + + + cp -r /backrest/src /root/pgbackrest-release-{[version]} + + + + + Install build dependencies + + + apt-get install build-essential libssl-dev libperl-dev + -y 2>&1 + + + + yum install build-essential gcc openssl-devel perl-ExtUtils-Embed + -y 2>&1 + + + +

supports 32-bit distributions that build Perl with 64-bit integer support.

+ + + Check for 64-bit integers + + + perl -V | grep USE_64_BIT_INT + + + +

The executable is written in C. This allows certain time-critical commands (like async archive-push/archive-get) to run more quickly.

+ + + Build <backrest/> executable + + + make -C /root/pgbackrest-release-{[version]}/src + + +
+ + +
+ Installation +

A new host named pg1 is created to contain the demo cluster and run examples.

@@ -606,25 +630,6 @@ {[host-pg1]} -

supports 32-bit distributions that build Perl with 64-bit integer support.

- - - Install Perl - - - yum install perl - -y 2>&1 - - - - - Check for 64-bit integers - - - perl -V | grep USE_64_BIT_INT - - - {[host-pg1]}