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: 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** diff --git a/Dockerfile b/Dockerfile index 7b7fc199..98894858 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ -FROM ubuntu:bionic-20200403 +FROM ubuntu:focal-20200606 ARG BUILD_DATE ARG VCS_REF # https://github.com/saltstack/salt/releases -ENV SALT_VERSION="3000.3" \ - PYTHON_VERSION="3.6" \ +ENV SALT_VERSION="3001" \ + 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" 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..." diff --git a/README.md b/README.md index 76dae947..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,10 +497,10 @@ 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-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 +510,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 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/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}" 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"