diff --git a/CHANGELOG.md b/CHANGELOG.md index 093d68a..68eab5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,12 @@ # 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/develop/topics/releases/2018.3.3.html) for the list of changes in SaltStack. +Please refer to the SaltStack [Release Notes](https://docs.saltstack.com/en/develop/topics/releases/2018.3.4.html) for the list of changes in SaltStack. + +**2018.3.4** + +- Upgrade SaltStack Master to `2018.3.4` +- Change Docker base image to `ubuntu:xenial-20190122` **2018.3.3** diff --git a/Dockerfile b/Dockerfile index 6960ec9..ee9fae1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM ubuntu:xenial-20181113 +FROM ubuntu:xenial-20190122 ARG BUILD_DATE ARG VCS_REF # https://github.com/saltstack/salt/releases -ENV SALT_VERSION="2018.3.3" \ +ENV SALT_VERSION="2018.3.4" \ PYTHON_VERSION="3.5" \ LIBSSH2_VERSION="1.8.0" \ LIBGIT2_VERSION="0.27.7" \ diff --git a/Makefile b/Makefile index d979070..9c3283d 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ quickstart: --publish=4505:4505/tcp --publish=4506:4506/tcp \ --env "USERMAP_UID=$(shell id -u)" --env "USERMAP_GID=$(shell id -g)" \ --env SALT_LOG_LEVEL=info \ - --volume $(shell pwd)/recipes/:/home/salt/data/srv/ \ + --volume $(shell pwd)/roots/:/home/salt/data/srv/ \ --volume $(shell pwd)/keys/:/home/salt/data/keys/ \ --volume $(shell pwd)/logs/:/home/salt/data/logs/ \ cdalvaro/saltstack-master:latest diff --git a/README.md b/README.md index f76c87f..0c50199 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# SaltStack Master v2018.3.3 +# SaltStack Master v2018.3.4 Dockerfile to build a [SaltStack](https://www.saltstack.com) Master image for the Docker opensource container platform. @@ -30,7 +30,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:2018.3.3 +docker pull cdalvaro/saltstack-master:2018.3.4 ``` You can also pull the latest tag which is built from the repository HEAD @@ -65,16 +65,16 @@ Alternatively, you can manually launch the `saltstack-master` container: docker run --name salt_master --detach \ --publish 4505:4505/tcp --publish 4506:4506/tcp \ --env 'SALT_LOG_LEVEL=info' \ - --volume $(pwd)/recipes/:/home/salt/data/srv/ \ + --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ - cdalvaro/saltstack-master:2018.3.3 + cdalvaro/saltstack-master:2018.3.4 ``` ## Configuration ### Custom Recipes -In order to provide salt with your custom recipes you must mount the volume `/home/salt/data/srv/` with your recipes directory. +In order to provide salt with your custom recipes you must mount the volume `/home/salt/data/srv/` with your `roots` directory. ### Minion Keys @@ -89,9 +89,9 @@ rsync root@minion1:/etc/salt/pki/minion/minion.pub keys/minions/minion1 docker run --name salt_master -d \ --publish 4505:4505/tcp --publish 4506:4506/tcp \ --env 'SALT_LOG_LEVEL=info' \ - --volume $(pwd)/recipes/:/home/salt/data/srv/ \ + --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ - cdalvaro/saltstack-master:2018.3.3 + cdalvaro/saltstack-master:2018.3.4 ``` ### Master Signed Keys @@ -103,9 +103,9 @@ docker run --name salt_stack --detach \ --publish 4505:4505/tcp --publish 4506:4506/tcp \ --env 'SALT_LOG_LEVEL=info' \ --env 'SALT_MASTER_SIGN_PUBKEY=True' - --volume $(pwd)/recipes/:/home/salt/data/srv/ \ + --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ - cdalvaro/saltstack-master:2018.3.3 + cdalvaro/saltstack-master:2018.3.4 ``` The container will create the `master_sign` key and its signature. More information about how to configure the minion service can be found [here](https://docs.saltstack.com/en/latest/topics/tutorials/multimaster_pki.html#prepping-the-minion-to-verify-received-public-keys). @@ -115,7 +115,7 @@ 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:2018.3.3 app:gen-signed-keys other_master_sign + cdalvaro/saltstack-master:2018.3.4 app:gen-signed-keys other_master_sign ``` The newly created keys will appear inside `keys/generated/other_master_sign` directory. @@ -129,9 +129,9 @@ Also the container processes seem to be executed as the host's user/group `1000` ```sh docker run --name salt_stack -it --rm \ --env "USERMAP_UID=$(id -u)" --env "USERMAP_GID=$(id -g)" \ - --volume $(pwd)/recipes/:/home/salt/data/srv/ \ + --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ - cdalvaro/saltstack-master:2018.3.3 + cdalvaro/saltstack-master:2018.3.4 ``` ### Git Fileserver @@ -183,10 +183,10 @@ Inside that directory you could find `supervisor/` logs and `salt/` logs: docker run --name salt_master --detach \ --publish 4505:4505/tcp --publish 4506:4506/tcp \ --env 'SALT_LOG_LEVEL=info' \ - --volume $(pwd)/recipes/:/home/salt/data/srv/ \ + --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ --volume $(pwd)/logs/:/home/salt/data/logs/ \ - cdalvaro/saltstack-master:2018.3.3 + cdalvaro/saltstack-master:2018.3.4 Check [Available Configuration Parameters](#available-configuration-parameters) section for configuring logrotate. @@ -228,10 +228,10 @@ EOF docker run --name salt_master -d \ --publish 3505:3505/tcp --publish 3506:3506/tcp \ --env 'SALT_LOG_LEVEL=info' \ - --volume $(pwd)/recipes/:/home/salt/data/srv/ \ + --volume $(pwd)/roots/:/home/salt/data/srv/ \ --volume $(pwd)/keys/:/home/salt/data/keys/ \ --volume $(pwd)/config/:/home/salt/data/config/ \ - cdalvaro/saltstack-master:2018.3.3 + cdalvaro/saltstack-master:2018.3.4 ``` ## Usage diff --git a/VERSION b/VERSION index 7ef9ef2..5f1fbee 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2018.3.3 \ No newline at end of file +2018.3.4 \ No newline at end of file diff --git a/assets/build/install.sh b/assets/build/install.sh index 313bafa..e7389c6 100755 --- a/assets/build/install.sh +++ b/assets/build/install.sh @@ -62,7 +62,7 @@ SALT_BOOTSTRAP_OPTS="-M -N -X -P -x python${PYTHON_VERSION}" echo "Installing saltstack ..." wget -O bootstrap-salt.sh https://bootstrap.saltstack.com -sh bootstrap-salt.sh ${SALT_BOOTSTRAP_OPTS} stable ${SALT_VERSION} +sh bootstrap-salt.sh ${SALT_BOOTSTRAP_OPTS} git v${SALT_VERSION} chown -R ${SALT_USER}: ${SALT_ROOT_DIR} # Configure ssh diff --git a/docker-compose.yml b/docker-compose.yml index 944ee3a..7769673 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,10 +3,10 @@ version: '3' services: master: container_name: salt_master - image: cdalvaro/saltstack-master:2018.3.3 + image: cdalvaro/saltstack-master:2018.3.4 restart: always volumes: - - "recipes/:/home/salt/data/srv" + - "roots/:/home/salt/data/srv" - "keys/:/home/salt/data/keys" - "logs/:/home/salt/data/logs" ports: