doc: Update README.md
This commit is contained in:
232
README.md
232
README.md
@@ -11,39 +11,16 @@
|
||||
|
||||
Dockerfile to build a [Salt Project](https://saltproject.io) Master image for the Docker opensource container platform.
|
||||
|
||||
`salt-master` is installed inside the Docker image using git source as documented in the the [official bootstrap](https://docs.saltproject.io/en/latest/topics/tutorials/salt_bootstrap.html) documentation.
|
||||
`salt-master` is installed inside the Docker image using git source as documented in
|
||||
the [official bootstrap](https://docs.saltproject.io/en/latest/topics/tutorials/salt_bootstrap.html) documentation.
|
||||
|
||||
For other methods to install `salt-master` please refer to the [Official Salt Project Installation Guide](https://docs.saltproject.io/en/latest/topics/installation/index.html).
|
||||
For other methods to install `salt-master` please refer to
|
||||
the [Official Salt Project Installation Guide](https://docs.saltproject.io/en/latest/topics/installation/index.html).
|
||||
|
||||
## Table of Contents
|
||||
## 🐳 Installation
|
||||
|
||||
- [Installation](#installation)
|
||||
- [Changelog](CHANGELOG.md)
|
||||
- [Quick Start](#quick-start)
|
||||
- [Configuration](#configuration)
|
||||
- [Custom Configuration](#custom-configuration)
|
||||
- [Custom States](#custom-states)
|
||||
- [Minion Keys](#minion-keys)
|
||||
- [Master Signed Keys](#master-signed-keys)
|
||||
- [Salt API](#salt-api)
|
||||
- [Salt Pepper](#salt-pepper)
|
||||
- [Host Mapping](#host-mapping)
|
||||
- [Git Fileserver](#git-fileserver)
|
||||
- [GitPython](#gitpython)
|
||||
- [PyGit2](#pygit2)
|
||||
- [3rd Party Formulas](#3rd-party-formulas)
|
||||
- [Logs](#logs)
|
||||
- [Healthcheck](#healthcheck)
|
||||
- [Autoheal](#autoheal)
|
||||
- [Available Configuration Parameters](#available-configuration-parameters)
|
||||
- [Usage](#usage)
|
||||
- [Shell Access](#shell-access)
|
||||
- [Restart Services](#restart-services)
|
||||
- [References](#references)
|
||||
|
||||
## Installation
|
||||
|
||||
Automated builds of the image are available on [Dockerhub](https://hub.docker.com/r/cdalvaro/docker-salt-master/) and is the recommended method of installation.
|
||||
Automated builds of the image are available on [Dockerhub](https://hub.docker.com/r/cdalvaro/docker-salt-master/) and is
|
||||
the recommended method of installation.
|
||||
|
||||
```sh
|
||||
docker pull cdalvaro/docker-salt-master:3005
|
||||
@@ -55,7 +32,8 @@ You can also pull the latest tag which is built from the repository `HEAD`
|
||||
docker pull cdalvaro/docker-salt-master:latest
|
||||
```
|
||||
|
||||
These images are also available from [GitHub Container Registry](https://github.com/users/cdalvaro/packages/container/package/docker-salt-master):
|
||||
These images are also available
|
||||
from [GitHub Container Registry](https://github.com/users/cdalvaro/packages/container/package/docker-salt-master):
|
||||
|
||||
```sh
|
||||
docker pull ghcr.io/cdalvaro/docker-salt-master:latest
|
||||
@@ -73,7 +51,7 @@ Alternatively, you can build the image locally using `make` command:
|
||||
make release
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
## 🚀 Quick Start
|
||||
|
||||
The quickest way to get started is using [docker-compose](https://docs.docker.com/compose/).
|
||||
|
||||
@@ -98,13 +76,16 @@ docker run --name salt_master --detach \
|
||||
cdalvaro/docker-salt-master:latest
|
||||
```
|
||||
|
||||
## Configuration
|
||||
## ⚙️ Configuration
|
||||
|
||||
### Custom Configuration
|
||||
|
||||
This image uses its own `master.yml` file to configure `salt-master` to run properly inside the container. However, you can still tune other configuration parameters to fit your needs by adding your configuration files into a `config/` directory and mounting it into `/home/salt/data/config/`.
|
||||
This image uses its own `master.yml` file to configure `salt-master` to run properly inside the container. However, you
|
||||
can still tune other configuration parameters to fit your needs by adding your configuration files into a `config/`
|
||||
directory and mounting it into `/home/salt/data/config/`.
|
||||
|
||||
For example, you can customize the [Reactor System](https://docs.saltproject.io/en/latest/topics/reactor/index.html) by adding a `reactor.conf` file to `config/`:
|
||||
For example, you can customize the [Reactor System](https://docs.saltproject.io/en/latest/topics/reactor/index.html) by
|
||||
adding a `reactor.conf` file to `config/`:
|
||||
|
||||
```sls
|
||||
# config/reactor.conf
|
||||
@@ -139,13 +120,16 @@ This support is disabled by default, but it can be enabled by setting the
|
||||
|
||||
### Custom States
|
||||
|
||||
In order to provide salt with your custom states you must mount the volume `/home/salt/data/srv/` with your `roots` directory inside it.
|
||||
In order to provide salt with your custom states you must mount the volume `/home/salt/data/srv/` with your `roots`
|
||||
directory inside it.
|
||||
|
||||
### Minion Keys
|
||||
|
||||
Minion keys can be added automatically on startup to `docker-salt-master` by mounting the volume `/home/salt/data/keys` and copying the minion keys inside `keys/minions/` directory.
|
||||
Minion keys can be added automatically on startup to `docker-salt-master` by mounting the volume `/home/salt/data/keys`
|
||||
and copying the minion keys inside `keys/minions/` directory.
|
||||
|
||||
It is also important to know that, in order to keep your keys after removing the container, the keys directory must be mounted.
|
||||
It is also important to know that, in order to keep your keys after removing the container, the keys directory must be
|
||||
mounted.
|
||||
|
||||
```sh
|
||||
mkdir -p keys/minions
|
||||
@@ -160,14 +144,17 @@ docker run --name salt_master -d \
|
||||
cdalvaro/docker-salt-master:latest
|
||||
```
|
||||
|
||||
Also, you can set your `docker-salt-master` instance to autoaccept minions that match certain grains. To do that, add the `autosign_grains.conf` to your `config` directory:
|
||||
Also, you can set your `docker-salt-master` instance to autoaccept minions that match certain grains. To do that, add
|
||||
the `autosign_grains.conf` to your `config` directory:
|
||||
|
||||
```sls
|
||||
# config/autosign_grains.conf
|
||||
autosign_grains_dir: /home/salt/data/srv/autosign_grains
|
||||
```
|
||||
|
||||
Then, inside `roots/autosign_grains` you can place a file named like the grain you want to match and fill it with the content to match. For example, if you want to autoaccept minions that belong to specific domains, you have to add the `domain` file with the domains you want to allow:
|
||||
Then, inside `roots/autosign_grains` you can place a file named like the grain you want to match and fill it with the
|
||||
content to match. For example, if you want to autoaccept minions that belong to specific domains, you have to add
|
||||
the `domain` file with the domains you want to allow:
|
||||
|
||||
```sls
|
||||
# roots/autosign_grains/domain
|
||||
@@ -175,14 +162,16 @@ cdalvaro.io
|
||||
cdalvaro.com
|
||||
```
|
||||
|
||||
It is possible that you have to configure the minion to send the specific grains to the master in the minion config file:
|
||||
It is possible that you have to configure the minion to send the specific grains to the master in the minion config
|
||||
file:
|
||||
|
||||
```sls
|
||||
autosign_grains:
|
||||
- domain
|
||||
```
|
||||
|
||||
More info at: [Salt Project - Autoaccept Minions From Grains](https://docs.saltproject.io/en/latest/topics/tutorials/autoaccept_grains.html)
|
||||
More info
|
||||
at: [Salt Project - Autoaccept Minions From Grains](https://docs.saltproject.io/en/latest/topics/tutorials/autoaccept_grains.html)
|
||||
|
||||
### Master Signed Keys
|
||||
|
||||
@@ -198,7 +187,10 @@ docker run --name salt_stack --detach \
|
||||
cdalvaro/docker-salt-master:latest
|
||||
```
|
||||
|
||||
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.saltproject.io/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.saltproject.io/en/latest/topics/tutorials/multimaster_pki.html#prepping-the-minion-to-verify-received-public-keys)
|
||||
.
|
||||
|
||||
Additionally, you can generate new keys by executing the following command:
|
||||
|
||||
@@ -215,7 +207,8 @@ The newly created keys will appear inside `keys/generated/new_master_sign` direc
|
||||
|
||||
You can enable `salt-api` service by setting env variable `SALT_API_SERVICE_ENABLED` to `True`.
|
||||
|
||||
A self-signed SSL certificate will be automatically generated and the following configuration will be added to the master configuration file:
|
||||
A self-signed SSL certificate will be automatically generated and the following configuration will be added to the
|
||||
master configuration file:
|
||||
|
||||
```yml
|
||||
rest_cherrypy:
|
||||
@@ -224,7 +217,8 @@ rest_cherrypy:
|
||||
ssl_key: /etc/pki/tls/certs/docker-salt-master.key
|
||||
```
|
||||
|
||||
The container exposes port `8000` by default, although you can map this port to whatever port you like in your `docker run` command:
|
||||
The container exposes port `8000` by default, although you can map this port to whatever port you like in
|
||||
your `docker run` command:
|
||||
|
||||
```sh
|
||||
docker run --name salt_stack --detach \
|
||||
@@ -237,15 +231,20 @@ docker run --name salt_stack --detach \
|
||||
cdalvaro/docker-salt-master:latest
|
||||
```
|
||||
|
||||
If you choose using the [docker-compose.yml](docker-compose.yml) to manage your salt-master instance, uncomment salt-api settings to enable and configure the service.
|
||||
If you choose using the [docker-compose.yml](docker-compose.yml) to manage your salt-master instance, uncomment salt-api
|
||||
settings to enable and configure the service.
|
||||
|
||||
By default, user `salt_api` is created and you can set its password by setting the environment variable `SALT_API_USER_PASS`.
|
||||
By default, user `salt_api` is created, and you can set its password by setting the environment
|
||||
variable `SALT_API_USER_PASS`.
|
||||
|
||||
You can also change the salt-api _username_ by setting `SALT_API_USER`. It is possible to disable this user by explicitly setting this variable to an empty string: `SALT_API_USER=''` if you are going to use an `LDAP` server.
|
||||
You can also change the salt-api _username_ by setting `SALT_API_USER`. It is possible to disable this user by
|
||||
explicitly setting this variable to an empty string: `SALT_API_USER=''` if you are going to use an `LDAP` server.
|
||||
|
||||
As a security measure, if `SALT_API_SERVICE_ENABLED` is set to `True` and you don't disable `SALT_API_USER`, you'll be required to set `SALT_API_USER_PASS`. Otherwise initialization will fail and your Docker image won't work.
|
||||
As a security measure, if `SALT_API_SERVICE_ENABLED` is set to `True` and you don't disable `SALT_API_USER`, you'll be
|
||||
required to set `SALT_API_USER_PASS`. Otherwise, initialization will fail and your Docker image won't work.
|
||||
|
||||
With all that set, you'll be able to provide your _salt-api_ custom configuration by creating the `salt-api.conf` file inside your `conf` directory:
|
||||
With all that set, you'll be able to provide your _salt-api_ custom configuration by creating the `salt-api.conf` file
|
||||
inside your `conf` directory:
|
||||
|
||||
```yml
|
||||
external_auth:
|
||||
@@ -257,13 +256,16 @@ external_auth:
|
||||
- "@jobs"
|
||||
```
|
||||
|
||||
More information is available in the following link: [External Authentication System (eAuth)](https://docs.saltproject.io/en/latest/topics/eauth/index.html#acl-eauth).
|
||||
More information is available in the following
|
||||
link: [External Authentication System (eAuth)](https://docs.saltproject.io/en/latest/topics/eauth/index.html#acl-eauth).
|
||||
|
||||
Now you have your docker-salt-master docker image ready to accept external authentications and to connect external tools such as [`saltstack/pepper`](https://github.com/saltstack/pepper).
|
||||
Now you have your docker-salt-master docker image ready to accept external authentications and to connect external tools
|
||||
such as [`saltstack/pepper`](https://github.com/saltstack/pepper).
|
||||
|
||||
#### Salt Pepper
|
||||
|
||||
The pepper CLI script allows users to execute Salt commands from computers that are external to computers running the salt-master or salt-minion daemons as though they were running Salt locally
|
||||
The pepper CLI script allows users to execute Salt commands from computers that are external to computers running the
|
||||
salt-master or salt-minion daemons as though they were running Salt locally
|
||||
|
||||
##### Installation:
|
||||
|
||||
@@ -285,7 +287,7 @@ SALTAPI_EAUTH=pam
|
||||
|
||||
##### Usage
|
||||
|
||||
Beging executing salt states with `pepper`:
|
||||
Begin executing salt states with `pepper`:
|
||||
|
||||
```sh
|
||||
pepper '*' test.ping
|
||||
@@ -293,9 +295,14 @@ pepper '*' test.ping
|
||||
|
||||
### Host Mapping
|
||||
|
||||
Per default the container is configured to run `salt-master` as user and group `salt` with `uid` and `gid` `1000`. From the host it appears as if the mounted data volumes are owned by the host's user/group `1000` and maybe leading to unfavorable effects.
|
||||
Per default the container is configured to run `salt-master` as user and group `salt` with `uid` and `gid` `1000`. From
|
||||
the host it appears as if the mounted data volumes are owned by the host's user/group `1000` and maybe leading to
|
||||
unfavorable effects.
|
||||
|
||||
Also the container processes seem to be executed as the host's user/group `1000`. The container can be configured to map the uid and gid of git to different ids on host by passing the environment variables `PUID` and `PGID`. The following command maps the ids to the current user and group on the host.
|
||||
Also, the container processes seem to be executed as the host's user/group `1000`. The container can be configured to
|
||||
map
|
||||
the uid and gid of git to different ids on host by passing the environment variables `PUID` and `PGID`. The following
|
||||
command maps the ids to the current user and group on the host.
|
||||
|
||||
```sh
|
||||
docker run --name salt_stack -it --rm \
|
||||
@@ -308,13 +315,19 @@ docker run --name salt_stack -it --rm \
|
||||
|
||||
### Git Fileserver
|
||||
|
||||
This image uses [GitPython](https://github.com/gitpython-developers/GitPython) and [PyGit2](https://www.pygit2.org) as gitfs backends to allow Salt to serve files from git repositories.
|
||||
This image uses [GitPython](https://github.com/gitpython-developers/GitPython) and [PyGit2](https://www.pygit2.org) as
|
||||
gitfs backends to allow Salt to serve files from git repositories.
|
||||
|
||||
It can be enabled by adding `gitfs` to the [`fileserver_backend`](https://docs.saltproject.io/en/latest/ref/configuration/master.html#std:conf_master-fileserver_backend) list (see [Available Configuration Parameters](#available-configuration-parameters)), and configuring one or more repositories in [`gitfs_remotes`](https://docs.saltproject.io/en/latest/ref/configuration/master.html#std:conf_master-gitfs_remotes).
|
||||
It can be enabled by adding `gitfs` to
|
||||
the [`fileserver_backend`](https://docs.saltproject.io/en/latest/ref/configuration/master.html#std:conf_master-fileserver_backend)
|
||||
list (see [Available Configuration Parameters](#available-configuration-parameters)), and configuring one or more
|
||||
repositories
|
||||
in [`gitfs_remotes`](https://docs.saltproject.io/en/latest/ref/configuration/master.html#std:conf_master-gitfs_remotes).
|
||||
|
||||
#### GitPython
|
||||
|
||||
The default name for the ssh key is `gitfs_ssh` but it can be changed with the env variables `SALT_GITFS_SSH_PRIVATE_KEY` and `SALT_GITFS_SSH_PUBLIC_KEY`.
|
||||
The default name for the ssh key is `gitfs_ssh` but it can be changed with the env
|
||||
variables `SALT_GITFS_SSH_PRIVATE_KEY` and `SALT_GITFS_SSH_PUBLIC_KEY`.
|
||||
|
||||
This keys must be placed inside `/home/salt/data/keys` directory.
|
||||
|
||||
@@ -326,7 +339,8 @@ You can create an ssh key for pygit2 with the following command:
|
||||
ssh-keygen -f gitfs_ssh -C 'gitfs@example.com'
|
||||
```
|
||||
|
||||
Place it wherever you want inside the container and specify its path with the configuration parameters: `gitfs_pubkey` and `gitfs_privkey` in your `.conf` file.
|
||||
Place it wherever you want inside the container and specify its path with the configuration parameters: `gitfs_pubkey`
|
||||
and `gitfs_privkey` in your `.conf` file.
|
||||
|
||||
For example:
|
||||
|
||||
@@ -369,18 +383,26 @@ gitfs_remotes:
|
||||
- https://github.com/aokiji/salt-formula-helm.git
|
||||
```
|
||||
|
||||
This is the [Salt recommended](https://docs.saltproject.io/en/latest/topics/development/conventions/formulas.html#adding-a-formula-as-a-gitfs-remote) way of doing it, and you can go to the [Git Fileserver](#git-fileserver) section on this document if you need help configuring this service.
|
||||
This is
|
||||
the [Salt recommended](https://docs.saltproject.io/en/latest/topics/development/conventions/formulas.html#adding-a-formula-as-a-gitfs-remote)
|
||||
way of doing it, and you can go to the [Git Fileserver](#git-fileserver) section on this document if you need help
|
||||
configuring this service.
|
||||
|
||||
You can find a great set of formulas on the following GitHub repositories:
|
||||
|
||||
- [Official Salt Formulas](https://github.com/saltstack-formulas)
|
||||
- [Unofficial Salt Formulas](https://github.com/salt-formulas)
|
||||
|
||||
Although, as mention in [Salt Project documentation](https://docs.saltproject.io/en/latest/topics/development/conventions/formulas.html#adding-a-formula-as-a-gitfs-remote), you are encouraged to fork desired formulas to avoid unexpected changes to your infrastructure.
|
||||
Although, as mention
|
||||
in [Salt Project documentation](https://docs.saltproject.io/en/latest/topics/development/conventions/formulas.html#adding-a-formula-as-a-gitfs-remote)
|
||||
, you are encouraged to fork desired formulas to avoid unexpected changes to your infrastructure.
|
||||
|
||||
However, sometimes you may need to load some formulas that are not available on a git repository and you want to have them separated from your main `srv` directory.
|
||||
However, sometimes you may need to load some formulas that are not available on a git repository, and you want to have
|
||||
them separated from your main `srv` directory.
|
||||
|
||||
For that case, you can mount a volume containing all your third party formulas separated in subdirectories into `/home/salt/data/3pfs/`, and they will be automatically added to the master configuration when your container starts.
|
||||
For that case, you can mount a volume containing all your third party formulas separated in subdirectories
|
||||
into `/home/salt/data/3pfs/`, and they will be automatically added to the master configuration when your container
|
||||
starts.
|
||||
|
||||
```sh
|
||||
# 3pfs directory content
|
||||
@@ -406,7 +428,8 @@ If you need to add more third party formulas, you can restart the container, or
|
||||
docker exec -it salt_stack /sbin/entrypoint.sh app:reload-3rd-formulas
|
||||
```
|
||||
|
||||
`file_roots` base configuration file will be updated with current existing formulas and `salt-master` service will be restarted to reload the new configuration.
|
||||
`file_roots` base configuration file will be updated with current existing formulas and `salt-master` service will be
|
||||
restarted to reload the new configuration.
|
||||
|
||||
### Logs
|
||||
|
||||
@@ -428,9 +451,13 @@ Check [Available Configuration Parameters](#available-configuration-parameters)
|
||||
|
||||
### Healthcheck
|
||||
|
||||
This image includes a [health check](https://docs.docker.com/engine/reference/builder/#healthcheck) script: `/usr/local/sbin/healthcheck` (although it is disable by default). It is useful to check if the `salt-master` service is alive and responding.
|
||||
This image includes a [health check](https://docs.docker.com/engine/reference/builder/#healthcheck)
|
||||
script: `/usr/local/sbin/healthcheck` (although it is disabled by default). It is useful to check if the `salt-master`
|
||||
service is alive and responding.
|
||||
|
||||
If you are running this image under k8s, you can define a _liveness command_ as explained [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command).
|
||||
If you are running this image under k8s, you can define a _liveness command_ as
|
||||
explained [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-a-liveness-command)
|
||||
.
|
||||
|
||||
If you use `docker-compose` as your container orchestrator, you can add the following entries to your compose file:
|
||||
|
||||
@@ -442,11 +469,12 @@ services:
|
||||
container_name: salt_master
|
||||
image: cdalvaro/docker-salt-master:latest
|
||||
healthcheck:
|
||||
test: ["CMD", "/usr/local/sbin/healthcheck"]
|
||||
test: [ "CMD", "/usr/local/sbin/healthcheck" ]
|
||||
start_period: 30s
|
||||
```
|
||||
|
||||
(More info available at [compose file](https://docs.docker.com/compose/compose-file/#healthcheck) official documentation)
|
||||
(More info available at [compose file](https://docs.docker.com/compose/compose-file/#healthcheck) official
|
||||
documentation)
|
||||
|
||||
Or, if you launch your container [with docker](https://docs.docker.com/engine/reference/run/#healthcheck):
|
||||
|
||||
@@ -487,7 +515,9 @@ Then, the output will be something similar to this:
|
||||
|
||||
#### Autoheal
|
||||
|
||||
If you run your _docker-salt-master_ instance with healthcheck enabled, you can use [willfarrell/autoheal](https://github.com/willfarrell/docker-autoheal) image to restart your service when healthcheck fails:
|
||||
If you run your _docker-salt-master_ instance with healthcheck enabled, you can
|
||||
use [willfarrell/autoheal](https://github.com/willfarrell/docker-autoheal) image to restart your service when
|
||||
healthcheck fails:
|
||||
|
||||
```sh
|
||||
docker run -d \
|
||||
@@ -502,12 +532,15 @@ This container will watch your containers and restart your failing instances.
|
||||
|
||||
### Available Configuration Parameters
|
||||
|
||||
Please refer the docker run command options for the `--env-file` flag where you can specify all required environment variables in a single file. This will save you from writing a potentially long docker run command. Alternatively you can use docker-compose.
|
||||
Please refer the docker run command options for the `--env-file` flag where you can specify all required environment
|
||||
variables in a single file. This will save you from writing a potentially long docker run command. Alternatively you can
|
||||
use docker-compose.
|
||||
|
||||
Below you can find a list with the available options that can be used to customize your `docker-salt-master` installation.
|
||||
Below you can find a list with the available options that can be used to customize your `docker-salt-master`
|
||||
installation.
|
||||
|
||||
| Parameter | Description |
|
||||
| :------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
|:--------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `DEBUG` | Set this to `True` to enable entrypoint debugging. |
|
||||
| `TIMEZONE` / `TZ` | Set the container timezone. Defaults to `UTC`. Values are expected to be in Canonical format. Example: `Europe/Madrid`. See the list of [acceptable values](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). |
|
||||
| `PUID` | Sets the uid for user `salt` to the specified uid. Default: `1000`. |
|
||||
@@ -531,7 +564,9 @@ Below you can find a list with the available options that can be used to customi
|
||||
| [`SALT_REACTOR_WORKER_THREADS`](https://docs.saltproject.io/en/latest/ref/configuration/master.html#reactor-worker-threads) | The number of workers for the runner/wheel in the reactor. Default: `10`. |
|
||||
| [`SALT_WORKER_THREADS`](https://docs.saltproject.io/en/latest/ref/configuration/master.html#worker-threads) | The number of threads to start for receiving commands and replies from minions. Default: `5`. |
|
||||
|
||||
Any parameter not listed in the above table and available in the following [link](https://docs.saltproject.io/en/latest/ref/configuration/examples.html#configuration-examples-master), can be set by creating the directory `config` and adding into it a `.conf` file with the desired parameters:
|
||||
Any parameter not listed in the above table and available in the
|
||||
following [link](https://docs.saltproject.io/en/latest/ref/configuration/examples.html#configuration-examples-master),
|
||||
can be set by creating the directory `config` and adding into it a `.conf` file with the desired parameters:
|
||||
|
||||
```sh
|
||||
mkdir config
|
||||
@@ -551,7 +586,7 @@ docker run --name salt_master -d \
|
||||
cdalvaro/docker-salt-master:latest
|
||||
```
|
||||
|
||||
## Usage
|
||||
## 🧑🚀 Usage
|
||||
|
||||
To test which salt minions are listening the following command can be executed directly from the host machine:
|
||||
|
||||
@@ -565,15 +600,16 @@ Then, you can apply salt states to your minions:
|
||||
docker exec -it salt_master salt '*' state.apply [state]
|
||||
```
|
||||
|
||||
## Shell Access
|
||||
## 🧰 Shell Access
|
||||
|
||||
For debugging and maintenance purposes you may want access the container shell. If you are using docker version 1.3.0 or higher you can access a running container shell using docker exec command.
|
||||
For debugging and maintenance purposes you may want to access the container's shell.
|
||||
If you are using docker version 1.3.0 or higher you can access a running container shell using docker exec command.
|
||||
|
||||
```sh
|
||||
docker exec -it salt_master bash
|
||||
```
|
||||
|
||||
## Restart Services
|
||||
## 💀 Restart Services
|
||||
|
||||
You can restart containers services by running the following command:
|
||||
|
||||
@@ -583,27 +619,65 @@ docker exec -it salt_master entrypoint.sh app:restart [salt-service]
|
||||
|
||||
Where `salt-service` is one of: `salt-master` os `salt-api` (if `SALT_API_SERVICE_ENABLED` is set to `True`)
|
||||
|
||||
## References
|
||||
## 👏 Credits
|
||||
|
||||
Many thanks to:
|
||||
|
||||
* [The SaltProject](https://saltproject.io) team for the excellent [salt](https://github.com/saltstack/salt) project
|
||||
* [JetBrains](https://www.jetbrains.com) for their free [OpenSource](https://jb.gg/OpenSourceSupport) license
|
||||
* [The Contributors](https://github.com/cdalvaro/docker-salt-master/graphs/contributors) for all the smart code and suggestions merged in the project
|
||||
* [The Stargazers](https://github.com/cdalvaro/docker-salt-master/stargazers) for showing their support
|
||||
|
||||
<div style="display: flex; align-items: center; justify-content: space-around;">
|
||||
<img src="social/SaltProject_verticallogo_teal.png" alt="SaltProject" height="128px">
|
||||
<img src="social/jb_beam.svg" alt="JetBrains Beam" height="128px">
|
||||
</div>
|
||||
|
||||
## 📖 References
|
||||
|
||||
[![StackOverflow Community][stackoverflow_badge]][stackoverflow_community]
|
||||
[![Slack Community][slack_badge]][slack_community]
|
||||
[![Reddit channel][reddit_badge]][subreddit]
|
||||
|
||||
- https://docs.saltproject.io/en/getstarted/
|
||||
- https://docs.saltproject.io/en/latest/contents.html
|
||||
|
||||
[saltproject_badge]: https://img.shields.io/badge/Salt-v3005-lightgrey.svg?logo=Saltstack
|
||||
|
||||
[saltproject_release_notes]: https://docs.saltproject.io/en/latest/topics/releases/3005.html "Salt Project Release Notes"
|
||||
|
||||
[ubuntu_badge]: https://img.shields.io/badge/ubuntu-jammy--20220801-E95420.svg?logo=Ubuntu
|
||||
|
||||
[ubuntu_hub_docker]: https://hub.docker.com/_/ubuntu/ "Ubuntu Image"
|
||||
|
||||
[github_publish_badge]: https://img.shields.io/github/workflow/status/cdalvaro/docker-salt-master/Publish%20Docker%20image?label=build&logo=GitHub&logoColor=%23181717
|
||||
|
||||
[github_publish_workflow]: https://github.com/cdalvaro/docker-salt-master/actions?query=workflow%3A%22Publish+Docker+image%22
|
||||
|
||||
[docker_size_badge]: https://img.shields.io/docker/image-size/cdalvaro/docker-salt-master/latest?logo=docker&color=2496ED
|
||||
|
||||
[docker_hub_tags]: https://hub.docker.com/repository/docker/cdalvaro/docker-salt-master/tags
|
||||
|
||||
[reddit_badge]: https://img.shields.io/badge/reddit-saltstack-orange?logo=reddit&logoColor=FF4500&color=FF4500
|
||||
|
||||
[subreddit]: https://www.reddit.com/r/saltstack/
|
||||
|
||||
[stackoverflow_badge]: https://img.shields.io/badge/stackoverflow-community-orange?logo=stackoverflow&color=FE7A16
|
||||
|
||||
[stackoverflow_community]: https://stackoverflow.com/tags/salt-stack
|
||||
|
||||
[slack_badge]: https://img.shields.io/badge/slack-@saltstackcommunity-blue.svg?logo=slack&logoColor=4A154B&color=4A154B
|
||||
|
||||
[slack_community]: https://saltstackcommunity.herokuapp.com
|
||||
|
||||
[arch_amd64_badge]: https://img.shields.io/badge/arch-amd64-inactive.svg
|
||||
|
||||
[arch_arm_badge]: https://img.shields.io/badge/arch-arm/v7-inactive.svg
|
||||
|
||||
[arch_arm64_badge]: https://img.shields.io/badge/arch-arm64-inactive.svg
|
||||
|
||||
[arch_link]: https://github.com/users/cdalvaro/packages/container/package/docker-salt-master
|
||||
|
||||
## 📃 License
|
||||
|
||||
This project is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
||||
|
||||
BIN
social/SaltProject_verticallogo_teal.png
Normal file
BIN
social/SaltProject_verticallogo_teal.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
1
social/jb_beam.svg
Normal file
1
social/jb_beam.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg height="180" viewBox="0 0 180 180" width="180" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="32.64" x2="82.77" y1="61.16" y2="85.54"><stop offset=".21" stop-color="#fe2857"/><stop offset="1" stop-color="#293896"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="17.38" x2="82.95" y1="69.86" y2="21.23"><stop offset="0" stop-color="#fe2857"/><stop offset=".01" stop-color="#fe2857"/><stop offset=".86" stop-color="#ff318c"/></linearGradient><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="74.17" x2="160.27" y1="21.58" y2="99.76"><stop offset=".02" stop-color="#ff318c"/><stop offset=".21" stop-color="#fe2857"/><stop offset=".86" stop-color="#fdb60d"/></linearGradient><linearGradient id="d" gradientUnits="userSpaceOnUse" x1="155.46" x2="55.07" y1="89.8" y2="158.9"><stop offset=".01" stop-color="#fdb60d"/><stop offset=".86" stop-color="#fcf84a"/></linearGradient><path d="m81.56 83.71-41.35-35a15 15 0 1 0 -14.47 25.7h.15l.39.12 52.16 15.89a3.53 3.53 0 0 0 1.18.21 3.73 3.73 0 0 0 1.93-6.91z" fill="url(#a)"/><path d="m89.85 25.93a10.89 10.89 0 0 0 -16.85-9.18l-50.5 30.66a15 15 0 1 0 17.9 24l45.27-36.89.36-.3a10.93 10.93 0 0 0 3.82-8.29z" fill="url(#b)"/><path d="m163.29 92-76.62-73.79a10.91 10.91 0 1 0 -14.81 16l.14.12 81.4 68.58a7.36 7.36 0 0 0 12.09-5.65 7.39 7.39 0 0 0 -2.2-5.26z" fill="url(#c)"/><path d="m165.5 97.29a7.35 7.35 0 0 0 -11.67-6l-92.71 45.3a15 15 0 1 0 15.48 25.59l85.73-58.84a7.35 7.35 0 0 0 3.17-6.05z" fill="url(#d)"/><path d="m60 60h60v60h-60z"/><g fill="#fff"><path d="m66.53 108.75h22.5v3.75h-22.5z"/><path d="m65.59 75.47 1.67-1.58a1.88 1.88 0 0 0 1.47.87c.64 0 1.06-.45 1.06-1.32v-5.92h2.58v5.94a3.44 3.44 0 0 1 -.92 2.63 3.52 3.52 0 0 1 -2.57 1 3.84 3.84 0 0 1 -3.29-1.62z"/><path d="m73.53 67.52h7.53v2.19h-5v1.43h4.49v2h-4.45v1.49h5v2.2h-7.6z"/><path d="m84.73 69.79h-2.8v-2.27h8.21v2.27h-2.81v7.09h-2.6z"/><path d="m66.63 80.58h4.42a3.47 3.47 0 0 1 2.55.83 2.09 2.09 0 0 1 .61 1.52 2.18 2.18 0 0 1 -1.45 2.09 2.27 2.27 0 0 1 1.86 2.29c0 1.69-1.31 2.69-3.55 2.69h-4.44zm5 2.89c0-.52-.42-.8-1.18-.8h-1.29v1.64h1.25c.78 0 1.24-.27 1.24-.81zm-.9 2.66h-1.57v1.73h1.62c.8 0 1.24-.31 1.24-.86-.02-.53-.4-.87-1.27-.87z"/><path d="m75.45 80.58h4.15a4.14 4.14 0 0 1 3.05 1 2.92 2.92 0 0 1 .83 2.18 3 3 0 0 1 -1.93 2.89l2.24 3.35h-3l-1.89-2.84h-.87v2.84h-2.6zm4 4.5c.87 0 1.4-.43 1.4-1.12 0-.75-.55-1.13-1.41-1.13h-1.39v2.27z"/><path d="m87.09 80.51h2.5l4 9.44h-2.79l-.67-1.69h-3.63l-.67 1.74h-2.71zm2.28 5.73-1.05-2.65-1.06 2.65z"/><path d="m94 80.55h2.6v9.37h-2.6z"/><path d="m97.56 80.55h2.44l3.37 5v-5h2.57v9.37h-2.27l-3.53-5.14v5.14h-2.58z"/><path d="m106.37 88.53 1.44-1.73a4.86 4.86 0 0 0 3 1.13c.71 0 1.08-.25 1.08-.65 0-.41-.3-.61-1.59-.91-2-.46-3.53-1-3.53-2.93 0-1.74 1.38-3 3.63-3a5.88 5.88 0 0 1 3.85 1.25l-1.25 1.78a4.56 4.56 0 0 0 -2.62-.92c-.63 0-.94.25-.94.6 0 .43.32.62 1.63.91 2.15.47 3.48 1.17 3.48 2.92 0 1.91-1.51 3-3.78 3a6.56 6.56 0 0 1 -4.4-1.45z"/></g><path d="m0 0h180v180h-180z" fill="none"/></svg>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
Reference in New Issue
Block a user