snapshot of https://github.com/zulip/zulip.git @ 48c69911c7dd4e03b20552eb3bd77ad8151c1357 (2026-09-15)
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
This commit is contained in:
101
puppet/zulip/manifests/supervisor.pp
Normal file
101
puppet/zulip/manifests/supervisor.pp
Normal file
@@ -0,0 +1,101 @@
|
||||
class zulip::supervisor {
|
||||
$supervisor_service = $zulip::common::supervisor_service
|
||||
|
||||
package { 'supervisor': ensure => installed }
|
||||
|
||||
$system_conf_dir = $zulip::common::supervisor_system_conf_dir
|
||||
file { $system_conf_dir:
|
||||
ensure => directory,
|
||||
require => Package['supervisor'],
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
}
|
||||
|
||||
$conf_dir = $zulip::common::supervisor_conf_dir
|
||||
file { $conf_dir:
|
||||
ensure => directory,
|
||||
require => Package['supervisor'],
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
purge => true,
|
||||
recurse => true,
|
||||
notify => Service[$supervisor_service],
|
||||
}
|
||||
|
||||
# In the docker environment, we don't want/need supervisor to be
|
||||
# started/stopped /bin/true is used as a decoy command, to maintain
|
||||
# compatibility with other code using the supervisor service.
|
||||
$puppet_classes = zulipconf('machine', 'puppet_classes', undef)
|
||||
if 'docker' in $puppet_classes {
|
||||
service { $supervisor_service:
|
||||
ensure => running,
|
||||
require => [
|
||||
File['/var/log/zulip'],
|
||||
Package['supervisor'],
|
||||
],
|
||||
hasstatus => true,
|
||||
status => '/bin/true',
|
||||
hasrestart => true,
|
||||
restart => '/bin/true',
|
||||
}
|
||||
exec { 'supervisor-restart':
|
||||
refreshonly => true,
|
||||
command => '/bin/true',
|
||||
}
|
||||
} else {
|
||||
service { $supervisor_service:
|
||||
ensure => running,
|
||||
require => [
|
||||
File['/var/log/zulip'],
|
||||
Package['supervisor'],
|
||||
],
|
||||
hasstatus => true,
|
||||
status => $zulip::common::supervisor_status,
|
||||
# Restarting the whole supervisorctl on every update to its
|
||||
# configuration files has the unfortunate side-effect of
|
||||
# restarting all of the services it controls; this results in an
|
||||
# unduly large disruption. The better option is to tell
|
||||
# supervisord to reread its config via supervisorctl and then to
|
||||
# "update". You need to do both -- after a "reread", supervisor
|
||||
# won't actually take action based on the changed configuration
|
||||
# until you do an "update" (I assume this is so you can check if
|
||||
# your config file parses without doing anything, but it's
|
||||
# really confusing).
|
||||
#
|
||||
# If restarting supervisor itself is necessary, see
|
||||
# Exec['supervisor-restart']
|
||||
#
|
||||
# Also, to handle the case that supervisord wasn't running at
|
||||
# all, we check if it is not running and if so, start it.
|
||||
hasrestart => true,
|
||||
# lint:ignore:140chars
|
||||
restart => "bash -c 'if pgrep -x supervisord >/dev/null; then supervisorctl reread && supervisorctl update; else ${zulip::common::supervisor_start}; fi'",
|
||||
# lint:endignore
|
||||
}
|
||||
exec { 'supervisor-restart':
|
||||
refreshonly => true,
|
||||
provider => shell,
|
||||
command => $zulip::common::supervisor_reload,
|
||||
require => Service[$supervisor_service],
|
||||
}
|
||||
}
|
||||
|
||||
$file_descriptor_limit = zulipconf('application_server', 'service_file_descriptor_limit', 40000)
|
||||
file { $zulip::common::supervisor_conf_file:
|
||||
ensure => file,
|
||||
require => Package[supervisor],
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
content => template('zulip/supervisor/supervisord.conf.erb'),
|
||||
notify => Exec['supervisor-restart'],
|
||||
}
|
||||
|
||||
file { '/usr/local/bin/secret-env-wrapper':
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
source => 'puppet:///modules/zulip/secret-env-wrapper',
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user