Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
95266f9
Update init.sls
mycelium3 Jan 21, 2022
85e4bae
Change xml to modules
mycelium3 Jan 26, 2022
15796be
SSL certificate check in HTTP mode too (error in soft)
mycelium3 Jan 26, 2022
99ef4b8
Update users.sls
mycelium3 Jan 30, 2022
df77b3b
Update git-auto-deploy-opensourcewebsite.org.conf.json
mycelium3 Jan 30, 2022
da29e6b
Delete .keep
mycelium3 Jan 30, 2022
86b854f
Create htdocs.sls
mycelium3 Jan 30, 2022
e518ac9
Update and rename htdocs.sls to directory.sls
mycelium3 Jan 30, 2022
c757160
Delete .keep
mycelium3 Jan 30, 2022
7a70982
Delete .keep
mycelium3 Jan 30, 2022
89f231b
Update users.sls
mycelium3 Jan 30, 2022
ef03e26
Update directory.sls
mycelium3 Jan 30, 2022
753dd50
Update users.sls
mycelium3 Jan 30, 2022
bf3bb66
Update directory.sls
mycelium3 Jan 30, 2022
0095c6b
Update directory.sls
mycelium3 Jan 30, 2022
acd3407
Create .gitignore
mycelium3 Jan 30, 2022
171760b
Create .gitignore
mycelium3 Jan 30, 2022
671bf57
Delete .gitignore
mycelium3 Jan 30, 2022
9337408
Delete .gitignore
mycelium3 Jan 30, 2022
ffc97d1
Update supervisor.sls
mycelium3 Jan 30, 2022
beb3722
Update init.sls
mycelium3 Jan 30, 2022
6fb3d7e
Update php81.sls
mycelium3 Feb 9, 2022
8deda5c
Update php81.sls
mycelium3 Feb 9, 2022
c61cf3f
Update php80.sls
mycelium3 Feb 9, 2022
66c5cde
remove php's version dependent pkg
mycelium3 Feb 9, 2022
c1f4eea
Add support php 8.0 and 8.1
mycelium3 Feb 9, 2022
3eea126
Remove `php8.0`
A1EF Jul 15, 2022
29b4fa3
Add `users.directory` state include to `top.sls`
A1EF Jul 16, 2022
a6a07c6
Revert "Update init.sls"
A1EF Jul 16, 2022
5cf3379
Revert "Update supervisor.sls"
A1EF Jul 16, 2022
040c439
Remove `backup_mysql.sh` from `cron_entries` in tests
A1EF Jul 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pillar/prod/logrotate.sls
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@ logrotate:
- postrotate
- /usr/lib/php/php7.4-fpm-reopenlogs
- endscript
php8.1-fpm:
path:
- /var/log/php8.1-fpm.log
config:
- missingok
- notifempty
- sharedscripts
- postrotate
- /usr/lib/php/php8.1-fpm-reopenlogs
- endscript
salt-common:
path:
- /var/log/salt/master
Expand Down
129 changes: 0 additions & 129 deletions pillar/prod/php80.sls

This file was deleted.

4 changes: 3 additions & 1 deletion pillar/prod/php81.sls
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ php:
cli:
- php8.1-cli
- php8.1-common
xml:
modules:
- php8.1-xml
- php8.1-soap
- php8.1-bcmath

fpm:
conf: /etc/php/8.1/fpm/php-fpm.conf
Expand Down
3 changes: 3 additions & 0 deletions pillar/prod/users.sls
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ users:
www-data:
groups:
- opensourcewebsite.org
git-auto-deploy:
groups:
- opensourcewebsite.org

opensourcewebsite.org:
fullname: opensourcewebsite org
Expand Down
37 changes: 23 additions & 14 deletions salt/backup/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@
backup_dir: {{ pillar['backup_dir'] }}
backup_site_list: {{ pillar['backup_sites'] | join(' ') }}

#backup-mysql:
# cron.present:
# - name: /root/backup_mysql.sh
# - user: root
# - minute: random
# - hour: 1
# - identifier: backup-mysql

backup-mysql:
cron.present:
cron.absent:
- name: /root/backup_mysql.sh
- user: root
- minute: random
- hour: 1
- identifier: backup-mysql

backup-site:
cron.present:
Expand All @@ -35,17 +40,21 @@ backup-site:
- hour: 2
- identifier: backup-site

#{{ pillar['backup_dir'] }}/mysql:
# file.directory:
# - user: root
# - group: root
# - dir_mode: 750
# - file_mode: 640
# - makedirs: True
# - recurse:
# - user
# - group
# - mode

{{ pillar['backup_dir'] }}/mysql:
file.directory:
- user: root
- group: root
- dir_mode: 750
- file_mode: 640
- makedirs: True
- recurse:
- user
- group
- mode
file.absent:
- name: {{ pillar['backup_dir'] }}/mysql

{{ pillar['backup_dir'] }}/sites:
file.directory:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"http-host": "0.0.0.0",
"http-port": 8005,
"pid-file": "/www/opensourcewebsite.org/tmp/.gitautodeploy.pid",
"ssl-cert": "/etc/git-auto-deploy/cert.pem",

"repositories": [{
"url": "git@github.com:opensourcewebsite-org/opensourcewebsite-org.git",
"url": "https://github.com/opensourcewebsite-org/opensourcewebsite-org.git",
"branch": "master",
"remote": "origin",
"path": "/www/opensourcewebsite.org/htdocs/",
Expand Down
1 change: 1 addition & 0 deletions salt/top.sls
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ base:
- sysctl
- users.log_acl
- update_motd_d
- users.directory
- users.selected_editor
'opensourcewebsite.org or osw-devops-ci':
- match: compound
Expand Down
20 changes: 20 additions & 0 deletions salt/users/directory.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/www/opensourcewebsite.org/htdocs/:
file.directory:
- mode: 770
- user: opensourcewebsite.org
- group: opensourcewebsite.org
- makedirs: True

/www/opensourcewebsite.org/logs/:
file.directory:
- mode: 770
- user: opensourcewebsite.org
- group: opensourcewebsite.org
- makedirs: True

/www/opensourcewebsite.org/tmp/:
file.directory:
- mode: 770
- user: opensourcewebsite.org
- group: opensourcewebsite.org
- makedirs: True
Empty file.
Empty file.
Empty file.
3 changes: 1 addition & 2 deletions test/integration/default/controls/cron.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
control 'osw cron entries' do
title 'The cron entries should be present'

cron_entries = ['^\d{1,2} 1 \* \* \* /root/backup_mysql.sh$',
'^\d{1,2} 2 \* \* \* /root/backup_site.sh$']
cron_entries = ['^\d{1,2} 2 \* \* \* /root/backup_site.sh$']

cron_entries.each do |c|
describe cron do
Expand Down