puppet: Only include zulip::base for top-level deploys.

This also removes direct includes of `zulip::common`, making
`zulip::base` gatekeep the inclusion of it.  This helps enforce that
any top-level deploy only needs include a single class, and that any
configuration which is not meant to be deployed by itself will not
apply, due to lack of `zulip::common` include.

The following commit will better differentiate these top-level deploys
by moving them into a subdirectory.
This commit is contained in:
Alex Vandiver 2020-10-19 17:41:53 -07:00 committed by Tim Abbott
parent 34e8c2c61e
commit 27cfb14d92
15 changed files with 10 additions and 13 deletions

View File

@ -1,6 +1,6 @@
# Default configuration for a Zulip app frontend
class zulip::app_frontend {
include zulip::common
include zulip::base
include zulip::app_frontend_base
include zulip::app_frontend_once

View File

@ -1,7 +1,6 @@
# Minimal configuration to run a Zulip application server.
# Default nginx configuration is included in extension app_frontend.pp.
class zulip::app_frontend_base {
include zulip::common
include zulip::nginx
include zulip::sasl_modules
include zulip::supervisor

View File

@ -1,3 +1,7 @@
# @summary Included only by classes that can be deployed.
#
# This class should only be included by classes that are intended to
# be able to be deployed on their own host.
class zulip::base {
include zulip::common
case $::osfamily {

View File

@ -1,6 +1,4 @@
class zulip::localhost_sso {
include zulip::common
file { '/etc/nginx/zulip-include/app.d/external-sso.conf':
ensure => file,
require => Package[$zulip::common::nginx],

View File

@ -1,4 +1,5 @@
class zulip::memcached {
include zulip::base
include zulip::sasl_modules
include zulip::systemd_daemon_reload

View File

@ -3,7 +3,6 @@
#
# Depends on zulip::base to have installed `monitoring-plugins-basic`.
class zulip::nagios {
include zulip::common
file { "${zulip::common::nagios_plugins_dir}/zulip_nagios_server":
require => Package[$zulip::common::nagios_plugins],
recurse => true,

View File

@ -1,5 +1,4 @@
class zulip::nginx {
include zulip::common
$web_packages = [
# Needed to run nginx with the modules we use
$zulip::common::nginx,

View File

@ -1,6 +1,7 @@
# postgres_appdb_tuned extends postgres_appdb_base by automatically
# generating tuned database configuration.
class zulip::postgres_appdb_tuned {
include zulip::base
include zulip::postgres_appdb_base
$work_mem = $zulip::common::total_memory_mb / 512

View File

@ -1,6 +1,4 @@
class zulip::postgres_common {
include zulip::common
$version = zulipconf('postgresql', 'version', undef)
case $::osfamily {

View File

@ -1,4 +1,5 @@
class zulip::rabbit {
include zulip::base
$erlang = $::osfamily ? {
'debian' => 'erlang-base',
'redhat' => 'erlang',

View File

@ -1,4 +1,5 @@
class zulip::redis {
include zulip::base
case $::osfamily {
'debian': {
$redis = 'redis-server'

View File

@ -1,5 +1,4 @@
class zulip::static_asset_compiler {
include zulip::common
case $::osfamily {
'debian': {
$static_asset_compiler_packages = [

View File

@ -1,5 +1,5 @@
class zulip::thumbor {
include zulip::common
include zulip::base
include zulip::nginx
include zulip::supervisor

View File

@ -1,6 +1,4 @@
class zulip::tornado_sharding {
include zulip::base
include zulip::common
include zulip::nginx
# The file entries below serve only to initialize the sharding config files

View File

@ -1,5 +1,4 @@
class zulip_ops::zulip_org {
include zulip::common
include zulip_ops::base
include zulip::nginx