pgbackrest.git / summary / log / commit / refs
commit 711b3e67cbfc7b404ffe2ce196ffb42159c95040
Author: David Steele <david@pgmasters.net>
Date: Wed Jan 30 14:53:59 2019 +0000
Add examples for building a documentation host.
doc/README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++
doc/xml/documentation.xml | 47 +++++++++++++++++++++++++++++++++++++++++++++++
doc/xml/release.xml | 4 ++++
3 files changed, 95 insertions(+)
diff --git a/doc/README.md b/doc/README.md
index 1b00fc0ee..740edf29f 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -20,6 +20,27 @@ Each `os-type` has a default container image that will be used as a base for cre
```bash
./doc.pl --out=html --include=user-guide --var=os-type=debian --var=os-image=debian:9
```
+The following is a sample CentOS/RHEL 7 configuration that can be used for building the documentation.
+```bash
+# Install docker
+sudo yum install -y yum-utils device-mapper-persistent-data lvm2
+sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
+sudo yum install -y docker-ce
+sudo systemctl start docker
+
+# Install tools
+sudo yum install -y git wget
+
+# Install Perl modules that do not have CentOS packages via CPAN
+sudo yum install -y yum cpanminus
+sudo yum groupinstall -y "Development Tools" "Development Libraries"
+sudo cpanm install --force XML::Checker::Parser
+
+# Add documentation test user
+sudo groupadd test
+sudo adduser -gtest -n testdoc
+sudo usermod -aG docker testdoc
+```
## Building with Packages
@@ -39,3 +60,26 @@ CentOS/RHEL 7:
```bash
./doc.pl --out=html --include=user-guide --no-cache --var=os-type=centos7 --var=package=test/package/pgbackrest-2.08-1.el7.x86_64.rpm
```
+Packages can be built with `test.pl` using the following configuration on top of the configuration given for building the documentation.
+```bash
+# Install recent git
+sudo yum remove -y git
+sudo yum install -y https://centos7.iuscommunity.org/ius-release.rpm
+sudo yum install -y git2u-all
+
+# Install Perl modules
+sudo yum install -y perl-ExtUtils-ParseXS perl-ExtUtils-Embed perl-ExtUtils-MakeMaker perl-YAML-LibYAML
+
+# Install dev libraries
+sudo yum install -y libxml2-devel
+
+# Add test user with sudo privileges
+sudo adduser -gtest -n test
+sudo usermod -aG docker test
+sudo chmod 750 /home/test
+
+sudo echo 'test ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/pgbackrest
+
+# Add pgbackrest user required by tests
+sudo adduser -gtest -n pgbackrest
+```
diff --git a/doc/xml/documentation.xml b/doc/xml/documentation.xml
index 44ddd1e7a..2c1081f66 100644
--- a/doc/xml/documentation.xml
+++ b/doc/xml/documentation.xml
@@ -31,6 +31,29 @@
<code-block type="bash">
./doc.pl --out=html --include=user-guide --var=os-type=debian --var=os-image=debian:9
</code-block>
+
+ <p>The following is a sample CentOS/RHEL 7 configuration that can be used for building the documentation.</p>
+
+ <code-block type="bash">
+# Install docker
+sudo yum install -y yum-utils device-mapper-persistent-data lvm2
+sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
+sudo yum install -y docker-ce
+sudo systemctl start docker
+
+# Install tools
+sudo yum install -y git wget
+
+# Install Perl modules that do not have CentOS packages via CPAN
+sudo yum install -y yum cpanminus
+sudo yum groupinstall -y "Development Tools" "Development Libraries"
+sudo cpanm install --force XML::Checker::Parser
+
+# Add documentation test user
+sudo groupadd test
+sudo adduser -gtest -n testdoc
+sudo usermod -aG docker testdoc
+ </code-block>
</section>
<section id="package">
@@ -58,5 +81,29 @@
./doc.pl --out=html --include=user-guide --no-cache --var=os-type=centos7 --var=package=test/package/pgbackrest-2.08-1.el7.x86_64.rpm
</code-block>
+ <p>Packages can be built with <file>test.pl</file> using the following configuration on top of the configuration given for building the documentation.</p>
+
+ <code-block type="bash">
+# Install recent git
+sudo yum remove -y git
+sudo yum install -y https://centos7.iuscommunity.org/ius-release.rpm
+sudo yum install -y git2u-all
+
+# Install Perl modules
+sudo yum install -y perl-ExtUtils-ParseXS perl-ExtUtils-Embed perl-ExtUtils-MakeMaker perl-YAML-LibYAML
+
+# Install dev libraries
+sudo yum install -y libxml2-devel
+
+# Add test user with sudo privileges
+sudo adduser -gtest -n test
+sudo usermod -aG docker test
+sudo chmod 750 /home/test
+
+sudo echo 'test ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/pgbackrest
+
+# Add pgbackrest user required by tests
+sudo adduser -gtest -n pgbackrest
+ </code-block>
</section>
</doc>
diff --git a/doc/xml/release.xml b/doc/xml/release.xml
index bd24567b0..7d511a567 100644
--- a/doc/xml/release.xml
+++ b/doc/xml/release.xml
@@ -167,6 +167,10 @@
<p>Clarify that encryption is always performed client-side.</p>
</release-item>
+ <release-item>
+ <p>Add examples for building a documentation host.</p>
+ </release-item>
+
<release-item>
<p>Allow <code>if</code> in manifest variables, lists, and list items.</p>
</release-item>
[parent: dada50ee26e3]