You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-06-03 19:24:32 +02:00
Add RHEL/CentOS 8 documentation.
Update RHEL/CentOS 7 to cover the versions that were previously covered by RHEL/CentOS 6. Since RHEL/CentOS 7/8 work the same update the documentation logic and labels to reflect this compatibility.
This commit is contained in:
+7
-7
@@ -8,15 +8,15 @@ This will build all documentation with defaults:
|
||||
```bash
|
||||
./doc.pl
|
||||
```
|
||||
The user guide can be built for different platforms: `centos6`, `centos7`, and `debian`. This will build the HTML user guide for CentOS/RHEL 7:
|
||||
The user guide can be built for different platforms: `centos7`, `centos8` and `debian`. This will build the HTML user guide for CentOS/RHEL 7:
|
||||
```bash
|
||||
./doc.pl --out=html --include=user-guide --var=os-type=centos7
|
||||
```
|
||||
Documentation generation will build a cache of all executed statements and use the cache to build the documentation quickly if no executed statements have changed. This makes proofing text-only edits very fast, but sometimes it is useful to do a full build without using the cache:
|
||||
```bash
|
||||
./doc.pl --out=html --include=user-guide --var=os-type=centos6 --no-cache
|
||||
./doc.pl --out=html --include=user-guide --var=os-type=centos8 --no-cache
|
||||
```
|
||||
Each `os-type` has a default container image that will be used as a base for creating hosts. For `centos6`/`centos7` these defaults are generally fine, but for `debian` it can be useful to change the image.
|
||||
Each `os-type` has a default container image that will be used as a base for creating hosts. For `centos7`/`centos8` these defaults are generally fine, but for `debian` it can be useful to change the image.
|
||||
```bash
|
||||
./doc.pl --out=html --include=user-guide --var=os-type=debian --var=os-image=debian:9
|
||||
```
|
||||
@@ -55,14 +55,14 @@ Ubuntu 16.04:
|
||||
```bash
|
||||
./doc.pl --out=html --include=user-guide --no-cache --var=os-type=debian --var=os-image=ubuntu:16.04 --var=package=test/package/pgbackrest_2.08-0_amd64.deb
|
||||
```
|
||||
CentOS/RHEL 6:
|
||||
```bash
|
||||
./doc.pl --out=html --include=user-guide --no-cache --var=os-type=centos6 --var=package=test/package/pgbackrest-2.08-1.el6.x86_64.rpm
|
||||
```
|
||||
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
|
||||
```
|
||||
CentOS/RHEL 8:
|
||||
```bash
|
||||
./doc.pl --out=html --include=user-guide --no-cache --var=os-type=centos8 --var=package=test/package/pgbackrest-2.08-1.el8.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
|
||||
|
||||
@@ -237,6 +237,19 @@ eval
|
||||
}
|
||||
}
|
||||
|
||||
# Generate deployment docs for RHEL/Centos 8
|
||||
if (!defined($strVm) || $strVm eq VM_CO8)
|
||||
{
|
||||
&log(INFO, "Generate RHEL/CentOS 8 documentation");
|
||||
|
||||
executeTest("${strDocExe} --deploy --key-var=os-type=centos8 --out=pdf", {bShowOutputAsync => true});
|
||||
|
||||
if (!defined($strVm))
|
||||
{
|
||||
executeTest("${strDocExe} --deploy --cache-only --key-var=os-type=centos8 --out=pdf");
|
||||
}
|
||||
}
|
||||
|
||||
# Generate deployment docs for Debian
|
||||
if (!defined($strVm) || $strVm eq VM_U18)
|
||||
{
|
||||
@@ -254,6 +267,10 @@ eval
|
||||
"${strDocExe} --deploy --cache-only --key-var=os-type=centos7 --out=html --var=project-url-root=index.html");
|
||||
$oStorageDoc->move("$strDocHtml/user-guide.html", "$strDocHtml/user-guide-centos7.html");
|
||||
|
||||
executeTest(
|
||||
"${strDocExe} --deploy --cache-only --key-var=os-type=centos8 --out=html --var=project-url-root=index.html");
|
||||
$oStorageDoc->move("$strDocHtml/user-guide.html", "$strDocHtml/user-guide-centos8.html");
|
||||
|
||||
executeTest(
|
||||
"${strDocExe} --deploy --out-preserve --cache-only --out=man --out=html --var=project-url-root=index.html");
|
||||
}
|
||||
@@ -272,6 +289,9 @@ eval
|
||||
executeTest("${strDocExeVersion} --key-var=os-type=centos7");
|
||||
$oStorageDoc->move("$strDocHtml/user-guide.html", "$strDocHtml/user-guide-centos7.html");
|
||||
|
||||
executeTest("${strDocExeVersion} --key-var=os-type=centos8");
|
||||
$oStorageDoc->move("$strDocHtml/user-guide.html", "$strDocHtml/user-guide-centos8.html");
|
||||
|
||||
$oStorageDoc->remove("$strDocHtml/release.html");
|
||||
executeTest("${strDocExeVersion} --out-preserve --exclude=release");
|
||||
|
||||
@@ -288,6 +308,8 @@ eval
|
||||
|
||||
executeTest("${strDocExe} --deploy --cache-only --key-var=os-type=centos7 --out=html");
|
||||
$oStorageDoc->move("$strDocHtml/user-guide.html", "$strDocHtml/user-guide-centos7.html");
|
||||
executeTest("${strDocExe} --deploy --cache-only --key-var=os-type=centos8 --out=html");
|
||||
$oStorageDoc->move("$strDocHtml/user-guide.html", "$strDocHtml/user-guide-centos8.html");
|
||||
executeTest("${strDocExe} --deploy --out-preserve --cache-only --out=html");
|
||||
|
||||
# Deploy to repository
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
./doc.pl
|
||||
</code-block>
|
||||
|
||||
<p>The user guide can be built for different platforms: <id>centos7</id> and <id>debian</id>. This will build the HTML user guide for CentOS/RHEL 7:</p>
|
||||
<p>The user guide can be built for different platforms: <id>centos7</id>, <id>centos8</id> and <id>debian</id>. This will build the HTML user guide for CentOS/RHEL 7:</p>
|
||||
|
||||
<code-block type="bash">
|
||||
./doc.pl --out=html --include=user-guide --var=os-type=centos7
|
||||
@@ -23,10 +23,10 @@
|
||||
<p>Documentation generation will build a cache of all executed statements and use the cache to build the documentation quickly if no executed statements have changed. This makes proofing text-only edits very fast, but sometimes it is useful to do a full build without using the cache:</p>
|
||||
|
||||
<code-block type="bash">
|
||||
./doc.pl --out=html --include=user-guide --var=os-type=centos7 --no-cache
|
||||
./doc.pl --out=html --include=user-guide --var=os-type=centos8 --no-cache
|
||||
</code-block>
|
||||
|
||||
<p>Each <id>os-type</id> has a default container image that will be used as a base for creating hosts. For <id>centos7</id> these defaults are generally fine, but for <id>debian</id> it can be useful to change the image.</p>
|
||||
<p>Each <id>os-type</id> has a default container image that will be used as a base for creating hosts. For <id>centos7</id>/<id>centos8</id> these defaults are generally fine, but for <id>debian</id> it can be useful to change the image.</p>
|
||||
|
||||
<code-block type="bash">
|
||||
./doc.pl --out=html --include=user-guide --var=os-type=debian --var=os-image=debian:9
|
||||
@@ -78,6 +78,12 @@ sudo usermod -aG docker testdoc
|
||||
./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>CentOS/RHEL 8:</p>
|
||||
|
||||
<code-block type="bash">
|
||||
./doc.pl --out=html --include=user-guide --no-cache --var=os-type=centos8 --var=package=test/package/pgbackrest-2.08-1.el8.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">
|
||||
|
||||
@@ -176,6 +176,16 @@
|
||||
</release-item>
|
||||
</release-development-list>
|
||||
</release-core-list>
|
||||
|
||||
<release-doc-list>
|
||||
<release-improvement-list>
|
||||
<release-item>
|
||||
<commit subject="Add RHEL/CentOS 8 documentation."/>
|
||||
|
||||
<p>Replace <proper>RHEL/CentOS 6</proper> documentation with <proper>RHEL/CentOS 8</proper>.</p>
|
||||
</release-item>
|
||||
</release-improvement-list>
|
||||
</release-doc-list>
|
||||
</release>
|
||||
|
||||
<release date="2020-10-05" version="2.30" title="PostgreSQL 13 Support">
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
|
||||
<list>
|
||||
<list-item><link url="user-guide.html">{[os-debian-title]} / PostgreSQL {[os-debian-pg-version-min]}-{[os-debian-pg-version-max]}</link></list-item>
|
||||
<list-item><link url="user-guide-centos7.html">{[os-centos7-title]} / PostgreSQL {[os-centos7-pg-version-min]}-{[os-centos7-pg-version-max]}</link></list-item>
|
||||
<list-item><link url="user-guide-centos8.html">{[os-centos-title]} / PostgreSQL {[os-centos8-pg-version-min]}-{[os-centos8-pg-version-max]}</link></list-item>
|
||||
<list-item><link url="user-guide-centos7.html">{[os-centos-title]} / PostgreSQL {[os-centos7-pg-version-min]}-{[os-centos7-pg-version-max]}</link></list-item>
|
||||
</list>
|
||||
</section>
|
||||
</doc>
|
||||
|
||||
+51
-26
@@ -7,25 +7,29 @@
|
||||
<variable-list>
|
||||
<!-- Defined OS types -->
|
||||
<variable key="os-debian">debian</variable>
|
||||
<variable key="os-centos7">centos7</variable>
|
||||
<variable key="os-centos">centos</variable>
|
||||
|
||||
<!-- OS titles -->
|
||||
<variable key="os-debian-title">Debian & Ubuntu</variable>
|
||||
<variable key="os-centos7-title">RHEL & CentOS 7</variable>
|
||||
<variable key="os-centos-title">RHEL & CentOS 7/8</variable>
|
||||
|
||||
<!-- Base PostgreSQL versions -->
|
||||
<variable key="os-debian-pg-version">12</variable>
|
||||
<variable key="os-debian-pg-version-min">12</variable>
|
||||
<variable key="os-debian-pg-version-max">13</variable>
|
||||
|
||||
<variable key="os-centos7-pg-version">10</variable>
|
||||
<variable key="os-centos7-pg-version-min">9.6</variable>
|
||||
<variable key="os-centos7-pg-version-max">11</variable>
|
||||
<variable key="os-centos7-pg-version">9.5</variable>
|
||||
<variable key="os-centos7-pg-version-min">9.2</variable>
|
||||
<variable key="os-centos7-pg-version-max">9.5</variable>
|
||||
|
||||
<variable key="os-centos8-pg-version">10</variable>
|
||||
<variable key="os-centos8-pg-version-min">9.6</variable>
|
||||
<variable key="os-centos8-pg-version-max">11</variable>
|
||||
|
||||
<!-- User-defined package to use in documentation (use "apt" to install the current PGDG apt package) -->
|
||||
<variable key="package">none</variable>
|
||||
|
||||
<!-- Defines the general OS type that will be used to generate commands. Also supported: centos7 -->
|
||||
<!-- Defines the general OS type that will be used to generate commands. Also supported: centos7, centos8 -->
|
||||
<variable key="os-type">debian</variable>
|
||||
|
||||
<!-- Will encryption be used in the documentation? It can be useful for testing to omit encryption. -->
|
||||
@@ -33,18 +37,20 @@
|
||||
|
||||
<!-- Common if expressions for testing os-type -->
|
||||
<variable key="os-type-is-debian">'{[os-type]}' eq '{[os-debian]}'</variable>
|
||||
<variable key="os-type-is-centos7">'{[os-type]}' eq '{[os-centos7]}'</variable>
|
||||
<variable key="os-type-is-centos">({[os-type-is-centos7]})</variable>
|
||||
<variable key="os-type-is-centos7">'{[os-type]}' eq '{[os-centos]}7'</variable>
|
||||
<variable key="os-type-is-centos8">'{[os-type]}' eq '{[os-centos]}8'</variable>
|
||||
<variable key="os-type-is-centos">({[os-type-is-centos7]} || {[os-type-is-centos8]})</variable>
|
||||
|
||||
<!-- Defines the container image that will be used to build the host -->
|
||||
<variable key="os-image" if="{[os-type-is-debian]}">ubuntu:16.04</variable>
|
||||
<variable key="os-image" if="{[os-type-is-centos7]}">centos:7</variable>
|
||||
<variable key="os-image" if="{[os-type-is-centos8]}">centos:8</variable>
|
||||
|
||||
<variable key="user-guide-subtitle" if="{[os-type-is-debian]}">{[os-debian-title]}</variable>
|
||||
<variable key="user-guide-subtitle" if="{[os-type-is-centos7]}">{[os-centos7-title]}</variable>
|
||||
<variable key="user-guide-subtitle" if="{[os-type-is-centos]}">{[os-centos-title]}</variable>
|
||||
|
||||
<variable key="user-guide-os" if="{[os-type-is-debian]}">Debian/Ubuntu</variable>
|
||||
<variable key="user-guide-os" if="{[os-type-is-centos7]}">RHEL/CentOS 7</variable>
|
||||
<variable key="user-guide-os" if="{[os-type-is-centos]}">RHEL/CentOS 7/8</variable>
|
||||
|
||||
<variable key="pgbackrest-repo-path">/pgbackrest</variable>
|
||||
|
||||
@@ -65,6 +71,10 @@
|
||||
<variable key="pg-version-min" if="{[os-type-is-centos7]}">{[os-centos7-pg-version-min]}</variable>
|
||||
<variable key="pg-version-max" if="{[os-type-is-centos7]}">{[os-centos7-pg-version-max]}</variable>
|
||||
|
||||
<variable key="pg-version" if="{[os-type-is-centos8]}">{[os-centos8-pg-version]}</variable>
|
||||
<variable key="pg-version-min" if="{[os-type-is-centos8]}">{[os-centos8-pg-version-min]}</variable>
|
||||
<variable key="pg-version-max" if="{[os-type-is-centos8]}">{[os-centos8-pg-version-max]}</variable>
|
||||
|
||||
<variable key="pg-version-nodot" eval="y">my $version = '{[pg-version]}'; $version =~ s/\.//g; return $version;</variable>
|
||||
|
||||
<!-- WAL level should be the minimum required for replication -->
|
||||
@@ -72,7 +82,8 @@
|
||||
<variable key="wal-level" if="{[pg-version]} >= 9.6">replica</variable>
|
||||
|
||||
<variable key="pg-version-upgrade" if="{[os-type-is-debian]}">13</variable>
|
||||
<variable key="pg-version-upgrade" if="{[os-type-is-centos7]}">11</variable>
|
||||
<variable key="pg-version-upgrade" if="{[os-type-is-centos7]}">9.6</variable>
|
||||
<variable key="pg-version-upgrade" if="{[os-type-is-centos8]}">11</variable>
|
||||
<variable key="pg-version-upgrade-nodot" eval="y">my $version = '{[pg-version-upgrade]}'; $version =~ s/\.//g; return $version;</variable>
|
||||
|
||||
<variable key="pg-bin-path" if="{[os-type-is-debian]}">/usr/lib/postgresql/{[pg-version]}/bin</variable>
|
||||
@@ -211,25 +222,25 @@
|
||||
<variable key="pg-cluster-create-upgrade" if="{[os-type-is-debian]}">pg_createcluster {[pg-version-upgrade]} {[postgres-cluster-demo]}</variable>
|
||||
|
||||
<variable key="pg-cluster-start" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} start</variable>
|
||||
<variable key="pg-cluster-start" if="{[os-type-is-centos7]}">systemctl start postgresql-{[pg-version]}.service</variable>
|
||||
<variable key="pg-cluster-start" if="{[os-type-is-centos]}">systemctl start postgresql-{[pg-version]}.service</variable>
|
||||
|
||||
<variable key="pg-cluster-start-upgrade" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version-upgrade]} {[postgres-cluster-demo]} start</variable>
|
||||
<variable key="pg-cluster-start-upgrade" if="{[os-type-is-centos7]}">systemctl start postgresql-{[pg-version-upgrade]}.service</variable>
|
||||
<variable key="pg-cluster-start-upgrade" if="{[os-type-is-centos]}">systemctl start postgresql-{[pg-version-upgrade]}.service</variable>
|
||||
|
||||
<variable key="pg-cluster-stop" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} stop</variable>
|
||||
<variable key="pg-cluster-stop" if="{[os-type-is-centos7]}">systemctl stop postgresql-{[pg-version]}.service</variable>
|
||||
<variable key="pg-cluster-stop" if="{[os-type-is-centos]}">systemctl stop postgresql-{[pg-version]}.service</variable>
|
||||
|
||||
<variable key="pg-cluster-restart" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} restart</variable>
|
||||
<variable key="pg-cluster-restart" if="{[os-type-is-centos7]}">systemctl restart postgresql-{[pg-version]}.service</variable>
|
||||
<variable key="pg-cluster-restart" if="{[os-type-is-centos]}">systemctl restart postgresql-{[pg-version]}.service</variable>
|
||||
|
||||
<variable key="pg-cluster-reload" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} reload</variable>
|
||||
<variable key="pg-cluster-reload" if="{[os-type-is-centos7]}">systemctl reload postgresql-{[pg-version]}.service</variable>
|
||||
<variable key="pg-cluster-reload" if="{[os-type-is-centos]}">systemctl reload postgresql-{[pg-version]}.service</variable>
|
||||
|
||||
<variable key="pg-cluster-check" if="{[os-type-is-debian]}">pg_lsclusters</variable>
|
||||
<variable key="pg-cluster-check" if="{[os-type-is-centos7]}">systemctl status postgresql-{[pg-version]}.service</variable>
|
||||
<variable key="pg-cluster-check" if="{[os-type-is-centos]}">systemctl status postgresql-{[pg-version]}.service</variable>
|
||||
|
||||
<variable key="pg-cluster-check-upgrade" if="{[os-type-is-debian]}">pg_lsclusters</variable>
|
||||
<variable key="pg-cluster-check-upgrade" if="{[os-type-is-centos7]}">systemctl status postgresql-{[pg-version-upgrade]}.service</variable>
|
||||
<variable key="pg-cluster-check-upgrade" if="{[os-type-is-centos]}">systemctl status postgresql-{[pg-version-upgrade]}.service</variable>
|
||||
|
||||
<!-- Add more tables to make the backup more interesting. This is a rough and ready solution that can be pasted into the
|
||||
document where needed to grow the number of files as needed for performance testing. -->
|
||||
@@ -327,7 +338,7 @@
|
||||
ENTRYPOINT service ssh restart && bash
|
||||
</host-define>
|
||||
|
||||
<host-define if="{[os-type-is-centos7]}" image="{[host-image]}" from="{[os-image]}">
|
||||
<host-define if="{[os-type-is-centos]}" image="{[host-image]}" from="{[os-image]}">
|
||||
ENV container docker
|
||||
|
||||
{[copy-ca-cert]}
|
||||
@@ -356,10 +367,15 @@
|
||||
rm -f /etc/ssh/ssh_host_dsa_key* && \
|
||||
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
|
||||
|
||||
# Install PostgreSQL
|
||||
# Install PGDG PostgreSQL repository
|
||||
RUN rpm --import http://yum.postgresql.org/RPM-GPG-KEY-PGDG-10 && \
|
||||
rpm -ivh https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm && \
|
||||
yum install -y postgresql{[pg-version-nodot]}-server postgresql{[pg-version-upgrade-nodot]}-server
|
||||
rpm -ivh https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
|
||||
|
||||
# Disable default PostgreSQL repository
|
||||
RUN command -v dnf >/dev/null 2>&1 && dnf -qy module disable postgresql || true
|
||||
|
||||
# Install PostgreSQL
|
||||
RUN yum install -y postgresql{[pg-version-nodot]}-server postgresql{[pg-version-upgrade-nodot]}-server
|
||||
|
||||
# Create an ssh key for root so all hosts can ssh to each other as root
|
||||
RUN \ {[ssh-key-install]}
|
||||
@@ -369,10 +385,19 @@
|
||||
echo '{[host-user]} ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/{[host-user]}
|
||||
|
||||
# Enable the user session service so logons are allowed
|
||||
RUN systemctl enable systemd-user-sessions.service && \
|
||||
RUN echo "[Install]" >> /usr/lib/systemd/system/systemd-user-sessions.service && \
|
||||
echo "[WantedBy=default.target]" >> /usr/lib/systemd/system/systemd-user-sessions.service && \
|
||||
systemctl enable systemd-user-sessions.service && \
|
||||
mkdir -p /etc/systemd/system/default.target.wants && \
|
||||
ln -s /usr/lib/systemd/system/systemd-user-sessions.service \
|
||||
/etc/systemd/system/default.target.wants/systemd-user-sessions.service
|
||||
|
||||
# Set locale
|
||||
RUN echo en_US.UTF-8 UTF-8 > /etc/locale.conf
|
||||
|
||||
# Add path to PostgreSQL
|
||||
ENV PATH=/usr/pgsql-{[pg-version]}/bin:$PATH
|
||||
|
||||
CMD ["/usr/sbin/init"]
|
||||
</host-define>
|
||||
|
||||
@@ -797,8 +822,8 @@
|
||||
|
||||
<execute if="{[os-type-is-centos]}" user="root" pre="y">
|
||||
<exe-cmd>
|
||||
yum install make gcc postgresql-devel openssl-devel libxml2-devel
|
||||
lz4-devel libzstd-devel bzip2-devel
|
||||
yum install make gcc postgresql{[pg-version-nodot]}-devel
|
||||
openssl-devel libxml2-devel lz4-devel libzstd-devel bzip2-devel
|
||||
</exe-cmd>
|
||||
<exe-cmd-extra>-y 2>&1</exe-cmd-extra>
|
||||
</execute>
|
||||
@@ -1231,7 +1256,7 @@
|
||||
<exe-cmd>{[pg-cluster-start]}</exe-cmd>
|
||||
</execute>
|
||||
|
||||
<execute if="{[os-type-is-centos7]}" user="root" output="y" err-expect="3">
|
||||
<execute if="{[os-type-is-centos]}" user="root" output="y" err-expect="3">
|
||||
<exe-cmd>{[pg-cluster-check]}</exe-cmd>
|
||||
<exe-highlight>Failed to start PostgreSQL</exe-highlight>
|
||||
</execute>
|
||||
|
||||
@@ -91,6 +91,8 @@ use constant VM_NONE => 'none';
|
||||
|
||||
use constant VM_CO7 => 'co7';
|
||||
push @EXPORT, qw(VM_CO7);
|
||||
use constant VM_CO8 => 'co8';
|
||||
push @EXPORT, qw(VM_CO8);
|
||||
use constant VM_F32 => 'f32';
|
||||
push @EXPORT, qw(VM_F32);
|
||||
use constant VM_U12 => 'u12';
|
||||
|
||||
Reference in New Issue
Block a user