Remove db stuff from test multinode
This commit is contained in:
parent
810c095bda
commit
b2d70279b1
|
@ -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,33 +311,37 @@ MACAddressPolicy=none'
|
||||||
description => "Redis cache server for ${customer}",
|
description => "Redis cache server for ${customer}",
|
||||||
require => File[$redis_conf_path],
|
require => File[$redis_conf_path],
|
||||||
}
|
}
|
||||||
$mariadb_compose = sunet::docker_compose { "drive_mariadb_${customer}_compose":
|
# Only add db related to prod
|
||||||
content => template('sunetdrive/multinode/docker-compose_mariadb.yml.erb'),
|
if $environment == 'prod' {
|
||||||
service_name => "mariadb-${customer}",
|
$mariadb_compose = sunet::docker_compose { "drive_mariadb_${customer}_compose":
|
||||||
compose_dir => "/opt/multinode/${customer}",
|
content => template('sunetdrive/multinode/docker-compose_mariadb.yml.erb'),
|
||||||
compose_filename => 'docker-compose.yml',
|
service_name => "mariadb-${customer}",
|
||||||
description => "Mariadb server for ${customer}",
|
compose_dir => "/opt/multinode/${customer}",
|
||||||
owner => 'root',
|
compose_filename => 'docker-compose.yml',
|
||||||
group => 'script',
|
description => "Mariadb server for ${customer}",
|
||||||
mode => '0750',
|
owner => 'root',
|
||||||
}
|
group => 'script',
|
||||||
|
mode => '0750',
|
||||||
|
}
|
||||||
|
|
||||||
file { "/opt/multinode/${customer}/mariadb-${customer}/do_backup.sh":
|
file { "/opt/multinode/${customer}/mariadb-${customer}/do_backup.sh":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
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,
|
||||||
|
|
Loading…
Reference in a new issue