Merge pull request #172 from cdalvaro/logfile_level_fallback_to_log_level

feat: Use `SALT_LOG_LEVEL` if `SALT_LEVEL_LOGFILE` is undefined
This commit is contained in:
Carlos D. Álvaro
2022-11-02 22:22:06 +01:00
committed by GitHub
6 changed files with 128 additions and 118 deletions

View File

@@ -4,11 +4,21 @@ This file only reflects the changes that are made in this image.
Please refer to the [Salt 3005.1 Release Notes](https://docs.saltstack.com/en/latest/topics/releases/3005.1.html)
for the list of changes in SaltStack.
**3005.1_1**
- If `SALT_LEVEL_LOGFILE` is not defined, then fallback to `SALT_LOG_LEVEL`.
- Do not create automatically mount points for the following paths:
- `/home/salt/data/3pfs`
- `/home/salt/data/config`
- `/home/salt/data/srv`
- This avoids creating unnecessary volumes.
- Change Docker base image to `ubuntu:jammy-20221101`.
**3005.1**
- Upgrade `salt-master` to `3005.1` *Phosphorus*
- Upgrade `salt-bootstrap` to version `2022.10.04`
- Change Docker base image to `ubuntu:jammy-20220815`
- Upgrade `salt-master` to `3005.1` *Phosphorus*.
- Upgrade `salt-bootstrap` to version `2022.10.04`.
- Change Docker base image to `ubuntu:jammy-20220815`.
**3005_1**
@@ -17,33 +27,33 @@ for the list of changes in SaltStack.
- `SALT_MASTER_SIGN_KEY_FILE`: The path to the signing-key-pair {pem,pub} without suffixes.
- `SALT_MASTER_PUBKEY_SIGNATURE_FILE`: The path of the salt-master public key file with the pre-calculated
signature.
- Add support for setting the `salt-api` user's password via Docker secrets using the environment
- Add support for setting the `salt-api` user's password via Docker secrets using the environment.
variable `SALT_API_USER_PASS_FILE`.
- Note: Has priority over `SALT_API_USER_PASS`.
**3005**
- Upgrade `salt-master` to `3005` *Phosphorus*
- Upgrade `salt-bootstrap` to version `2022.08.13`
- Change Docker base image to `ubuntu:jammy-20220801`
- Use `python3` default distro version
- Install `python3-pygit2` version `1.6.1` from Ubuntu repositories
- Upgrade `salt-master` to `3005` *Phosphorus*.
- Upgrade `salt-bootstrap` to version `2022.08.13`.
- Change Docker base image to `ubuntu:jammy-20220801`.
- Use `python3` default distro version.
- Install `python3-pygit2` version `1.6.1` from Ubuntu repositories.
- Remove `USERMAP_UID` and `USERMAP_GID` env variables in favor of `PUID` and `PGID`, respectively.
- CI(tests): Use `python3` version `3.10`
- CI(tests): Use `python3` version `3.10`.
**3004.2**
- Upgrade `salt-master` to `3004.2` *Silicon*
- Remove Jinja2 patch to avoid Markup import error
- Upgrade `salt-master` to `3004.2` *Silicon*.
- Remove Jinja2 patch to avoid Markup import error.
**3004.1**
- Upgrade `salt-master` to `3004.1` *Silicon*
- Upgrade `salt-bootstrap` to version `2022.03.15`
- Upgrade `pygit2` to version `1.9.1`
- Upgrade `libgit2` to version `1.4.2`
- Fix Jinja2 version to avoid Markup import error
- Change Docker base image to `ubuntu:hirsute-20220113`
- Upgrade `salt-master` to `3004.1` *Silicon*.
- Upgrade `salt-bootstrap` to version `2022.03.15`.
- Upgrade `pygit2` to version `1.9.1`.
- Upgrade `libgit2` to version `1.4.2`.
- Fix Jinja2 version to avoid Markup import error.
- Change Docker base image to `ubuntu:hirsute-20220113`.
**3004_6**
@@ -67,179 +77,179 @@ Support for the `USERMAP_UID` and `USERMAP_GID` env variables will be removed wi
**3004_2**
- Support for automatically restart `salt-master` after config changes
- Support for automatically restart `salt-master` after config changes.
**3004_1**
- Install `libssh2 1.10.0` from source
- Install `libgit2 1.3.0` from source
- Install `pygit2 1.7.0` from pip repositories
- Change Docker base image to `ubuntu:hirsute-20210917`
- Upgrade Python to version `3.9`
- Install `libssh2 1.10.0` from source.
- Install `libgit2 1.3.0` from source.
- Install `pygit2 1.7.0` from pip repositories.
- Change Docker base image to `ubuntu:hirsute-20210917`.
- Upgrade Python to version `3.9`.
**3004**
- Upgrade `salt-master` to `3004` *Silicon*
- Change Docker base image to `ubuntu:focal-20211006`
- Upgrade `salt-master` to `3004` *Silicon*.
- Change Docker base image to `ubuntu:focal-20211006`.
**3003.3**
- Upgrade `salt-master` to `3003.3` *Aluminium*
- Change Docker base image to `ubuntu:focal-20210827`
- Upgrade `salt-master` to `3003.3` *Aluminium*.
- Change Docker base image to `ubuntu:focal-20210827`.
**3003.2**
- Upgrade `salt-master` to `3003.2` *Aluminium*
- Change Docker base image to `ubuntu:focal-20210723`
- Upgrade `salt-master` to `3003.2` *Aluminium*.
- Change Docker base image to `ubuntu:focal-20210723`.
**3003.1**
- Upgrade `salt-master` to `3003.1` *Aluminium*
- Change Docker base image to `ubuntu:focal-20210609`
- Upgrade `salt-master` to `3003.1` *Aluminium*.
- Change Docker base image to `ubuntu:focal-20210609`.
**3003**
- Upgrade `salt-master` to `3003` *Aluminium*
- Add python3 `timelib` `0.2.5`
- Change Docker base image to `ubuntu:focal-20210325`
- Replace `m2crypto` by `pycryptodome` (see [saltstack/salt#56625](https://github.com/saltstack/salt/pull/56625))
- Upgrade `salt-master` to `3003` *Aluminium*.
- Add python3 `timelib` `0.2.5`.
- Change Docker base image to `ubuntu:focal-20210325`.
- Replace `m2crypto` by `pycryptodome` (see [saltstack/salt#56625](https://github.com/saltstack/salt/pull/56625)).
**3002.6**
- Upgrade `salt-master` to `3002.6` *Magnesium*
- Upgrade `salt-master` to `3002.6` *Magnesium*.
**3002.5**
- Upgrade `salt-master` to `3002.5` *Magnesium*
- Upgrade `salt-master` to `3002.5` *Magnesium*.
**3002.4**
- Upgrade `salt-master` to `3002.4` *Magnesium*
- Upgrade `salt-master` to `3002.4` *Magnesium*.
**3002.3**
- Upgrade `salt-master` to `3002.3` *Magnesium*
- Upgrade `salt-master` to `3002.3` *Magnesium*.
**3002.2**
- Upgrade `salt-master` to `3002.2` *Magnesium*
- Upgrade `salt-master` to `3002.2` *Magnesium*.
**3002.1**
- Upgrade `salt-master` to `3002.1` *Magnesium*
- Change Docker base image to `ubuntu:focal-20201008`
- Fix issue changing _read-only_ directories ownership
- Upgrade `salt-master` to `3002.1` *Magnesium*.
- Change Docker base image to `ubuntu:focal-20201008`.
- Fix issue changing _read-only_ directories ownership.
([@Kidswiss](https://github.com/Kidswiss) - [#47](https://github.com/cdalvaro/docker-salt-master/pull/47))
**3002**
- Upgrade `salt-master` to `3002` *Magnesium*
- Bring back support for Linux ARMv7 platform
- Remove patch for muting sudo `RLIMIT_CORE` message
- Install `pygit2` and `m2crypto` from ubuntu repositories
- Change Docker base image to `ubuntu:focal-20200925`
- Upgrade `salt-master` to `3002` *Magnesium*.
- Bring back support for Linux ARMv7 platform.
- Remove patch for muting sudo `RLIMIT_CORE` message.
- Install `pygit2` and `m2crypto` from ubuntu repositories.
- Change Docker base image to `ubuntu:focal-20200925`.
**3001.1**
- Upgrade `salt-master` to `3001.1` *Sodium*
- Upgrade `m2crypto` to version `0.36.0`
- Change Docker base image to `ubuntu:focal-20200720`
- Upgrade `salt-master` to `3001.1` *Sodium*.
- Upgrade `m2crypto` to version `0.36.0`.
- Change Docker base image to `ubuntu:focal-20200720`.
**3001**
- Upgrade `salt-master` to `3001` *Sodium*
- Upgrade Python to version `3.8`
- Upgrade `libgit2` to version `1.0.1`
- Change Docker base image to `ubuntu:focal-20200606`
- Upgrade `salt-master` to `3001` *Sodium*.
- Upgrade Python to version `3.8`.
- Upgrade `libgit2` to version `1.0.1`.
- Change Docker base image to `ubuntu:focal-20200606`.
**3000.3_2**
- Add support for local third party formulas
- Add healthcheck script
- Remove HEALTCHECK from Dockerfile
- Add support for local third party formulas.
- Add healthcheck script.
- Remove HEALTCHECK from Dockerfile.
**3000.3_1**
- Add support for `salt-api` service
- Add entrypoint support to restart services
- Use previous image as Docker cache
- Add `build-arg` to Makefile
- Add support for `salt-api` service.
- Add entrypoint support to restart services.
- Use previous image as Docker cache.
- Add `build-arg` to Makefile.
**3000.3**
- Upgrade `salt-master` to `3000.3`
- Upgrade `pygit2` to version `1.2.1`
- Upgrade `salt-master` to `3000.3`.
- Upgrade `pygit2` to version `1.2.1`.
**3000.2**
- Upgrade `salt-master` to `3000.2`
- Upgrade `pygit2` to version `1.2.0`
- Change Docker base image to `ubuntu:bionic-20200403`
- Upgrade `salt-master` to `3000.2`.
- Upgrade `pygit2` to version `1.2.0`.
- Change Docker base image to `ubuntu:bionic-20200403`.
**3000.1**
- Upgrade `salt-master` to `3000.1`
- Upgrade `libgit2` to version `1.0.0`
- Upgrade `pygit2` to version `1.1.1`
- Upgrade `salt-master` to `3000.1`.
- Upgrade `libgit2` to version `1.0.0`.
- Upgrade `pygit2` to version `1.1.1`.
**3000_1**
- Add container healthcheck
- Change Docker base image to `ubuntu:bionic-20200311`
- Add container healthcheck.
- Change Docker base image to `ubuntu:bionic-20200311`.
**3000**
- Upgrade `salt-master` to `3000` *Neon*
- Change Docker base image to `ubuntu:bionic-20200112`
- Upgrade pygit2 to version `1.0.3`
- Upgrade `salt-master` to `3000` *Neon*.
- Change Docker base image to `ubuntu:bionic-20200112`.
- Upgrade pygit2 to version `1.0.3`.
**2019.2.3**
- Upgrade `salt-master` to `2019.2.3`
- Change Docker base image to `ubuntu:bionic-20191202`
- Upgrade `libgit2` to version `0.28.4`
- Upgrade `pygit2` to version `1.0.2`
- Upgrade `salt-master` to `2019.2.3`.
- Change Docker base image to `ubuntu:bionic-20191202`.
- Upgrade `libgit2` to version `0.28.4`.
- Upgrade `pygit2` to version `1.0.2`.
**2019.2.2**
- Upgrade `salt-master` to `2019.2.2`
- Change Docker base image to `ubuntu:bionic-20191010`
- Upgrade `salt-master` to `2019.2.2`.
- Change Docker base image to `ubuntu:bionic-20191010`.
**2019.2.1**
- Upgrade `salt-master` to `2019.2.1`
- Change Docker base image to `ubuntu:bionic-20190912.1`
- Upgrade `libssh2` to version `1.9.0`
- Upgrade `m2crypto` to version `0.35.2`
- Upgrade `salt-master` to `2019.2.1`.
- Change Docker base image to `ubuntu:bionic-20190912.1`.
- Upgrade `libssh2` to version `1.9.0`.
- Upgrade `m2crypto` to version `0.35.2`.
**2019.2.0**
- Upgrade `salt-master` to `2019.2.0`
- Change Docker base image to `ubuntu:bionic-20190204`
- Upgrade Python to version `3.6`
- Upgrade `libgit2` to `0.27.8`
- Reduce image size by updating, installing and cleaning packages in one single step
- Upgrade `salt-master` to `2019.2.0`.
- Change Docker base image to `ubuntu:bionic-20190204`.
- Upgrade Python to version `3.6`.
- Upgrade `libgit2` to `0.27.8`.
- Reduce image size by updating, installing and cleaning packages in one single step.
**2018.3.4**
- Upgrade `salt-master` to `2018.3.4`
- Change Docker base image to `ubuntu:xenial-20190122`
- Upgrade `salt-master` to `2018.3.4`.
- Change Docker base image to `ubuntu:xenial-20190122`.
**2018.3.3**
- Upgrade `salt-master` to `2018.3.3`
- Change Docker base image to `ubuntu:xenial-20181113`
- Add `GitPython` support
- Add `PyGit2` support
- Expose `/home/salt/data/logs`
- Run `salt-master` as `salt` user
- Add support for setting timezone
- Add logrotate support
- Add supervisor support
- Add cron support
- Add Docker Labels from label-schema.org
- Addressed a bug that caused the container to crash when `/home/salt/data/keys/minions` was not present
- Upgrade `salt-master` to `2018.3.3`.
- Change Docker base image to `ubuntu:xenial-20181113`.
- Add `GitPython` support.
- Add `PyGit2` support.
- Expose `/home/salt/data/logs`.
- Run `salt-master` as `salt` user.
- Add support for setting timezone.
- Add logrotate support.
- Add supervisor support.
- Add cron support.
- Add Docker Labels from _label-schema.org_.
- Addressed a bug that caused the container to crash when `/home/salt/data/keys/minions` was not present.
**2018.3.2**
- First version: `salt-master` `2018.3.2`
- First version: `salt-master` `2018.3.2`.

View File

@@ -1,11 +1,11 @@
FROM ubuntu:jammy-20220815
FROM ubuntu:jammy-20221101
ARG BUILD_DATE
ARG VCS_REF
# https://github.com/saltstack/salt/releases
ENV SALT_VERSION="3005.1"
ENV IMAGE_VERSION="${SALT_VERSION}"
ENV IMAGE_VERSION="${SALT_VERSION}_1"
ENV SALT_DOCKER_DIR="/etc/docker-salt" \
SALT_ROOT_DIR="/etc/salt" \
@@ -59,7 +59,7 @@ RUN chmod +x /sbin/entrypoint.sh
# Shared resources
EXPOSE 4505 4506 8000
RUN mkdir -p "${SALT_BASE_DIR}" "${SALT_FORMULAS_DIR}" "${SALT_KEYS_DIR}" "${SALT_CONFS_DIR}" "${SALT_LOGS_DIR}"
VOLUME [ "${SALT_BASE_DIR}", "${SALT_FORMULAS_DIR}", "${SALT_KEYS_DIR}", "${SALT_CONFS_DIR}", "${SALT_LOGS_DIR}" ]
VOLUME [ "${SALT_KEYS_DIR}", "${SALT_LOGS_DIR}" ]
LABEL org.opencontainers.image.title="Dockerized Salt Master"
LABEL org.opencontainers.image.description="salt-master ${SALT_VERSION} containerized"
@@ -72,7 +72,7 @@ LABEL org.opencontainers.image.created="${BUILD_DATE}"
LABEL org.opencontainers.image.version="${IMAGE_VERSION}"
LABEL org.opencontainers.image.revision="${VCS_REF}"
LABEL org.opencontainers.image.base.digest="sha256:42ba2dfce475de1113d55602d40af18415897167d47c2045ec7b6d9746ff148f"
LABEL org.opencontainers.image.base.name="ubuntu:jammy-20220815"
LABEL org.opencontainers.image.base.name="ubuntu:jammy-20221101"
LABEL org.opencontainers.image.licenses="MIT"
WORKDIR ${SALT_HOME}

View File

@@ -18,7 +18,7 @@ build:
release: build
@docker tag cdalvaro/docker-salt-master:latest \
cdalvaro/docker-salt-master:$(shell cat VERSION)
cdalvaro/docker-salt-master:$(shell cat VERSION)_1
quickstart:
@echo "Starting docker-salt-master container..."

View File

@@ -617,7 +617,7 @@ installation.
| [`SALT_LOG_LEVEL`](https://docs.saltproject.io/en/latest/ref/configuration/master.html#log-level) | The level of messages to send to the console. One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'. Default: `warning`. |
| `SALT_LOG_ROTATE_FREQUENCY` | Logrotate frequency for salt logs. Available options are 'daily', 'weekly', 'monthly', and 'yearly'. Default: `weekly`. |
| `SALT_LOG_ROTATE_RETENTION` | Keep x files before deleting old log files. Defaults: `52`. |
| [`SALT_LEVEL_LOGFILE`](https://docs.saltproject.io/en/latest/ref/configuration/master.html#log-level-logfile) | The level of messages to send to the log file. One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'. Default: `warning`. |
| [`SALT_LEVEL_LOGFILE`](https://docs.saltproject.io/en/latest/ref/configuration/master.html#log-level-logfile) | The level of messages to send to the log file. One of 'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical'. Default: `SALT_LOG_LEVEL`. |
| `SALT_MASTER_KEY_FILE` | The path to the master-key-pair {pem,pub} files without suffixes. Keys will be copied into the pki directory. Useful to load the password from secrets. _Unset_ by default. |
| [`SALT_API_SERVICE_ENABLED`](https://docs.saltproject.io/en/latest/ref/cli/salt-api.html) | Enable `salt-api` service. Default: `False`. |
| `SALT_API_USER` | Set username for `salt-api` service. Default: `salt_api`. |
@@ -721,7 +721,7 @@ Many thanks to:
[saltproject_release_notes]: https://docs.saltproject.io/en/latest/topics/releases/3005.1.html "Salt Project Release Notes"
[ubuntu_badge]: https://img.shields.io/badge/ubuntu-jammy--20220815-E95420.svg?logo=Ubuntu
[ubuntu_badge]: https://img.shields.io/badge/ubuntu-jammy--20221101-E95420.svg?logo=Ubuntu
[ubuntu_hub_docker]: https://hub.docker.com/_/ubuntu/ "Ubuntu Image"

View File

@@ -21,7 +21,7 @@ SALT_WORKER_THREADS=${SALT_WORKER_THREADS:-5}
##### Logging settings #####
# https://docs.saltstack.com/en/latest/ref/configuration/master.html#master-logging-settings
SALT_LOG_LEVEL=${SALT_LOG_LEVEL:-warning}
SALT_LEVEL_LOGFILE=${SALT_LEVEL_LOGFILE:-warning}
SALT_LEVEL_LOGFILE=${SALT_LEVEL_LOGFILE:-${SALT_LOG_LEVEL}}
##### Security settings #####
# https://docs.saltstack.com/en/latest/ref/configuration/master.html#master-security-settings

View File

@@ -4,11 +4,11 @@ services:
master:
container_name: salt_master
image: ghcr.io/cdalvaro/docker-salt-master:latest
restart: always
restart: unless-stopped
volumes:
- "roots/:/home/salt/data/srv"
- "keys/:/home/salt/data/keys"
- "logs/:/home/salt/data/logs"
- "./roots/:/home/salt/data/srv"
- "./keys/:/home/salt/data/keys"
- "./logs/:/home/salt/data/logs"
ports:
- "4505:4505"
- "4506:4506"