Enable multinode servers to use external db
This commit is contained in:
parent
25d8d94b70
commit
d09dc50d0f
3 changed files with 18 additions and 3 deletions
|
@ -16,6 +16,8 @@ define sunetdrive::app_type (
|
||||||
# Other settings
|
# Other settings
|
||||||
$admin_password = $config[ 'admin_password' ]
|
$admin_password = $config[ 'admin_password' ]
|
||||||
$dbhost = $config[ 'dbhost' ]
|
$dbhost = $config[ 'dbhost' ]
|
||||||
|
$dbname = $config[ 'dbname' ]
|
||||||
|
$dbuser = $config[ 'dbuser' ]
|
||||||
$instanceid = $config[ 'instanceid' ]
|
$instanceid = $config[ 'instanceid' ]
|
||||||
$mysql_user_password = $config[ 'mysql_user_password' ]
|
$mysql_user_password = $config[ 'mysql_user_password' ]
|
||||||
$passwordsalt = $config[ 'passwordsalt' ]
|
$passwordsalt = $config[ 'passwordsalt' ]
|
||||||
|
@ -30,6 +32,8 @@ define sunetdrive::app_type (
|
||||||
# Other settings
|
# Other settings
|
||||||
$admin_password = safe_hiera('admin_password')
|
$admin_password = safe_hiera('admin_password')
|
||||||
$dbhost = 'proxysql_proxysql_1'
|
$dbhost = 'proxysql_proxysql_1'
|
||||||
|
$dbname = 'nextcloud'
|
||||||
|
$dbuser = 'nextcloud'
|
||||||
$instanceid = safe_hiera('instanceid')
|
$instanceid = safe_hiera('instanceid')
|
||||||
$mysql_user_password = safe_hiera('mysql_user_password')
|
$mysql_user_password = safe_hiera('mysql_user_password')
|
||||||
$passwordsalt = safe_hiera('passwordsalt')
|
$passwordsalt = safe_hiera('passwordsalt')
|
||||||
|
|
|
@ -212,7 +212,16 @@ MACAddressPolicy=none'
|
||||||
$cron_log_path ="/opt/multinode/${customer}/cron.log"
|
$cron_log_path ="/opt/multinode/${customer}/cron.log"
|
||||||
$customer_config_full = hiera_hash($customer)
|
$customer_config_full = hiera_hash($customer)
|
||||||
$customer_config = $customer_config_full[$environment]
|
$customer_config = $customer_config_full[$environment]
|
||||||
$dbhost = "mariadb-${customer}_db_1"
|
|
||||||
|
if $customer in ['vr'] and $environment == 'test' {
|
||||||
|
$dbhost = 'proxysql_proxysql_1'
|
||||||
|
$dbname = "nextcloud_${customer}"
|
||||||
|
$dbuser = "nextcloud_${customer}"
|
||||||
|
} else {
|
||||||
|
$dbhost = "mariadb-${customer}_db_1"
|
||||||
|
$dbname = 'nextcloud'
|
||||||
|
$dbuser = 'nextcloud'
|
||||||
|
}
|
||||||
|
|
||||||
$gs_enabled = hiera('gs_enabled')
|
$gs_enabled = hiera('gs_enabled')
|
||||||
$gs_federation = hiera('gs_federation')
|
$gs_federation = hiera('gs_federation')
|
||||||
|
@ -254,6 +263,8 @@ MACAddressPolicy=none'
|
||||||
admin_password => $admin_password,
|
admin_password => $admin_password,
|
||||||
backup_password => $backup_password,
|
backup_password => $backup_password,
|
||||||
dbhost => $dbhost,
|
dbhost => $dbhost,
|
||||||
|
dbname => $dbname,
|
||||||
|
dbuser => $dbuser,
|
||||||
drive_email_template_plain_text_left => hiera($environment)['drive_email_template_plain_text_left'],
|
drive_email_template_plain_text_left => hiera($environment)['drive_email_template_plain_text_left'],
|
||||||
drive_email_template_text_left => hiera($environment)['drive_email_template_text_left'],
|
drive_email_template_text_left => hiera($environment)['drive_email_template_text_left'],
|
||||||
drive_email_template_url_left => hiera($environment)['drive_email_template_url_left'],
|
drive_email_template_url_left => hiera($environment)['drive_email_template_url_left'],
|
||||||
|
|
|
@ -124,12 +124,12 @@ $CONFIG = array (
|
||||||
'config_is_read_only' => true,
|
'config_is_read_only' => true,
|
||||||
'datadirectory' => '/var/www/html/data',
|
'datadirectory' => '/var/www/html/data',
|
||||||
'dbhost' => '<%= @dbhost %>',
|
'dbhost' => '<%= @dbhost %>',
|
||||||
'dbname' => 'nextcloud',
|
'dbname' => '<%= @dbname %>',
|
||||||
'dbpassword' => '<%= @mysql_user_password %>',
|
'dbpassword' => '<%= @mysql_user_password %>',
|
||||||
'dbport' => '3306',
|
'dbport' => '3306',
|
||||||
'dbtableprefix' => 'oc_',
|
'dbtableprefix' => 'oc_',
|
||||||
'dbtype' => 'mysql',
|
'dbtype' => 'mysql',
|
||||||
'dbuser' => 'nextcloud',
|
'dbuser' => '<%= @dbuser %>',
|
||||||
'drive_email_template_text_left' => '<%= @drive_email_template_text_left %>',
|
'drive_email_template_text_left' => '<%= @drive_email_template_text_left %>',
|
||||||
'drive_email_template_plain_text_left' => '<%= @drive_email_template_plain_text_left %>',
|
'drive_email_template_plain_text_left' => '<%= @drive_email_template_plain_text_left %>',
|
||||||
'drive_email_template_url_left' => '<%= @drive_email_template_url_left %>',
|
'drive_email_template_url_left' => '<%= @drive_email_template_url_left %>',
|
||||||
|
|
Loading…
Add table
Reference in a new issue