Skip to content

Commit

Permalink
Release 2.6-7.4.0 - See CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tiredofit committed Mar 30, 2023
1 parent e701ac1 commit 61efd25
Show file tree
Hide file tree
Showing 6 changed files with 439 additions and 172 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 2.6-7.4.0 2023-03-30 <dave at tiredofit dot ca>

### Changed
- Rework OpenLDAP Backup routines to become more in line with parent tiredofit/db-backup image
- config and data both get compressed into same tar file going forward
- Added ability to create "latest" symlink to last good backup
- Added ability to "archive" backups to an archive folder after a specified period of time for better external backup capabilities


## 2.6-7.3.2 2023-03-07 <adrianparilli@github>

### Changed
Expand Down
84 changes: 42 additions & 42 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ARG OPENLDAP_VERSION

ENV OPENLDAP_VERSION=${OPENLDAP_VERSION:-"2.6.4"} \
SCHEMA2LDIF_VERSION=1.3 \
IMAGE_NAME="tiredofit/openldap:2.6" \
IMAGE_NAME="tiredofit/openldap" \
IMAGE_REPO_URL="https://github.com/tiredofit/docker-openldap/"

COPY CHANGELOG.md /tiredofit/
Expand All @@ -20,48 +20,49 @@ RUN source /assets/functions/00-container && \
package update && \
package upgrade && \
package install .openldap-build-deps \
alpine-sdk \
autoconf \
automake \
build-base \
bzip2-dev \
cracklib-dev \
cyrus-sasl-dev \
db-dev \
git \
groff \
heimdal-dev \
libarchive-dev \
libevent-dev \
libsodium-dev \
libtool \
m4 \
mosquitto-dev \
openssl-dev \
unixodbc-dev \
util-linux-dev \
xz-dev \
&& \
alpine-sdk \
autoconf \
automake \
build-base \
bzip2-dev \
cracklib-dev \
cyrus-sasl-dev \
db-dev \
git \
groff \
heimdal-dev \
libarchive-dev \
libevent-dev \
libsodium-dev \
libtool \
m4 \
mosquitto-dev \
openssl-dev \
unixodbc-dev \
util-linux-dev \
xz-dev \
&& \
\
package install .openldap-run-deps \
aws-cli \
bzip2 \
cyrus-sasl \
coreutils \
cracklib \
iptables \
libltdl \
libuuid \
libintl \
libsodium \
openssl \
perl \
pigz \
sed \
unixodbc \
xz \
zstd \
&& \
aws-cli \
bzip2 \
cyrus-sasl \
coreutils \
cracklib \
iptables \
libltdl \
libuuid \
libintl \
libsodium \
openssl \
perl \
pigz \
sed \
tar \
unixodbc \
xz \
zstd \
&& \
\
mkdir -p /usr/src/pixz && \
curl -ssL https://github.com/vasi/pixz/releases/download/v1.0.7/pixz-1.0.7.tar.gz | tar xfz - --strip=1 -C /usr/src/pixz && \
Expand All @@ -83,7 +84,6 @@ RUN source /assets/functions/00-container && \
mkdir -p contrib/slapd-modules/ppolicy-check-password && \
git clone https://github.com/cedric-dufour/ppolicy-check-password /tiredofit/openldap:$(head -n 1 /tiredofit/CHANGELOG.md | awk '{print $2'})/contrib/slapd-modules/ppolicy-check-password && \
rm -rf /tiredofit/openldap:$(head -n 1 /tiredofit/CHANGELOG.md | awk '{print $2'})/contrib/slapd-modules/ppm && \
#mkdir -p contrib/slapd-modules/ppm && \
git clone https://github.com/ltb-project/ppm /tiredofit/openldap:$(head -n 1 /tiredofit/CHANGELOG.md | awk '{print $2'})/contrib/slapd-modules/ppm && \
cd /tiredofit/openldap:$(head -n 1 /tiredofit/CHANGELOG.md | awk '{print $2'})/alpine && \
git filter-branch --prune-empty --subdirectory-filter main/openldap HEAD && \
Expand Down
49 changes: 26 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@ Builds of the image are available on [Docker Hub](https://hub.docker.com/r/tired
```bash
docker pull docker.io/tiredofdit/openldap:(imagetag)
```
Builds of the image are also available on the [Github Container Registry](https://github.com/tiredofit/docker-openldap/pkgs/container/docker-openldap)
Builds of the image are also available on the [Github Container Registry](https://github.com/tiredofit/docker-openldap/pkgs/container/docker-openldap)

```
docker pull ghcr.io/tiredofit/docker-openldap:(imagetag)
```
```

Builds of the image are also available on the [Github Container Registry](https://github.com/tiredofit/docker-tiredofdit/pkgs/container/docker-tiredofdit)

Builds of the image are also available on the [Github Container Registry](https://github.com/tiredofit/docker-tiredofdit/pkgs/container/docker-tiredofdit)

```
docker pull ghcr.io/tiredofit/docker-tiredofdit:(imagetag)
```
```

The following image tags are available along with their tagged release based on what's written in the [Changelog](CHANGELOG.md):

Expand Down Expand Up @@ -159,22 +159,25 @@ Be sure to view the following repositories to understand all the customizable op
#### Backup Options:


| Parameter | Description | Default |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| `ENABLE_BACKUP` | Enable Backup System | `TRUE` |
| `BACKUP_LOCATION` | Backup to `FILESYSTEM` or `S3` compatible services like S3, Minio, Wasabi | `FILESYSTEM` |
| `BACKUP_COMPRESSION` | Use either Gzip `GZ`, Bzip2 `BZ`, XZip `XZ`, ZSTD `ZSTD` or none `NONE` | `GZ` |
| `BACKUP_COMPRESSION_LEVEL` | Numberical value of what level of compression to use, most allow `1` to `9` except for `ZSTD` which allows for `1` to `19` | `3` |
| `BACKUP_INTERVAL` | How often to do a dump, in minutes. Defaults to 1440 minutes, or once per day. | |
| `BACKUP_BEGIN` | What time to do the first dump. Defaults to immediate. Must be in one of two formats | |
| | Absolute HHMM, e.g. `2330` or `0415` | |
| | Relative +MM, i.e. how many minutes after starting the container, e.g. `+0` (immediate), `+10` (in 10 minutes), or `+90` in an hour and a half | |
| `BACKUP_RETENTION` | Value in minutes to delete old backups (only fired when dump freqency fires). 1440 would delete anything above 1 day old. You don't need to set this variable if you want to hold onto everything. | |
| `BACKUP_MD5` | Generate MD5 Sum in Directory, `TRUE` or `FALSE` | `TRUE` |
| `BACKUP_PARALLEL_COMPRESSION` | Use multiple cores when compressing backups `TRUE` or `FALSE` | `TRUE` |
| `BACKUP_PATH` | Filesystem path on where to place backups | `/data/backup` |
| `BACKUP_TEMP_LOCATION` | If you wish to specify a different location, enter it here | `/tmp/backups/" |

| Parameter | Description | Default |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- |
| `ENABLE_BACKUP` | Enable Backup System | `TRUE` |
| `BACKUP_BEGIN` | What time to do the first dump. Defaults to immediate. Must be in one of two formats | |
| | Absolute HHMM, e.g. `2330` or `0415` | |
| | Relative +MM, i.e. how many minutes after starting the container, e.g. `+0` (immediate), `+10` (in 10 minutes), or `+90` in an hour and a half | |
| `BACKUP_ARCHIVE_TIME` | Value in minutes to move all files older than (x) from `BACKUP_PATH` to `BACKUP_PATH_ARCHIVE` - which is useful when pairing against an external backup system. |
| `BACKUP_CHECKSUM` | `md5` or `sha1` | `md5` |
| `BACKUP_COMPRESSION_LEVEL` | Numberical value of what level of compression to use, most allow `1` to `9` except for `ZSTD` which allows for `1` to `19` | `8` |
| `BACKUP_COMPRESSION` | Use either Gzip `GZ`, Bzip2 `BZ`, XZip `XZ`, ZSTD `ZSTD` or `none` `zstd` | `GZ` |
| `BACKUP_CREATE_LATEST_SYMLINK` | Create a symbolic link pointing to last backup in this format: `latest-openldap-(config | data` | `TRUE` |
| `BACKUP_ENABLE_CHECKSUM` | Enable checksum after backup `TRUE` or `FALSE` | `TRUE` |
| `BACKUP_INTERVAL` | How often to do a dump, in minutes. Defaults to 1440 minutes, or once per day. | |
| `BACKUP_LOCATION` | Backup to `FILESYSTEM` or `S3` compatible services like S3, Minio, Wasabi | `FILESYSTEM` |
| `BACKUP_PARALLEL_COMPRESSION` | Use multiple cores when compressing backups `TRUE` or `FALSE` | `TRUE` |
| `BACKUP_PATH_ARCHIVE` | Optional Directory where the database dumps archivess are kept. | `${BACKUP_PATH}/archive/` |
| `BACKUP_PATH` | Filesystem path on where to place backups | `/data/backup` |
| `BACKUP_RETENTION` | Value in minutes to delete old backups (only fired when dump freqency fires). 1440 would delete anything above 1 day old. You don't need to set this variable if you want to hold onto everything. | |
| `BACKUP_TEMP_LOCATION` | If you wish to specify a different location, enter it here | `/tmp/backups/` |

##### Backing Up to S3 Compatible Services

Expand Down Expand Up @@ -232,7 +235,7 @@ If you already have a check_password.conf or ppm.conf in /etc/openldap/ the foll
| `TLS_RESET_PERMISSIONS` | Change permissions on certificate directories for OpenLDAP to read | `TRUE` |
| `TLS_VERIFY_CLIENT` | TLS verify client. | `try` |

Help: http://www.openldap.org/doc/admin24/tls.html
Help: http://www.openldap.org/doc/admin26/tls.html

#### Replication options

Expand Down
21 changes: 12 additions & 9 deletions install/assets/defaults/10-openldap
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@

ADD_DEFAULT_DATA=${ADD_DEFAULT_DATA:-"TRUE"}
ADMIN_PASS=${ADMIN_PASS:-"admin"}
CONFIG_PASS=${CONFIG_PASS:-"config"}
CONFIG_PATH=${CONFIG_PATH:-"/etc/openldap/"}
BACKUP_TYPE=${BACKUP_TYPE:-"FILESYSTEM"}
BACKUP_COMPRESSION=${BACKUP_COMPRESSION:-ZSTD}
BACKUP_COMPRESSION_LEVEL=${BACKUP_COMPRESSION_LEVEL:-"3"}
BACKUP_BEGIN=${BACKUP_BEGIN:-0400}
BACKUP_RETENTION=${BACKUP_RETENTION:-"10080"}
BACKUP_COMPRESSION=${BACKUP_COMPRESSION:-"zstd"}
BACKUP_COMPRESSION_LEVEL=${BACKUP_COMPRESSION_LEVEL:-"8"}
BACKUP_CREATE_LATEST_SYMLINK=${BACKUP_CREATE_LATEST_SYMLINK:-"TRUE"}
BACKUP_INTERVAL=${BACKUP_INTERVAL:-1440}
BACKUP_PATH=${BACKUP_PATH:-/data/backup}
BACKUP_MD5=${BACKUP_MD5:-TRUE}
BACKUP_PARALLEL_COMPRESSION=${BACKUP_PARALLEL_COMPRESSION:-TRUE}
BACKUP_ENABLE_CHECKSUM=${BACKUP_ENABLE_CHECKSUM:-"TRUE"}
BACKUP_CHECKSUM=${BACKUP_CHECKSUM:-"md5"}
BACKUP_PARALLEL_COMPRESSION=${BACKUP_PARALLEL_COMPRESSION:-"TRUE"}
BACKUP_PATH=${BACKUP_PATH:-"/data/backup/"}
BACKUP_PATH_ARCHIVE=${BACKUP_PATH_ARCHIVE:-"${BACKUP_PATH}/archive/"}
BACKUP_RETENTION=${BACKUP_RETENTION:-"10080"}
BACKUP_SIZE_VALUE=${BACKUP_SIZE_VALUE:-"bytes"}
BACKUP_TEMP_LOCATION=${BACKUP_TEMP_LOCATION:-"/tmp/backups"}
BACKUP_TYPE=${BACKUP_TYPE:-"FILESYSTEM"}
CONFIG_PASS=${CONFIG_PASS:-"config"}
CONFIG_PATH=${CONFIG_PATH:-"/etc/openldap/"}
DB_PATH=${DB_PATH:-"/var/lib/openldap"}
DOMAIN=${DOMAIN:-"example.org"}
ENABLE_BACKUP=${ENABLE_BACKUP:-"TRUE"}
Expand Down
Loading

0 comments on commit 61efd25

Please sign in to comment.