From 0ea7602af28381d244bc2a301e8603b8d5942970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20=C3=81lvaro?= Date: Wed, 17 Jun 2020 19:15:24 +0200 Subject: [PATCH 1/8] enh: Update Makefile --- Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 416f9be5..1acf4817 100644 --- a/Makefile +++ b/Makefile @@ -12,14 +12,13 @@ help: @echo " 6. make log - view log" build: - @docker build --tag=cdalvaro/saltstack-master . \ - --build-arg=BUILD_DATE="$(shell date +"%Y-%m-%d %H:%M:%S%:z")" \ - --build-arg=VCS_REF="$(shell git rev-parse --short HEAD)" \ + @docker build --tag=cdalvaro/saltstack-master:latest . \ + --build-arg=BUILD_DATE="$(shell date +"%Y-%m-%d %H:%M:%S%:z")" \ + --build-arg=VCS_REF="$(shell git rev-parse --short HEAD)" release: build - @docker build --tag=cdalvaro/saltstack-master:$(shell cat VERSION) . \ - --build-arg=BUILD_DATE="$(shell date +"%Y-%m-%d %H:%M:%S%:z")" \ - --build-arg=VCS_REF="$(shell git rev-parse --short HEAD)" \ + @docker tag cdalvaro/saltstack-master:latest \ + cdalvaro/saltstack-master:$(shell cat VERSION) quickstart: @echo "Starting saltstack-master container..." From 0fe31c5dd2603a40838bf986bdb4b781ed480027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20=C3=81lvaro?= Date: Wed, 17 Jun 2020 19:17:07 +0200 Subject: [PATCH 2/8] feat: Change Docker base image to ubuntu:focal-20200606 --- Dockerfile | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7b7fc199..0ae39be1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:bionic-20200403 +FROM ubuntu:focal-20200606 ARG BUILD_DATE ARG VCS_REF diff --git a/README.md b/README.md index 76dae947..e19108f3 100644 --- a/README.md +++ b/README.md @@ -499,7 +499,7 @@ Where `salt-service` is one of: `salt-master` os `salt-api` (if `SALT_API_SERVIC [saltstack_badge]: https://img.shields.io/badge/SaltStack-v3000.3-lightgrey.svg?style=flat&logo=Saltstack [saltstack_release_notes]: https://docs.saltstack.com/en/latest/topics/releases/3000.3.html "SaltStack Release Notes" -[ubuntu_badge]: https://img.shields.io/badge/ubuntu-bionic--20200403-E95420.svg?style=flat&logo=Ubuntu +[ubuntu_badge]: https://img.shields.io/badge/ubuntu-focal--20200606-E95420.svg?style=flat&logo=Ubuntu [ubuntu_hub_docker]: https://hub.docker.com/_/ubuntu/ "Ubuntu Image" [github_publish_badge]: https://github.com/cdalvaro/saltstack-master/workflows/Publish/badge.svg @@ -509,4 +509,4 @@ Where `salt-service` is one of: `salt-master` os `salt-api` (if `SALT_API_SERVIC [docker_hub_tags]: https://hub.docker.com/repository/docker/cdalvaro/saltstack-master/tags [codefactor_badge]: https://img.shields.io/codefactor/grade/github/cdalvaro/saltstack-master?logo=CodeFactor -[codefactor_score]: https://www.codefactor.io/repository/github/cdalvaro/saltstack-master \ No newline at end of file +[codefactor_score]: https://www.codefactor.io/repository/github/cdalvaro/saltstack-master From 04249f219480d6452353b4783484955ee1fd43e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20=C3=81lvaro?= Date: Wed, 17 Jun 2020 19:18:46 +0200 Subject: [PATCH 3/8] feat: Upgrade Python to version 3.8 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0ae39be1..d730754e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ARG VCS_REF # https://github.com/saltstack/salt/releases ENV SALT_VERSION="3000.3" \ - PYTHON_VERSION="3.6" \ + PYTHON_VERSION="3.8" \ LIBSSH2_VERSION="1.9.0" \ LIBGIT2_VERSION="1.0.0" \ PYGIT2_VERSION="1.2.1" \ From 32795bf203d04aa79e5acbef6ca9ab6233df56be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20=C3=81lvaro?= Date: Wed, 17 Jun 2020 19:19:14 +0200 Subject: [PATCH 4/8] feat: Remove support for ARM v7 --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4873e5ef..b6fe0c21 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,7 +11,7 @@ on: env: GITHUB_REF_NAME: ${{ github.event.release.tag_name }} IMAGE_NAME: cdalvaro/saltstack-master - PLATFORMS: linux/amd64 linux/arm64 linux/arm/v7 + PLATFORMS: linux/amd64 linux/arm64 DOCKER_CLI_EXPERIMENTAL: enabled jobs: From 6e08c9db9418054cea89cbd6feb01d7124fb53e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20=C3=81lvaro?= Date: Wed, 17 Jun 2020 19:20:13 +0200 Subject: [PATCH 5/8] feat: Upgrade libgit2 to version 1.0.1 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d730754e..b462d382 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ ARG VCS_REF ENV SALT_VERSION="3000.3" \ PYTHON_VERSION="3.8" \ LIBSSH2_VERSION="1.9.0" \ - LIBGIT2_VERSION="1.0.0" \ + LIBGIT2_VERSION="1.0.1" \ PYGIT2_VERSION="1.2.1" \ M2CRYPTO_VERSION="0.35.2" From 0bed2ee11241b2fef73cc183746d7e17927f41ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20=C3=81lvaro?= Date: Wed, 17 Jun 2020 19:21:10 +0200 Subject: [PATCH 6/8] feat: Upgrade SaltStack Master to 3001 Sodium --- Dockerfile | 2 +- README.md | 31 ++++++++++++++++--------------- VERSION | 2 +- docker-compose.yml | 2 +- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index b462d382..98894858 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG BUILD_DATE ARG VCS_REF # https://github.com/saltstack/salt/releases -ENV SALT_VERSION="3000.3" \ +ENV SALT_VERSION="3001" \ PYTHON_VERSION="3.8" \ LIBSSH2_VERSION="1.9.0" \ LIBGIT2_VERSION="1.0.1" \ diff --git a/README.md b/README.md index e19108f3..f3b4d916 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Docker Image Size][docker_size_badge]][docker_hub_tags] [![CodeFactor][codefactor_badge]][codefactor_score] -# Dockerized SaltStack Master v3000.3 +# Dockerized SaltStack Master Sodium v3001 Dockerfile to build a [SaltStack](https://www.saltstack.com) Master image for the Docker opensource container platform. @@ -41,7 +41,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/saltstack-master/) and is the recommended method of installation. ```sh -docker pull cdalvaro/saltstack-master:3000.3_2 +docker pull cdalvaro/saltstack-master:3001 ``` You can also pull the latest tag which is built from the repository `HEAD` @@ -84,7 +84,7 @@ docker run --name salt_master --detach \ --env 'SALT_LOG_LEVEL=info' \ --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ - cdalvaro/saltstack-master:3000.3_2 + cdalvaro/saltstack-master:3001 ``` ## Configuration @@ -111,7 +111,7 @@ docker run --name salt_master -d \ --env 'SALT_LOG_LEVEL=info' \ --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ - cdalvaro/saltstack-master:3000.3_2 + cdalvaro/saltstack-master:3001 ``` ### Master Signed Keys @@ -126,7 +126,7 @@ docker run --name salt_stack --detach \ --env 'SALT_MASTER_SIGN_PUBKEY=True' --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ - cdalvaro/saltstack-master:3000.3_2 + cdalvaro/saltstack-master:3001 ``` The container will create the `master_sign` key and its signature. @@ -138,7 +138,8 @@ Additionally, you can generate new keys by executing the following command: ```sh docker run --name salt_stack -it --rm \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ - cdalvaro/saltstack-master:3000.3_2 app:gen-signed-keys new_master_sign + cdalvaro/saltstack-master:3001 \ + app:gen-signed-keys new_master_sign ``` The newly created keys will appear inside `keys/generated/new_master_sign` directory. @@ -167,7 +168,7 @@ docker run --name salt_stack --detach \ --env 'SALT_API_USER_PASS=SuperCool/Password10' --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ - cdalvaro/saltstack-master:3000.3_2 + cdalvaro/saltstack-master:3001 ``` By default, user `salt_api` is created and you can set its password by setting the environment variable @@ -235,7 +236,7 @@ docker run --name salt_stack -it --rm \ --env "USERMAP_UID=$(id -u)" --env "USERMAP_GID=$(id -g)" \ --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ - cdalvaro/saltstack-master:3000.3_2 + cdalvaro/saltstack-master:3001 ``` ### Git Fileserver @@ -323,7 +324,7 @@ docker run --name salt_stack -it --rm \ --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/3pfs/:/home/salt/data/3pfs/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ - cdalvaro/saltstack-master:3000.3_2 + cdalvaro/saltstack-master:3001 ``` If you need to add more third party formulas, you can restart the container, or you can type the following command: @@ -347,7 +348,7 @@ docker run --name salt_master --detach \ --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ --volume $(pwd)/logs/:/home/salt/data/logs/ \ - cdalvaro/saltstack-master:3000.3_2 + cdalvaro/saltstack-master:3001 ``` Check [Available Configuration Parameters](#available-configuration-parameters) section for configuring logrotate. @@ -366,7 +367,7 @@ version: '3' services: master: container_name: salt_master - image: cdalvaro/saltstack-master:3000.3_2 + image: cdalvaro/saltstack-master:3001 healthcheck: test: ["CMD", "/usr/local/sbin/healthcheck"] start_period: 30s @@ -385,7 +386,7 @@ docker run --name salt_master --detach \ --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ --volume $(pwd)/logs/:/home/salt/data/logs/ \ - cdalvaro/saltstack-master:3000.3_2 + cdalvaro/saltstack-master:3001 ``` Then you can manually check this info by running the following command: @@ -455,7 +456,7 @@ docker run --name salt_master -d \ --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ --volume $(pwd)/config/:/home/salt/data/config/ \ - cdalvaro/saltstack-master:3000.3_2 + cdalvaro/saltstack-master:3001 ``` ## Usage @@ -496,8 +497,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-v3000.3-lightgrey.svg?style=flat&logo=Saltstack -[saltstack_release_notes]: https://docs.saltstack.com/en/latest/topics/releases/3000.3.html "SaltStack Release Notes" +[saltstack_badge]: https://img.shields.io/badge/SaltStack-v3001-lightgrey.svg?style=flat&logo=Saltstack +[saltstack_release_notes]: https://docs.saltstack.com/en/latest/topics/releases/3001.html "SaltStack Release Notes" [ubuntu_badge]: https://img.shields.io/badge/ubuntu-focal--20200606-E95420.svg?style=flat&logo=Ubuntu [ubuntu_hub_docker]: https://hub.docker.com/_/ubuntu/ "Ubuntu Image" diff --git a/VERSION b/VERSION index 025eca12..6fc99cfb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3000.3_2 \ No newline at end of file +3001 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 7944b188..de93e34e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: '3' services: master: container_name: salt_master - image: cdalvaro/saltstack-master:3000.3_2 + image: cdalvaro/saltstack-master:3001 restart: always volumes: - "roots/:/home/salt/data/srv" From 4233affdb680e451976bdb0a03e1fc7a482f0067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20=C3=81lvaro?= Date: Wed, 17 Jun 2020 19:21:29 +0200 Subject: [PATCH 7/8] doc: Update CHANGELOG.md --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4ecb838..12f0bd56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,14 @@ # 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/3000.3.html) for the list of changes in SaltStack. +Please refer to the SaltStack [Release Notes](https://docs.saltstack.com/en/latest/topics/releases/3001.html) for the list of changes in SaltStack. + +**3001** + +- Upgrade SaltStack 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** From 6f2f2fed781d0c69300760c7dd5185d2c6e879af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20=C3=81lvaro?= Date: Wed, 17 Jun 2020 19:27:19 +0200 Subject: [PATCH 8/8] fix: Mute sudo RLIMIT_CORE message --- assets/build/install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/build/install.sh b/assets/build/install.sh index 0b3b45db..275d7de0 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -15,6 +15,10 @@ BUILD_DEPENDENCIES=( apt-get update DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends "${BUILD_DEPENDENCIES[@]}" +# Mute sudo RLIMIT_CORE message -> Fixed in sudo 1.8.31p1 +echo "Muted sudo RLIMIT_CORE message" +echo "Set disable_coredump false" >> /etc/sudo.conf + # Create salt user echo "Creating ${SALT_USER} user ..." useradd -d "${SALT_HOME}" -ms /bin/bash -U -G root,sudo,shadow "${SALT_USER}"