From 8e9011171d6ea47bc9c17fd9dfefa23fd62ff3a3 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 23 Apr 2014 09:41:47 -0700 Subject: [PATCH] Switch review.o.o to testmode Also, cause testmode to disable manage-projects on gerrit servers. This will cause puppet to stop writing the replication config (but leave it in place on the production server) and also stop running manage-projects. This is so that we can spin up a new gerrit server without it immediately creating projects or replicating. Also, remove the gerrit::mysql module so we can replace it with a trove database. Again, the existing mysql databases should be untouched. Change-Id: I157993297ae8168064ef5b368d42dc93989aef21 --- modules/openstack_project/manifests/gerrit.pp | 30 ++++++++++--------- modules/openstack_project/manifests/review.pp | 9 +----- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/modules/openstack_project/manifests/gerrit.pp b/modules/openstack_project/manifests/gerrit.pp index 1318b5412e..42b827a722 100644 --- a/modules/openstack_project/manifests/gerrit.pp +++ b/modules/openstack_project/manifests/gerrit.pp @@ -375,20 +375,22 @@ class openstack_project::gerrit ( require => Class['::gerrit'] } - exec { 'manage_projects': - command => '/usr/local/bin/manage-projects', - timeout => 900, # 15 minutes - subscribe => [ - File['/home/gerrit2/projects.yaml'], - File['/home/gerrit2/acls'], - ], - refreshonly => true, - logoutput => true, - require => [ - File['/home/gerrit2/projects.yaml'], - File['/home/gerrit2/acls'], - Class['jeepyb'], - ], + if ($testmode == false) { + exec { 'manage_projects': + command => '/usr/local/bin/manage-projects', + timeout => 900, # 15 minutes + subscribe => [ + File['/home/gerrit2/projects.yaml'], + File['/home/gerrit2/acls'], + ], + refreshonly => true, + logoutput => true, + require => [ + File['/home/gerrit2/projects.yaml'], + File['/home/gerrit2/acls'], + Class['jeepyb'], + ], + } } } file { '/home/gerrit2/review_site/bin/set_agreements.sh': diff --git a/modules/openstack_project/manifests/review.pp b/modules/openstack_project/manifests/review.pp index 6324ba860d..709317bba1 100644 --- a/modules/openstack_project/manifests/review.pp +++ b/modules/openstack_project/manifests/review.pp @@ -76,15 +76,8 @@ class openstack_project::review ( $swift_password = '' ) { - # Setup MySQL - class { 'gerrit::mysql': - mysql_root_password => $mysql_root_password, - database_name => 'reviewdb', - database_user => 'gerrit2', - database_password => $mysql_password, - } - class { 'openstack_project::gerrit': + testmode => true, ssl_cert_file => '/etc/ssl/certs/review.openstack.org.pem', ssl_key_file =>