Merge pull request #19 from cdalvaro/feature/add_healthcheck
Add healthcheck
This commit is contained in:
@@ -3,6 +3,11 @@
|
|||||||
This file only reflects the changes that are made in this image.
|
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.html) for the list of changes in SaltStack.
|
Please refer to the SaltStack [Release Notes](https://docs.saltstack.com/en/latest/topics/releases/3000.html) for the list of changes in SaltStack.
|
||||||
|
|
||||||
|
**3000_1**
|
||||||
|
|
||||||
|
- Add container healthcheck
|
||||||
|
- Change Docker base image to `ubuntu:bionic-20200311`
|
||||||
|
|
||||||
**3000**
|
**3000**
|
||||||
|
|
||||||
- Upgrade SaltStack Master to `3000` *Neon*
|
- Upgrade SaltStack Master to `3000` *Neon*
|
||||||
|
|||||||
15
Dockerfile
15
Dockerfile
@@ -1,4 +1,4 @@
|
|||||||
FROM ubuntu:bionic-20200112
|
FROM ubuntu:bionic-20200311
|
||||||
|
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
ARG VCS_REF
|
ARG VCS_REF
|
||||||
@@ -46,11 +46,6 @@ RUN apt-get update \
|
|||||||
COPY assets/build ${SALT_BUILD_DIR}
|
COPY assets/build ${SALT_BUILD_DIR}
|
||||||
RUN bash ${SALT_BUILD_DIR}/install.sh
|
RUN bash ${SALT_BUILD_DIR}/install.sh
|
||||||
|
|
||||||
# Shared resources
|
|
||||||
EXPOSE 4505/tcp 4506/tcp
|
|
||||||
RUN mkdir -p ${SALT_DATA_DIR} ${SALT_BASE_DIR} ${SALT_KEYS_DIR} ${SALT_CONFS_DIR} ${SALT_LOGS_DIR}
|
|
||||||
VOLUME [ "${SALT_BASE_DIR}" "${SALT_KEYS_DIR}" "${SALT_CONFS_DIR}" "${SALT_LOGS_DIR}" ]
|
|
||||||
|
|
||||||
COPY assets/runtime ${SALT_RUNTIME_DIR}
|
COPY assets/runtime ${SALT_RUNTIME_DIR}
|
||||||
RUN chmod -R +x ${SALT_RUNTIME_DIR}
|
RUN chmod -R +x ${SALT_RUNTIME_DIR}
|
||||||
|
|
||||||
@@ -61,6 +56,14 @@ RUN rm -rf ${SALT_BUILD_DIR}/*
|
|||||||
COPY entrypoint.sh /sbin/entrypoint.sh
|
COPY entrypoint.sh /sbin/entrypoint.sh
|
||||||
RUN chmod +x /sbin/entrypoint.sh
|
RUN chmod +x /sbin/entrypoint.sh
|
||||||
|
|
||||||
|
# Shared resources
|
||||||
|
EXPOSE 4505/tcp 4506/tcp
|
||||||
|
RUN mkdir -p ${SALT_DATA_DIR} ${SALT_BASE_DIR} ${SALT_KEYS_DIR} ${SALT_CONFS_DIR} ${SALT_LOGS_DIR}
|
||||||
|
VOLUME [ "${SALT_BASE_DIR}" "${SALT_KEYS_DIR}" "${SALT_CONFS_DIR}" "${SALT_LOGS_DIR}" ]
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=2m --timeout=30s --start-period=1m --retries=5 \
|
||||||
|
CMD [ "salt-call", "--local", "status.ping_master", "127.0.0.1" ]
|
||||||
|
|
||||||
LABEL \
|
LABEL \
|
||||||
maintainer="carlos@cdalvaro.io" \
|
maintainer="carlos@cdalvaro.io" \
|
||||||
org.label-schema.vendor=cdalvaro \
|
org.label-schema.vendor=cdalvaro \
|
||||||
|
|||||||
24
README.md
24
README.md
@@ -1,4 +1,4 @@
|
|||||||
# SaltStack Master v3000
|
# SaltStack Master v3000_1
|
||||||
|
|
||||||
Dockerfile to build a [SaltStack](https://www.saltstack.com) Master image for the Docker opensource container platform.
|
Dockerfile to build a [SaltStack](https://www.saltstack.com) Master image for the Docker opensource container platform.
|
||||||
|
|
||||||
@@ -30,15 +30,21 @@ 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.
|
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
|
```sh
|
||||||
docker pull cdalvaro/saltstack-master:3000
|
docker pull cdalvaro/saltstack-master:3000_1
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also pull the latest tag which is built from the repository HEAD
|
You can also pull the latest tag which is built from the repository `HEAD`
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker pull cdalvaro/saltstack-master:latest
|
docker pull cdalvaro/saltstack-master:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
|
or from [Quay.io](https://quay.io/repository/cdalvaro/saltstack-master) too.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker pull quay.io/cdalvaro/saltstack-master:latest
|
||||||
|
```
|
||||||
|
|
||||||
Alternatively you can build the image locally.
|
Alternatively you can build the image locally.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -67,7 +73,7 @@ docker run --name salt_master --detach \
|
|||||||
--env 'SALT_LOG_LEVEL=info' \
|
--env 'SALT_LOG_LEVEL=info' \
|
||||||
--volume $(pwd)/roots/:/home/salt/data/srv/ \
|
--volume $(pwd)/roots/:/home/salt/data/srv/ \
|
||||||
--volume $(pwd)/keys/:/home/salt/data/keys/ \
|
--volume $(pwd)/keys/:/home/salt/data/keys/ \
|
||||||
cdalvaro/saltstack-master:3000
|
cdalvaro/saltstack-master:3000_1
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
@@ -91,7 +97,7 @@ docker run --name salt_master -d \
|
|||||||
--env 'SALT_LOG_LEVEL=info' \
|
--env 'SALT_LOG_LEVEL=info' \
|
||||||
--volume $(pwd)/roots/:/home/salt/data/srv/ \
|
--volume $(pwd)/roots/:/home/salt/data/srv/ \
|
||||||
--volume $(pwd)/keys/:/home/salt/data/keys/ \
|
--volume $(pwd)/keys/:/home/salt/data/keys/ \
|
||||||
cdalvaro/saltstack-master:3000
|
cdalvaro/saltstack-master:3000_1
|
||||||
```
|
```
|
||||||
|
|
||||||
### Master Signed Keys
|
### Master Signed Keys
|
||||||
@@ -105,7 +111,7 @@ docker run --name salt_stack --detach \
|
|||||||
--env 'SALT_MASTER_SIGN_PUBKEY=True'
|
--env 'SALT_MASTER_SIGN_PUBKEY=True'
|
||||||
--volume $(pwd)/roots/:/home/salt/data/srv/ \
|
--volume $(pwd)/roots/:/home/salt/data/srv/ \
|
||||||
--volume $(pwd)/keys/:/home/salt/data/keys/ \
|
--volume $(pwd)/keys/:/home/salt/data/keys/ \
|
||||||
cdalvaro/saltstack-master:3000
|
cdalvaro/saltstack-master:3000_1
|
||||||
```
|
```
|
||||||
|
|
||||||
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).
|
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).
|
||||||
@@ -131,7 +137,7 @@ docker run --name salt_stack -it --rm \
|
|||||||
--env "USERMAP_UID=$(id -u)" --env "USERMAP_GID=$(id -g)" \
|
--env "USERMAP_UID=$(id -u)" --env "USERMAP_GID=$(id -g)" \
|
||||||
--volume $(pwd)/roots/:/home/salt/data/srv/ \
|
--volume $(pwd)/roots/:/home/salt/data/srv/ \
|
||||||
--volume $(pwd)/keys/:/home/salt/data/keys/ \
|
--volume $(pwd)/keys/:/home/salt/data/keys/ \
|
||||||
cdalvaro/saltstack-master:3000
|
cdalvaro/saltstack-master:3000_1
|
||||||
```
|
```
|
||||||
|
|
||||||
### Git Fileserver
|
### Git Fileserver
|
||||||
@@ -187,7 +193,7 @@ docker run --name salt_master --detach \
|
|||||||
--volume $(pwd)/roots/:/home/salt/data/srv/ \
|
--volume $(pwd)/roots/:/home/salt/data/srv/ \
|
||||||
--volume $(pwd)/keys/:/home/salt/data/keys/ \
|
--volume $(pwd)/keys/:/home/salt/data/keys/ \
|
||||||
--volume $(pwd)/logs/:/home/salt/data/logs/ \
|
--volume $(pwd)/logs/:/home/salt/data/logs/ \
|
||||||
cdalvaro/saltstack-master:3000
|
cdalvaro/saltstack-master:3000_1
|
||||||
```
|
```
|
||||||
|
|
||||||
Check [Available Configuration Parameters](#available-configuration-parameters) section for configuring logrotate.
|
Check [Available Configuration Parameters](#available-configuration-parameters) section for configuring logrotate.
|
||||||
@@ -233,7 +239,7 @@ docker run --name salt_master -d \
|
|||||||
--volume $(pwd)/roots/:/home/salt/data/srv/ \
|
--volume $(pwd)/roots/:/home/salt/data/srv/ \
|
||||||
--volume $(pwd)/keys/:/home/salt/data/keys/ \
|
--volume $(pwd)/keys/:/home/salt/data/keys/ \
|
||||||
--volume $(pwd)/config/:/home/salt/data/config/ \
|
--volume $(pwd)/config/:/home/salt/data/config/ \
|
||||||
cdalvaro/saltstack-master:3000
|
cdalvaro/saltstack-master:3000_1
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
master:
|
master:
|
||||||
container_name: salt_master
|
container_name: salt_master
|
||||||
image: cdalvaro/saltstack-master:3000
|
image: cdalvaro/saltstack-master:3000_1
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- "roots/:/home/salt/data/srv"
|
- "roots/:/home/salt/data/srv"
|
||||||
|
|||||||
Reference in New Issue
Block a user