From 1d103a232e732ce12e3f8f3b53ee9467b1aaf2f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20=C3=81lvaro?= Date: Sat, 31 Oct 2020 18:53:43 +0100 Subject: [PATCH 1/5] feat: Change Docker base image to ubuntu:focal-20201008 --- CHANGELOG.md | 4 ++++ Dockerfile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a55689..3ff1d5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ This file only reflects the changes that are made in this image. Please refer to the SaltStack [Release Notes](https://docs.saltstack.com/en/latest/topics/releases/3002.html) for the list of changes in SaltStack. +**3002.1** + +- Change Docker base image to `ubuntu:focal-20201008` + **3002** - Upgrade `salt-master` to `3002` *Magnesium* diff --git a/Dockerfile b/Dockerfile index a534b27..02628c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:focal-20200925 +FROM ubuntu:focal-20201008 ARG BUILD_DATE ARG VCS_REF From f831cab932dea431522df13d54ad50490b5fb657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20=C3=81lvaro?= Date: Sat, 31 Oct 2020 18:59:29 +0100 Subject: [PATCH 2/5] feat: Upgrade salt-master to 3002.1 Magnesium --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- CHANGELOG.md | 3 ++- Dockerfile | 2 +- README.md | 8 ++++---- VERSION | 2 +- docker-compose.yml | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 56ec8cc..d620f1c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -26,7 +26,7 @@ The full log with the outputted error. **Version report (please complete the following information):** - OS: [e.g. `uname -a`] - Docker: [`docker --version`] - - Image tag: [e.g. 3002] + - Image tag: [e.g. 3002.1] **Additional context** Add any other context about the problem here. diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ff1d5d..1cd69d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,11 @@ # Changelog This file only reflects the changes that are made in this image. -Please refer to the SaltStack [Release Notes](https://docs.saltstack.com/en/latest/topics/releases/3002.html) for the list of changes in SaltStack. +Please refer to the SaltStack [Release Notes](https://docs.saltstack.com/en/latest/topics/releases/3002.1.html) for the list of changes in SaltStack. **3002.1** +- Upgrade `salt-master` to `3002.1` *Magnesium* - Change Docker base image to `ubuntu:focal-20201008` **3002** diff --git a/Dockerfile b/Dockerfile index 02628c8..2d1efa7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG BUILD_DATE ARG VCS_REF # https://github.com/saltstack/salt/releases -ENV SALT_VERSION="3002" \ +ENV SALT_VERSION="3002.1" \ PYTHON_VERSION="3.8" ENV IMAGE_VERSION="${SALT_VERSION}" diff --git a/README.md b/README.md index 9165fad..6d5747e 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Docker Image Size][docker_size_badge]][docker_hub_tags] [![CodeFactor][codefactor_badge]][codefactor_score] -# Dockerized SaltStack Master Magnesium v3002 +# Dockerized SaltStack Master Magnesium v3002.1 Dockerfile to build a [SaltStack](https://www.saltstack.com) Master image for the Docker opensource container platform. @@ -44,7 +44,7 @@ For other methods to install SaltStack please refer to the [Official SaltStack I Automated builds of the image are available on [Dockerhub](https://hub.docker.com/r/cdalvaro/docker-salt-master/) and is the recommended method of installation. ```sh -docker pull cdalvaro/docker-salt-master:3002 +docker pull cdalvaro/docker-salt-master:3002.1 ``` You can also pull the latest tag which is built from the repository `HEAD` @@ -528,8 +528,8 @@ Where `salt-service` is one of: `salt-master` os `salt-api` (if `SALT_API_SERVIC - https://docs.saltstack.com/en/latest/topics/tutorials/salt_bootstrap.html - https://github.com/saltstack/salt/releases -[saltstack_badge]: https://img.shields.io/badge/SaltStack-v3002-lightgrey.svg?style=flat-square&logo=Saltstack -[saltstack_release_notes]: https://docs.saltstack.com/en/latest/topics/releases/3002.html "SaltStack Release Notes" +[saltstack_badge]: https://img.shields.io/badge/SaltStack-v3002.1-lightgrey.svg?style=flat-square&logo=Saltstack +[saltstack_release_notes]: https://docs.saltstack.com/en/latest/topics/releases/3002.1.html "SaltStack Release Notes" [ubuntu_badge]: https://img.shields.io/badge/ubuntu-focal--20200925-E95420.svg?style=flat-square&logo=Ubuntu [ubuntu_hub_docker]: https://hub.docker.com/_/ubuntu/ "Ubuntu Image" [github_publish_badge]: https://img.shields.io/github/workflow/status/cdalvaro/docker-salt-master/Publish%20Docker%20image?style=flat-square&label=build&logo=GitHub&logoColor=%23181717 diff --git a/VERSION b/VERSION index bcce32e..5399b30 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3002 \ No newline at end of file +3002.1 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 450078f..f68e1ca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: '3' services: master: container_name: salt_master - image: cdalvaro/docker-salt-master:3002 + image: cdalvaro/docker-salt-master:3002.1 restart: always volumes: - "roots/:/home/salt/data/srv" From cc598aeecf1ce7c20a9db6bb5ca69db7aeac07c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20=C3=81lvaro?= Date: Tue, 3 Nov 2020 11:13:19 +0100 Subject: [PATCH 3/5] ci: Update linter.yml --- .github/workflows/linter.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 84956fe..ff1dfd8 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -18,6 +18,7 @@ jobs: - name: Lint code base uses: github/super-linter@v3 env: + VALIDATE_ALL_CODEBASE: false VALIDATE_DOCKERFILE_HADOLINT: true VALIDATE_BASH: true DEFAULT_BRANCH: master From 8d2fa05825c3b0a918eb472b6a97fddd896535d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20=C3=81lvaro?= Date: Tue, 3 Nov 2020 11:20:17 +0100 Subject: [PATCH 4/5] doc: Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cd69d4..25090a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Please refer to the SaltStack [Release Notes](https://docs.saltstack.com/en/late - 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** From a277e05c88a447607fdda9cc499d697e84f99448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20=C3=81lvaro?= Date: Tue, 3 Nov 2020 20:30:36 +0100 Subject: [PATCH 5/5] fix: Change certificates ownership --- assets/runtime/functions.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/runtime/functions.sh b/assets/runtime/functions.sh index e868998..028ed2c 100755 --- a/assets/runtime/functions.sh +++ b/assets/runtime/functions.sh @@ -208,8 +208,10 @@ function configure_salt_api() echo "Configuring salt-api service ..." CERTS_PATH=/etc/pki + SALT_API_KEY_FILE='docker-salt-master' rm -rf "${CERTS_PATH}/tls/certs/*" - salt-call --local tls.create_self_signed_cert cacert_path="${CERTS_PATH}" CN=docker-salt-master + salt-call --local tls.create_self_signed_cert cacert_path="${CERTS_PATH}" CN="${SALT_API_KEY_FILE}" + chown "${SALT_USER}": "${CERTS_PATH}/tls/certs/${SALT_API_KEY_FILE}".{crt,key} cat >> "${SALT_ROOT_DIR}/master" <