From e58c63decca002f3b23aa0ac698424403355a060 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 19 Feb 2023 00:34:44 +0100 Subject: Enable apache-formula Signed-off-by: Georg Pfuetzenreuter --- pillar/formulas.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'pillar') diff --git a/pillar/formulas.yaml b/pillar/formulas.yaml index 191a8e1..9c50d7a 100644 --- a/pillar/formulas.yaml +++ b/pillar/formulas.yaml @@ -1,4 +1,5 @@ --- +- apache - firewalld - keepalived - nginx -- cgit v1.2.3 From 906dd92d7ed1bd79eb2524b9a3e1a0d880eab068 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 19 Feb 2023 00:36:43 +0100 Subject: Add web.apache-httpd role Signed-off-by: Georg Pfuetzenreuter --- pillar/role/web/apache-httpd.sls | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 pillar/role/web/apache-httpd.sls (limited to 'pillar') diff --git a/pillar/role/web/apache-httpd.sls b/pillar/role/web/apache-httpd.sls new file mode 100644 index 0000000..5b4b64b --- /dev/null +++ b/pillar/role/web/apache-httpd.sls @@ -0,0 +1,3 @@ +apache: + global: + ServerAdmin: system@lysergic.dev -- cgit v1.2.3 From e36d40dbc3a46c1d13834f9ecee69089b4a35211 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 19 Feb 2023 00:37:54 +0100 Subject: id.themis: add BookStack httpd configuration Signed-off-by: Georg Pfuetzenreuter --- pillar/id/themis_lysergic_dev.sls | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pillar/id/themis_lysergic_dev.sls (limited to 'pillar') diff --git a/pillar/id/themis_lysergic_dev.sls b/pillar/id/themis_lysergic_dev.sls new file mode 100644 index 0000000..4fa5a51 --- /dev/null +++ b/pillar/id/themis_lysergic_dev.sls @@ -0,0 +1,36 @@ +apache: + sites: + BookStack: + interface: '[fd29:8e45:f292:ff80::1]' + port: 443 + ServerName: bookstack.themis.backend.syscid.com + DocumentRoot: /srv/www/BookStack/ + DirectoryIndex: index.php + Directory: + /srv/www/BookStack/: + Options: 'Indexes FollowSymLinks -MultiViews' + AllowOverride: None + Require: all granted + Formula_Append: | + RewriteEngine On + RewriteCond '%{HTTP:Authorization} .' + RewriteCond '.* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]' + RewriteCond '%{REQUEST_FILENAME} !-d' + RewriteCond '%{REQUEST_URI} (.+)/$' + RewriteCond '^ %1 [L,R=301]' + RewriteCond '%{REQUEST_FILENAME} !-d' + RewriteCond '%{REQUEST_FILENAME} !-f' + RewriteCond '^ index.php [L]' + LogLevel: False + ErrorLog: False + LogFormat: False + CustomLog: False + ServerAdmin: False + ServerAlias: False + Formula_Append: | + Include /etc/apache2/snippets.d/ssl_themis.conf + AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript + SetOutputFilter DEFLATE + + SetHandler 'proxy:unix:/run/php-fpm/BookStack.sock|fcgi://BookStack' + -- cgit v1.2.3 From d8d848055ffe8da7530ccdf3f8076a01fae44ed0 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 19 Feb 2023 02:08:05 +0100 Subject: id.themis: add BookStack configuration Signed-off-by: Georg Pfuetzenreuter --- pillar/id/themis_lysergic_dev.sls | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'pillar') diff --git a/pillar/id/themis_lysergic_dev.sls b/pillar/id/themis_lysergic_dev.sls index 4fa5a51..0773f4f 100644 --- a/pillar/id/themis_lysergic_dev.sls +++ b/pillar/id/themis_lysergic_dev.sls @@ -34,3 +34,44 @@ apache: SetHandler 'proxy:unix:/run/php-fpm/BookStack.sock|fcgi://BookStack' + +profile: + bookstack: + app_url: https://libertacasa.info + db_host: ${'secret_bookstack:db_host'} + db_database: ${'secret_bookstack:db_database'} + db_username: ${'secret_bookstack:db_username'} + db_password: ${'secret_bookstack:db_password'} + mail_driver: smtp + mail_from_name: LibertaCasa Documentation + mail_from: mail@libertacasa.info + mail_host: zz0.email + mail_port: 465 + mail_username: mail@libertacasa.info + mail_password: ${'secret_bookstack:mail_password'} + mail_encryption: ssl + app_theme: lysergic + cache_driver: memcached + session_driver: memcached + memcached_servers: /run/memcached/memcached.sock + session_secure_cookie: true + session_cookie_name: libertacasa_megayummycookie + app_debug: false + session_lifetime: 240 + auth_method: saml2 + auth_auto_initiate: true + saml2_name: LibertaCasa SSO + saml2_email_attribute: email + saml2_external_id_attribute: uid + saml2_display_name_attributes: fullname + saml2_idp_entityid: https://libsso.net/realms/libertacasa + saml2_idp_sso: https://libsso.net/realms/libertacasa/protocol/saml + saml2_idp_slo: https://libsso.net/realms/libertacasa/protocol/saml + saml2_idp_x509: ${'secret_bookstack:saml2_idp_x509'} + saml2_autoload_metadata: false + saml2_sp_x509: ${'secret_bookstack:saml2_sp_x509'} + saml2_sp_x509_key: ${'secret_bookstack:saml2_sp_x509_key'} + saml2_user_to_groups: true + saml2_group_attribute: groups + saml2_remove_from_groups: true + queue_connection: database -- cgit v1.2.3 From 4653655010c16d8f1f128480b55d4cd2e9f5a9e7 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 19 Feb 2023 13:40:47 +0100 Subject: profile.apache-httpd: manage snippets - add apache-httpd profile with snippets configuration - add TLS snippet to apache-httpd role pillar Signed-off-by: Georg Pfuetzenreuter --- pillar/role/web/apache-httpd.sls | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pillar') diff --git a/pillar/role/web/apache-httpd.sls b/pillar/role/web/apache-httpd.sls index 5b4b64b..bd77162 100644 --- a/pillar/role/web/apache-httpd.sls +++ b/pillar/role/web/apache-httpd.sls @@ -1,3 +1,13 @@ +{%- set host = grains['host'] -%} +{%- set fqdn = grains['fqdn'] -%} + apache: global: ServerAdmin: system@lysergic.dev + +profile: + apache-httpd: + snippets: + ssl_{{ host }}: + - 'SSLCertificateFile "/etc/ssl/{{ host }}/{{ fqdn }}.crt"' + - 'SSLCertificateKeyFile "/etc/ssl/{{ host }}/{{ fqdn }}.key"' -- cgit v1.2.3 From f820978b7897ea4650f031fa80c11384061e7375 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 19 Feb 2023 18:05:14 +0100 Subject: Add memcached role Signed-off-by: Georg Pfuetzenreuter --- pillar/role/memcached.sls | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 pillar/role/memcached.sls (limited to 'pillar') diff --git a/pillar/role/memcached.sls b/pillar/role/memcached.sls new file mode 100644 index 0000000..e3ded73 --- /dev/null +++ b/pillar/role/memcached.sls @@ -0,0 +1,2 @@ +memcached: + listen_address: /run/memcached/memcached.sock -- cgit v1.2.3 From f55e5363a07e5ebb6ef0e4cab70ae90fdc70f969 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Wed, 22 Feb 2023 20:40:34 +0100 Subject: Enable memcached-formula Signed-off-by: Georg Pfuetzenreuter --- pillar/formulas.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'pillar') diff --git a/pillar/formulas.yaml b/pillar/formulas.yaml index 9c50d7a..c459929 100644 --- a/pillar/formulas.yaml +++ b/pillar/formulas.yaml @@ -2,6 +2,7 @@ - apache - firewalld - keepalived +- memcached - nginx - openssh - postfix -- cgit v1.2.3 From 361e118b316622c731556fdc62144b24aa6f9c23 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 26 Feb 2023 11:12:44 +0100 Subject: Add php-fpm role Signed-off-by: Georg Pfuetzenreuter --- pillar/role/php-fpm.sls | 1 + 1 file changed, 1 insertion(+) create mode 100644 pillar/role/php-fpm.sls (limited to 'pillar') diff --git a/pillar/role/php-fpm.sls b/pillar/role/php-fpm.sls new file mode 100644 index 0000000..1bb8bf6 --- /dev/null +++ b/pillar/role/php-fpm.sls @@ -0,0 +1 @@ +# empty -- cgit v1.2.3 From a1ce36fd6c5e4ed6e1f23eb7036c11c73fb6a323 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 26 Feb 2023 11:22:25 +0100 Subject: Enable php-formula Signed-off-by: Georg Pfuetzenreuter --- pillar/formulas.yaml | 1 + 1 file changed, 1 insertion(+) (limited to 'pillar') diff --git a/pillar/formulas.yaml b/pillar/formulas.yaml index c459929..bf74c21 100644 --- a/pillar/formulas.yaml +++ b/pillar/formulas.yaml @@ -5,6 +5,7 @@ - memcached - nginx - openssh +- php - postfix - prometheus - salt -- cgit v1.2.3