Remove db stuff from test multinode

This commit is contained in:
Micke Nordin 2023-03-13 14:32:54 +01:00
parent 810c095bda
commit b2d70279b1
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257

View file

@ -213,14 +213,14 @@ MACAddressPolicy=none'
$customer_config_full = hiera_hash($customer) $customer_config_full = hiera_hash($customer)
$customer_config = $customer_config_full[$environment] $customer_config = $customer_config_full[$environment]
if $environment == 'test' { if $environment == 'prod' {
$dbhost = 'proxysql_proxysql_1'
$dbname = "nextcloud_${customer}"
$dbuser = "nextcloud_${customer}"
} else {
$dbhost = "mariadb-${customer}_db_1" $dbhost = "mariadb-${customer}_db_1"
$dbname = 'nextcloud' $dbname = 'nextcloud'
$dbuser = 'nextcloud' $dbuser = 'nextcloud'
} else {
$dbhost = 'proxysql_proxysql_1'
$dbname = "nextcloud_${customer}"
$dbuser = "nextcloud_${customer}"
} }
$gs_enabled = hiera('gs_enabled') $gs_enabled = hiera('gs_enabled')
@ -311,6 +311,8 @@ MACAddressPolicy=none'
description => "Redis cache server for ${customer}", description => "Redis cache server for ${customer}",
require => File[$redis_conf_path], require => File[$redis_conf_path],
} }
# Only add db related to prod
if $environment == 'prod' {
$mariadb_compose = sunet::docker_compose { "drive_mariadb_${customer}_compose": $mariadb_compose = sunet::docker_compose { "drive_mariadb_${customer}_compose":
content => template('sunetdrive/multinode/docker-compose_mariadb.yml.erb'), content => template('sunetdrive/multinode/docker-compose_mariadb.yml.erb'),
service_name => "mariadb-${customer}", service_name => "mariadb-${customer}",
@ -327,17 +329,19 @@ MACAddressPolicy=none'
content => template('sunetdrive/mariadb_backup/do_backup.erb.sh'), content => template('sunetdrive/mariadb_backup/do_backup.erb.sh'),
mode => '0744', mode => '0744',
} }
sunetdrive::db_type { "db_${customer}":
location => $location,
override_config => $config,
override_compose => $mariadb_compose,
}
}
# END DB related
sunetdrive::app_type { "app_${customer}": sunetdrive::app_type { "app_${customer}":
location => $location, location => $location,
override_config => $config, override_config => $config,
override_compose => $app_compose, override_compose => $app_compose,
} }
sunetdrive::db_type { "db_${customer}":
location => $location,
override_config => $config,
override_compose => $mariadb_compose,
}
file { $redis_conf_dir: file { $redis_conf_dir:
ensure => directory, ensure => directory,
recurse => true, recurse => true,