Skip to content

Commit

Permalink
Merge pull request #13 from cdalvaro/upgrade-to-v2018.3.4
Browse files Browse the repository at this point in the history
Upgrade to v2018.3.4
  • Loading branch information
cdalvaro authored Feb 23, 2019
2 parents 5dc5fdf + de47fb2 commit c0f98bc
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 24 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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**

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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" \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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).
Expand All @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2018.3.3
2018.3.4
2 changes: 1 addition & 1 deletion assets/build/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c0f98bc

Please sign in to comment.