|
|
# Packages
|
|
|
- salt-master
|
|
|
- python3-git
|
|
|
|
|
|
# Config Files
|
|
|
|
|
|
##/etc/salt/master.d/backends.conf:
|
|
|
```yaml
|
|
|
top_file_merge_strategy: same
|
|
|
default_top: base
|
|
|
env_order: ['dev', 'base']
|
|
|
|
|
|
fileserver_events: True
|
|
|
|
|
|
fileserver_backend:
|
|
|
- git
|
|
|
|
|
|
gitfs_provider: gitpython
|
|
|
|
|
|
gitfs_remotes:
|
|
|
- https://gitlab.freedesktop.org/Mesa_CI/jenkins-salt.git
|
|
|
|
|
|
gitfs_saltenv_whitelist:
|
|
|
- base
|
|
|
- dev
|
|
|
```
|
|
|
|
|
|
##/etc/salt/master.d/security.conf
|
|
|
```yaml
|
|
|
autosign_file: /etc/salt/autosign.conf
|
|
|
```
|
|
|
|
|
|
##/etc/salt/autosign.conf
|
|
|
```txt
|
|
|
otc-gfx*
|
|
|
```
|
|
|
Or some other way to identify the machines that you want this master to automatically accept.
|
|
|
|
|
|
##/etc/salt/minion.d/schedule.conf:
|
|
|
```yaml
|
|
|
schedule:
|
|
|
job1:
|
|
|
function: state.highstate
|
|
|
minutes: 60
|
|
|
```
|
|
|
|
|
|
##configure the master to run with tsocks
|
|
|
mkdir /etc/systemd/system/salt-master.d
|
|
|
|
|
|
#/etc/systemd/system/salt-master.d/00-tsocks.conf
|
|
|
```dosini
|
|
|
[Service]
|
|
|
ExecStart=
|
|
|
ExecStart=/usr/bin/tsocks /usr/bin/salt-master
|
|
|
```
|
|
|
|
|
|
|
|
|
# Local saltstack repo mirror
|
|
|
|
|
|
|
|
|
### rsync repo from saltstack:
|
|
|
|
|
|
```
|
|
|
|
|
|
tsocks rsync -vaH --numeric-ids --delete --delete-after --delay-updates \
|
|
|
rsync://rsync.repo.saltstack.com/saltstack_pkgrepo_full/py3/debian/10/amd64/ \
|
|
|
/mnt/jenkins/www/saltstack
|
|
|
|
|
|
```
|
|
|
|
|
|
### nginx
|
|
|
|
|
|
In the `server{}` block:
|
|
|
|
|
|
```
|
|
|
root /mnt/jenkins/www;
|
|
|
|
|
|
location /saltstack {
|
|
|
autoindex on;
|
|
|
}
|
|
|
|
|
|
``` |
|
|
\ No newline at end of file |