From 3d12760e4a20b08646c1882d1bec92e706f9a5e8 Mon Sep 17 00:00:00 2001 From: Sebastian Marcet Date: Mon, 17 Dec 2018 12:55:04 -0300 Subject: [PATCH] Migrate OpenStackID dev server to php7 Update scripts to migrate IDP dev server to xenial and php7 Depends-On: https://review.openstack.org/631655 Change-Id: I0de414b6f6083016250f284203562ebe0e72193a --- manifests/site.pp | 5 +- .../manifests/openstackid_dev.pp | 107 ++++++++++------- .../manifests/openstackid_prod.pp | 110 ++++++++++-------- 3 files changed, 128 insertions(+), 94 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index 7c802d618e..48f2df7176 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1030,8 +1030,8 @@ node 'openstackid.org' { } } -# Node-OS: trusty -node /^openstackid-dev\d*\.open.*\.org$/ { +# Node-OS: xenial +node 'openstackid-dev.openstack.org' { class { 'openstack_project::openstackid_dev': site_admin_password => hiera('openstackid_dev_site_admin_password'), id_mysql_host => hiera('openstackid_dev_id_mysql_host', 'localhost'), @@ -1055,6 +1055,7 @@ node /^openstackid-dev\d*\.open.*\.org$/ { email_smtp_server => 'smtp.sendgrid.net', email_smtp_server_user => hiera('openstackid_dev_smtp_user'), email_smtp_server_password => hiera('openstackid_dev_smtp_password'), + php_version => 7, } } diff --git a/modules/openstack_project/manifests/openstackid_dev.pp b/modules/openstack_project/manifests/openstackid_dev.pp index 69333a5d07..46a07a0d58 100644 --- a/modules/openstack_project/manifests/openstackid_dev.pp +++ b/modules/openstack_project/manifests/openstackid_dev.pp @@ -59,56 +59,73 @@ class openstack_project::openstackid_dev ( $cache_driver = 'redis', $session_driver = 'redis', $session_cookie_secure = false, + $php_version = 5, + $mysql_ssl_enabled = false, + $mysql_ssl_ca_file = '/etc/mysql-client-ssl/ca-cert.pem', + $mysql_ssl_ca_file_contents = '', + $mysql_ssl_client_key_file = '/etc/mysql-client-ssl/client-key.pem', + $mysql_ssl_client_key_file_contents = '', + $mysql_ssl_client_cert_file = '/etc/mysql-client-ssl/client-cert.pem', + $mysql_ssl_client_cert_file_contents = '' + ) { class { 'openstack_project::server': } 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, - 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, - laravel_version => $laravel_version, - app_log_level => $app_log_level, - app_log_email_level => $app_log_email_level, - db_log_enabled => $db_log_enabled, - banning_enabled => $banning_enabled, - app_debug => $app_debug, - app_locale => $app_locale, - curl_verify_ssl_cert => $curl_verify_ssl_cert, - curl_allow_redirect => $curl_allow_redirect, - curl_timeout => $curl_timeout, - assets_base_url => $assets_base_url, - cache_driver => $cache_driver, - session_driver => $session_driver, - session_cookie_secure => $session_cookie_secure, + 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, + laravel_version => $laravel_version, + app_log_level => $app_log_level, + app_log_email_level => $app_log_email_level, + db_log_enabled => $db_log_enabled, + banning_enabled => $banning_enabled, + app_debug => $app_debug, + app_locale => $app_locale, + curl_verify_ssl_cert => $curl_verify_ssl_cert, + curl_allow_redirect => $curl_allow_redirect, + curl_timeout => $curl_timeout, + assets_base_url => $assets_base_url, + cache_driver => $cache_driver, + session_driver => $session_driver, + session_cookie_secure => $session_cookie_secure, + php_version => $php_version, + mysql_ssl_enabled => $mysql_ssl_enabled, + mysql_ssl_ca_file => $mysql_ssl_ca_file, + mysql_ssl_ca_file_contents => $mysql_ssl_ca_file_contents, + mysql_ssl_client_key_file => $mysql_ssl_client_key_file, + mysql_ssl_client_key_file_contents => $mysql_ssl_client_key_file_contents, + mysql_ssl_client_cert_file => $mysql_ssl_client_cert_file, + mysql_ssl_client_cert_file_contents => $mysql_ssl_client_cert_file_contents, } # redis (custom module written by tipit) diff --git a/modules/openstack_project/manifests/openstackid_prod.pp b/modules/openstack_project/manifests/openstackid_prod.pp index ad9eb20f72..a720d7ed7b 100644 --- a/modules/openstack_project/manifests/openstackid_prod.pp +++ b/modules/openstack_project/manifests/openstackid_prod.pp @@ -60,58 +60,74 @@ class openstack_project::openstackid_prod ( $cache_driver = 'redis', $session_driver = 'redis', $session_cookie_secure = false, + $php_version = 5, + $mysql_ssl_enabled = false, + $mysql_ssl_ca_file = '/etc/mysql-client-ssl/ca-cert.pem', + $mysql_ssl_ca_file_contents = '', + $mysql_ssl_client_key_file = '/etc/mysql-client-ssl/client-key.pem', + $mysql_ssl_client_key_file_contents = '', + $mysql_ssl_client_cert_file = '/etc/mysql-client-ssl/client-cert.pem', + $mysql_ssl_client_cert_file_contents = '' ) { class { 'openstack_project::server': } 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, - 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, - laravel_version => $laravel_version, - app_log_level => $app_log_level, - app_log_email_level => $app_log_email_level, - db_log_enabled => $db_log_enabled, - banning_enabled => $banning_enabled, - app_debug => $app_debug, - app_locale => $app_locale, - curl_verify_ssl_cert => $curl_verify_ssl_cert, - curl_allow_redirect => $curl_allow_redirect, - curl_timeout => $curl_timeout, - assets_base_url => $assets_base_url, - cache_driver => $cache_driver, - session_driver => $session_driver, - session_cookie_secure => $session_cookie_secure, + 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, + laravel_version => $laravel_version, + app_log_level => $app_log_level, + app_log_email_level => $app_log_email_level, + db_log_enabled => $db_log_enabled, + banning_enabled => $banning_enabled, + app_debug => $app_debug, + app_locale => $app_locale, + curl_verify_ssl_cert => $curl_verify_ssl_cert, + curl_allow_redirect => $curl_allow_redirect, + curl_timeout => $curl_timeout, + assets_base_url => $assets_base_url, + cache_driver => $cache_driver, + session_driver => $session_driver, + session_cookie_secure => $session_cookie_secure, + php_version => $php_version, + mysql_ssl_enabled => $mysql_ssl_enabled, + mysql_ssl_ca_file => $mysql_ssl_ca_file, + mysql_ssl_ca_file_contents => $mysql_ssl_ca_file_contents, + mysql_ssl_client_key_file => $mysql_ssl_client_key_file, + mysql_ssl_client_key_file_contents => $mysql_ssl_client_key_file_contents, + mysql_ssl_client_cert_file => $mysql_ssl_client_cert_file, + mysql_ssl_client_cert_file_contents => $mysql_ssl_client_cert_file_contents, } # redis (custom module written by tipit)