OpenStackId: Update Email configuration

This change is related to https://review.openstack.org/#/c/292605/
its sets smtp configuration and email log error capabilities to both nodes
production/dev.

Change-Id: Ie4ae1379451059b525a07611867dd4d3f6d6a9ac
This commit is contained in:
Sebastian Marcet 2016-03-16 08:22:04 -03:00
parent f73fc067cb
commit cfa22b1234
3 changed files with 121 additions and 89 deletions

View File

@ -925,24 +925,30 @@ node 'release.slave.openstack.org' {
# Node-OS: trusty
node 'openstackid.org' {
class { 'openstack_project::openstackid_prod':
sysadmins => hiera('sysadmins', []),
site_admin_password => hiera('openstackid_site_admin_password'),
id_mysql_host => hiera('openstackid_id_mysql_host', 'localhost'),
id_mysql_password => hiera('openstackid_id_mysql_password'),
id_mysql_user => hiera('openstackid_id_mysql_user', 'username'),
id_db_name => hiera('openstackid_id_db_name'),
ss_mysql_host => hiera('openstackid_ss_mysql_host', 'localhost'),
ss_mysql_password => hiera('openstackid_ss_mysql_password'),
ss_mysql_user => hiera('openstackid_ss_mysql_user', 'username'),
ss_db_name => hiera('openstackid_ss_db_name', 'username'),
redis_password => hiera('openstackid_redis_password'),
ssl_cert_file_contents => hiera('openstackid_ssl_cert_file_contents'),
ssl_key_file_contents => hiera('openstackid_ssl_key_file_contents'),
ssl_chain_file_contents => hiera('openstackid_ssl_chain_file_contents'),
id_recaptcha_public_key => hiera('openstackid_recaptcha_public_key'),
id_recaptcha_private_key => hiera('openstackid_recaptcha_private_key'),
app_url => 'https://openstackid.org',
app_key => hiera('openstackid_app_key'),
sysadmins => hiera('sysadmins', []),
site_admin_password => hiera('openstackid_site_admin_password'),
id_mysql_host => hiera('openstackid_id_mysql_host', 'localhost'),
id_mysql_password => hiera('openstackid_id_mysql_password'),
id_mysql_user => hiera('openstackid_id_mysql_user', 'username'),
id_db_name => hiera('openstackid_id_db_name'),
ss_mysql_host => hiera('openstackid_ss_mysql_host', 'localhost'),
ss_mysql_password => hiera('openstackid_ss_mysql_password'),
ss_mysql_user => hiera('openstackid_ss_mysql_user', 'username'),
ss_db_name => hiera('openstackid_ss_db_name', 'username'),
redis_password => hiera('openstackid_redis_password'),
ssl_cert_file_contents => hiera('openstackid_ssl_cert_file_contents'),
ssl_key_file_contents => hiera('openstackid_ssl_key_file_contents'),
ssl_chain_file_contents => hiera('openstackid_ssl_chain_file_contents'),
id_recaptcha_public_key => hiera('openstackid_recaptcha_public_key'),
id_recaptcha_private_key => hiera('openstackid_recaptcha_private_key'),
app_url => 'https://openstackid.org',
app_key => hiera('openstackid_app_key'),
id_log_error_to_email => 'openstack@tipit.net',
id_log_error_from_email => 'noreply@openstack.org',
email_driver => 'smtp',
email_smtp_server => 'smtp.sendgrid.net',
email_smtp_server_user => hiera('openstackid_smtp_user'),
email_smtp_server_password => hiera('openstackid_smtp_password'),
}
}
@ -950,23 +956,29 @@ node 'openstackid.org' {
# Node-OS: trusty
node 'openstackid-dev.openstack.org' {
class { 'openstack_project::openstackid_dev':
sysadmins => hiera('sysadmins', []),
site_admin_password => hiera('openstackid_dev_site_admin_password'),
id_mysql_host => hiera('openstackid_dev_id_mysql_host', 'localhost'),
id_mysql_password => hiera('openstackid_dev_id_mysql_password'),
id_mysql_user => hiera('openstackid_dev_id_mysql_user', 'username'),
ss_mysql_host => hiera('openstackid_dev_ss_mysql_host', 'localhost'),
ss_mysql_password => hiera('openstackid_dev_ss_mysql_password'),
ss_mysql_user => hiera('openstackid_dev_ss_mysql_user', 'username'),
ss_db_name => hiera('openstackid_dev_ss_db_name', 'username'),
redis_password => hiera('openstackid_dev_redis_password'),
ssl_cert_file_contents => hiera('openstackid_dev_ssl_cert_file_contents'),
ssl_key_file_contents => hiera('openstackid_dev_ssl_key_file_contents'),
ssl_chain_file_contents => hiera('openstackid_dev_ssl_chain_file_contents'),
id_recaptcha_public_key => hiera('openstackid_dev_recaptcha_public_key'),
id_recaptcha_private_key => hiera('openstackid_dev_recaptcha_private_key'),
app_url => 'https://openstackid-dev.openstack.org',
app_key => hiera('openstackid_dev_app_key'),
sysadmins => hiera('sysadmins', []),
site_admin_password => hiera('openstackid_dev_site_admin_password'),
id_mysql_host => hiera('openstackid_dev_id_mysql_host', 'localhost'),
id_mysql_password => hiera('openstackid_dev_id_mysql_password'),
id_mysql_user => hiera('openstackid_dev_id_mysql_user', 'username'),
ss_mysql_host => hiera('openstackid_dev_ss_mysql_host', 'localhost'),
ss_mysql_password => hiera('openstackid_dev_ss_mysql_password'),
ss_mysql_user => hiera('openstackid_dev_ss_mysql_user', 'username'),
ss_db_name => hiera('openstackid_dev_ss_db_name', 'username'),
redis_password => hiera('openstackid_dev_redis_password'),
ssl_cert_file_contents => hiera('openstackid_dev_ssl_cert_file_contents'),
ssl_key_file_contents => hiera('openstackid_dev_ssl_key_file_contents'),
ssl_chain_file_contents => hiera('openstackid_dev_ssl_chain_file_contents'),
id_recaptcha_public_key => hiera('openstackid_dev_recaptcha_public_key'),
id_recaptcha_private_key => hiera('openstackid_dev_recaptcha_private_key'),
app_url => 'https://openstackid-dev.openstack.org',
app_key => hiera('openstackid_dev_app_key'),
id_log_error_to_email => 'openstack@tipit.net',
id_log_error_from_email => 'noreply@openstack.org',
email_driver => 'smtp',
email_smtp_server => 'smtp.sendgrid.net',
email_smtp_server_user => hiera('openstackid_dev_smtp_user'),
email_smtp_server_password => hiera('openstackid_dev_smtp_password'),
}
}

View File

@ -41,6 +41,11 @@ class openstack_project::openstackid_dev (
$ssl_chain_file_contents = '',
$app_url = '',
$app_key = '',
$email_driver = 'mail',
$email_smtp_server = 'smtp.mailgun.org',
$email_smtp_server_port = 587,
$email_smtp_server_user = '',
$email_smtp_server_password = '',
) {
realize (
@ -54,32 +59,37 @@ class openstack_project::openstackid_dev (
}
class { 'openstackid':
site_admin_password => $site_admin_password,
id_mysql_host => $id_mysql_host,
id_mysql_user => $id_mysql_user,
id_mysql_password => $id_mysql_password,
id_db_name => $id_db_name,
ss_mysql_host => $ss_mysql_host,
ss_mysql_user => $ss_mysql_user,
ss_mysql_password => $ss_mysql_password,
ss_db_name => $ss_db_name,
redis_port => $redis_port,
redis_host => $redis_bind,
redis_password => $redis_password,
id_recaptcha_public_key => $id_recaptcha_public_key,
id_recaptcha_private_key => $id_recaptcha_private_key,
id_recaptcha_template => $id_recaptcha_template,
id_log_error_to_email => $id_log_error_to_email,
id_log_error_from_email => $id_log_error_from_email,
id_environment => $id_environment,
ssl_cert_file => "/etc/ssl/certs/${::fqdn}.pem",
ssl_key_file => "/etc/ssl/private/${::fqdn}.key",
ssl_chain_file => '/etc/ssl/certs/intermediate.pem',
ssl_cert_file_contents => $ssl_cert_file_contents,
ssl_key_file_contents => $ssl_key_file_contents,
ssl_chain_file_contents => $ssl_chain_file_contents,
app_url => $app_url,
app_key => $app_key,
site_admin_password => $site_admin_password,
id_mysql_host => $id_mysql_host,
id_mysql_user => $id_mysql_user,
id_mysql_password => $id_mysql_password,
id_db_name => $id_db_name,
ss_mysql_host => $ss_mysql_host,
ss_mysql_user => $ss_mysql_user,
ss_mysql_password => $ss_mysql_password,
ss_db_name => $ss_db_name,
redis_port => $redis_port,
redis_host => $redis_bind,
redis_password => $redis_password,
id_recaptcha_public_key => $id_recaptcha_public_key,
id_recaptcha_private_key => $id_recaptcha_private_key,
id_recaptcha_template => $id_recaptcha_template,
id_log_error_to_email => $id_log_error_to_email,
id_log_error_from_email => $id_log_error_from_email,
id_environment => $id_environment,
ssl_cert_file => "/etc/ssl/certs/${::fqdn}.pem",
ssl_key_file => "/etc/ssl/private/${::fqdn}.key",
ssl_chain_file => '/etc/ssl/certs/intermediate.pem',
ssl_cert_file_contents => $ssl_cert_file_contents,
ssl_key_file_contents => $ssl_key_file_contents,
ssl_chain_file_contents => $ssl_chain_file_contents,
app_url => $app_url,
app_key => $app_key,
email_driver => $email_driver,
email_smtp_server => $email_smtp_server,
email_smtp_server_port => $email_smtp_server_port,
email_smtp_server_user => $email_smtp_server_user,
email_smtp_server_password => $email_smtp_server_password,
}
# redis (custom module written by tipit)

View File

@ -42,6 +42,11 @@ class openstack_project::openstackid_prod (
$release = '1.0.13',
$app_url = '',
$app_key = '',
$email_driver = 'mail',
$email_smtp_server = 'smtp.mailgun.org',
$email_smtp_server_port = 587,
$email_smtp_server_user = '',
$email_smtp_server_password = '',
) {
class { 'openstack_project::server':
@ -50,34 +55,39 @@ class openstack_project::openstackid_prod (
}
class { 'openstackid':
site_admin_password => $site_admin_password,
id_mysql_host => $id_mysql_host,
id_mysql_user => $id_mysql_user,
id_mysql_password => $id_mysql_password,
id_db_name => $id_db_name,
ss_mysql_host => $ss_mysql_host,
ss_mysql_user => $ss_mysql_user,
ss_mysql_password => $ss_mysql_password,
ss_db_name => $ss_db_name,
redis_port => $redis_port,
redis_host => $redis_bind,
redis_password => $redis_password,
id_recaptcha_public_key => $id_recaptcha_public_key,
id_recaptcha_private_key => $id_recaptcha_private_key,
id_recaptcha_template => $id_recaptcha_template,
id_log_error_to_email => $id_log_error_to_email,
id_log_error_from_email => $id_log_error_from_email,
id_environment => $id_environment,
ssl_cert_file => "/etc/ssl/certs/${::fqdn}.pem",
ssl_key_file => "/etc/ssl/private/${::fqdn}.key",
ssl_chain_file => '/etc/ssl/certs/intermediate.pem',
ssl_cert_file_contents => $ssl_cert_file_contents,
ssl_key_file_contents => $ssl_key_file_contents,
ssl_chain_file_contents => $ssl_chain_file_contents,
openstackid_release => $release,
app_url => $app_url,
app_key => $app_key,
app_version => $release,
site_admin_password => $site_admin_password,
id_mysql_host => $id_mysql_host,
id_mysql_user => $id_mysql_user,
id_mysql_password => $id_mysql_password,
id_db_name => $id_db_name,
ss_mysql_host => $ss_mysql_host,
ss_mysql_user => $ss_mysql_user,
ss_mysql_password => $ss_mysql_password,
ss_db_name => $ss_db_name,
redis_port => $redis_port,
redis_host => $redis_bind,
redis_password => $redis_password,
id_recaptcha_public_key => $id_recaptcha_public_key,
id_recaptcha_private_key => $id_recaptcha_private_key,
id_recaptcha_template => $id_recaptcha_template,
id_log_error_to_email => $id_log_error_to_email,
id_log_error_from_email => $id_log_error_from_email,
id_environment => $id_environment,
ssl_cert_file => "/etc/ssl/certs/${::fqdn}.pem",
ssl_key_file => "/etc/ssl/private/${::fqdn}.key",
ssl_chain_file => '/etc/ssl/certs/intermediate.pem',
ssl_cert_file_contents => $ssl_cert_file_contents,
ssl_key_file_contents => $ssl_key_file_contents,
ssl_chain_file_contents => $ssl_chain_file_contents,
openstackid_release => $release,
app_url => $app_url,
app_key => $app_key,
app_version => $release,
email_driver => $email_driver,
email_smtp_server => $email_smtp_server,
email_smtp_server_port => $email_smtp_server_port,
email_smtp_server_user => $email_smtp_server_user,
email_smtp_server_password => $email_smtp_server_password,
}
# redis (custom module written by tipit)