From 2ce47e76dad43e02a949a1f0d45aeb586cfd2be9 Mon Sep 17 00:00:00 2001 From: Mikhail S Medvedev Date: Wed, 28 Jan 2015 09:10:48 -0600 Subject: [PATCH] Split out gerrit module The spec: http://specs.openstack.org/openstack-infra/infra-specs/specs/puppet-modules.html Depends-On: Id7e8173438ed065bc64d120a0468c112ac2a3227 Change-Id: Idb0c6710ef98c033a64f6eb56e73b987e9026f08 --- modules.env | 1 + modules/gerrit/files/fakestore.cgi | 5 - modules/gerrit/files/gerritcodereview.default | 1 - modules/gerrit/files/stackforge.png | Bin 4665 -> 0 bytes modules/gerrit/manifests/cron.pp | 23 - modules/gerrit/manifests/init.pp | 687 ------------------ modules/gerrit/manifests/mysql.pp | 32 - modules/gerrit/manifests/plugin.pp | 78 -- modules/gerrit/manifests/remotes.pp | 21 - modules/gerrit/manifests/user.pp | 27 - .../templates/contact_information.pub.erb | 1 - modules/gerrit/templates/gerrit.config.erb | 143 ---- modules/gerrit/templates/gerrit.vhost.erb | 89 --- .../gerrit/templates/replication.config.erb | 22 - modules/gerrit/templates/secure.config.erb | 4 - 15 files changed, 1 insertion(+), 1133 deletions(-) delete mode 100644 modules/gerrit/files/fakestore.cgi delete mode 100644 modules/gerrit/files/gerritcodereview.default delete mode 100644 modules/gerrit/files/stackforge.png delete mode 100644 modules/gerrit/manifests/cron.pp delete mode 100644 modules/gerrit/manifests/init.pp delete mode 100644 modules/gerrit/manifests/mysql.pp delete mode 100644 modules/gerrit/manifests/plugin.pp delete mode 100644 modules/gerrit/manifests/remotes.pp delete mode 100644 modules/gerrit/manifests/user.pp delete mode 100644 modules/gerrit/templates/contact_information.pub.erb delete mode 100644 modules/gerrit/templates/gerrit.config.erb delete mode 100644 modules/gerrit/templates/gerrit.vhost.erb delete mode 100644 modules/gerrit/templates/replication.config.erb delete mode 100644 modules/gerrit/templates/secure.config.erb diff --git a/modules.env b/modules.env index bd4a013c51..922dfacd3a 100644 --- a/modules.env +++ b/modules.env @@ -57,6 +57,7 @@ SOURCE_MODULES["https://github.com/puppet-community/puppet-module-puppetboard"]= # Add modules that should be part of the openstack-infra integration test here INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-elasticsearch"]="origin/master" +INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-gerrit"]="origin/master" INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-storyboard"]="origin/master" INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-kibana"]="origin/master" INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-lodgeit"]="origin/master" diff --git a/modules/gerrit/files/fakestore.cgi b/modules/gerrit/files/fakestore.cgi deleted file mode 100644 index 3900f578e8..0000000000 --- a/modules/gerrit/files/fakestore.cgi +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -echo 'Content-Type: text/html - -OK' diff --git a/modules/gerrit/files/gerritcodereview.default b/modules/gerrit/files/gerritcodereview.default deleted file mode 100644 index 8eb82bd168..0000000000 --- a/modules/gerrit/files/gerritcodereview.default +++ /dev/null @@ -1 +0,0 @@ -GERRIT_SITE=/home/gerrit2/review_site diff --git a/modules/gerrit/files/stackforge.png b/modules/gerrit/files/stackforge.png deleted file mode 100644 index 29a3ec894b0e46b7b27176231c9d90bfbb837494..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4665 zcmV-962|R`P)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2iyZ1 z4GkR+Tsjy401>%KL_t(|+U=Zqa2(a0$3L&T=ahWNrw%)|v20leoAIz*=172Wg=OQA zaBXlPSrWE@o@H|Y%aM?fHD#7?Oan_cn+gWXSqwHuZPf;nic`j1+3cVg%wSB20UKYE zWgV7gG&BA7kA7{n#~N8PvW<`ambzX~zkW}z`+fU&yfK z)31~gKyK$B%2$W{eb5Srq&+k zPw7!ESs$D+`PG_WV17-|pei6RG{J$Auu57Yk&e-z_I1rb*E9k~09`lGG#x`X2p9o0 z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M3LOP_g11AdN^N!6^JsxIJvao*xxG2G8> zmRuCrwQJXw>gwunwI*h57J)U#ke{IqL(=*<@)1j=mv8_-wKQlj+0cxS1BS7orFPPX zn}d;z?ZlD}hx?ZGsdMB(AFMKy&B(rdzRi$qYM)pa3Kt5qYw~>o0gMdj)Q62j?Rq4T zZCbtVMt^FLGO_|l+h%7+XRBu0Tf1xP#|G`fF=KLlfl;3=SxbG!Xgv^n_~W*2e`=3B z43TY8wzls0v#uMDwM=Tzfs3Y*i5w(@pbIBHw;lC$L7cVy_tbs|@L|*Hb#4B1`eX&5 zH{08{W%H)hxqLofm^>+4oA3VW3FN~0(r*1wK5@BIm0l9AbN8E8uWR?G$Vb^^1<2&` z`Hr1C-q1Cz^Z7{)YfsL#&u%p2RS01t<#vSlD^3>APSH=oor-+xnpUsd;oou}K79D_ v;lqayA3l8e@ZrOU4<9~!`0(N5v%&uZcuX{~Lwxnj00000NkvXXu0mjfo^$1H diff --git a/modules/gerrit/manifests/cron.pp b/modules/gerrit/manifests/cron.pp deleted file mode 100644 index 697597c0e3..0000000000 --- a/modules/gerrit/manifests/cron.pp +++ /dev/null @@ -1,23 +0,0 @@ -# == Class: gerrit::cron -# -class gerrit::cron { - - cron { 'gerrit_repack': - user => 'gerrit2', - weekday => '0', - hour => '4', - minute => '7', - command => 'find /home/gerrit2/review_site/git/ -type d -name "*.git" -print -exec git --git-dir="{}" repack -afd \;', - environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin', - } - - cron { 'expireoldreviews': - ensure => 'absent', - user => 'gerrit2', - } - - cron { 'removedbdumps': - ensure => 'absent', - user => 'gerrit2', - } -} diff --git a/modules/gerrit/manifests/init.pp b/modules/gerrit/manifests/init.pp deleted file mode 100644 index ce9cbf609a..0000000000 --- a/modules/gerrit/manifests/init.pp +++ /dev/null @@ -1,687 +0,0 @@ -# Install and maintain Gerrit Code Review. -# params: -# mysql_host: -# The mysql host to which gerrit should connect. -# mysql_password: -# The password with which gerrit connects to mysql. -# vhost_name: -# used in the Apache virtual host, eg., review.example.com -# canonicalweburl: -# Used in the Gerrit config to generate links, -# eg., https://review.example.com/ -# ssl_cert_file: -# ssl_key_file: -# Used in the Apache virtual host to specify the SSL cert and key files. -# ssl_chain_file: -# Optional, if you have an intermediate cert Apache should serve. -# ssl_*_file_contents: -# Optional, the contents of the respective cert files as a string. Will be -# used to have Puppet ensure the contents of these files. Default value of -# '' means Puppet should not manage these files. -# openidssourl: -# The URL to use for OpenID in SSO mode. -# email: -# The email address Gerrit should use when sending mail. -# smtpserver: -# The smtp server that Gerrit should send mail through. -# sendemail_from: -# gerrit.conf value for sendemail.from. -# database_poollimit: -# container_heaplimit: -# core_packedgitopenfiles: -# core_packedgitlimit: -# core_packedgitwindowsize: -# sshd_threads: -# sshd_listen_address: -# httpd_acceptorthreads: -# httpd_minthreads: -# httpd_maxthreads: -# httpd_maxwait: -# Gerrit configuration options; see Gerrit docs. -# commentlinks: -# A list of regexes Gerrit should hyperlink. -# trackingids: -# A list of regexes to reference external tracking systems. -# war: -# The URL of the Gerrit WAR that should be downloaded and installed. -# Note that only the final component is used for comparing to the most -# recently installed WAR. In other words, if you update the war from: -# -# http://tarballs.openstack.org/ci/gerrit.war -# to: -# http://somewhereelse.example.com/gerrit.war -# -# Gerrit won't be updated unless you delete gerrit.war from -# ~gerrit2/gerrit-wars. But if you change the URL from: -# -# http://tarballs.openstack.org/ci/gerrit-2.2.2.war -# to: -# http://tarballs.openstack.org/ci/gerrit-2.3.0.war -# Gerrit will be upgraded on the next puppet run. -# contactstore: -# A boolean enabling the contact store feature -# contactstore_appsec: -# An application shared secret for the contact store protocol -# contactstore_pubkey: -# A public key with which to encrypt contact information -# contactstore_url: -# A URL for the remote contact store application -# replicate_local: -# A boolean enabling local replication for apache acceleration -# replicate_path: -# The path to the local git replica if replicate_local is enabled -# gitweb: -# A boolean enabling gitweb -# cgit: -# A boolean enabling cgit -# web_repo_url: -# Url for setting the location of an external git browser -# testmode: -# Set this to true to disable cron jobs and replication, -# which can interfere with testing. -# secondary_index: -# Set this to true to enable secondary index support -# secondary_index_type: -# which secondary index to use: SQL (no secondary index), -# LUCENE (recommended), SOLR (experimental). Note: as of -# Gerrit 2.9 LUCENE is default secondary index and SQL is -# removed. -# TODO: make more gerrit options configurable here -# -class gerrit( - $mysql_host = 'localhost', - $mysql_password, - $war = '', - $email_private_key = '', - $vhost_name = $::fqdn, - $canonicalweburl = "https://${::fqdn}/", - $robots_txt_source = '', # If left empty, the gerrit default will be used. - $serveradmin = "webmaster@${::fqdn}", - $ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem', - $ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key', - $ssl_chain_file = '', - $ssl_cert_file_contents = '', # If left empty puppet will not create file. - $ssl_key_file_contents = '', # If left empty puppet will not create file. - $ssl_chain_file_contents = '', # If left empty puppet will not create file. - $ssh_dsa_key_contents = '', # If left empty puppet will not create file. - $ssh_dsa_pubkey_contents = '', # If left empty puppet will not create file. - $ssh_rsa_key_contents = '', # If left empty puppet will not create file. - $ssh_rsa_pubkey_contents = '', # If left empty puppet will not create file. - $ssh_project_rsa_key_contents = '', # If left empty will not create file. - $ssh_project_rsa_pubkey_contents = '', # If left empty will not create file. - $ssh_replication_rsa_key_contents = '', # If left emptry will not create files. - $ssh_replication_rsa_pubkey_contents = '', # If left emptry will not create files. - $gerrit_auth_type = 'OPENID_SSO', - $gerrit_contributor_agreement = true, - $openidssourl = 'https://login.launchpad.net/+openid', - $ldap_server = '', - $ldap_account_base = '', - $ldap_username = '', - $ldap_password = '', - $ldap_account_pattern = '', - $ldap_account_email_address = '', - $ldap_sslverify = true, - $ldap_ssh_account_name = '', - $ldap_accountfullname = '', - $email = '', - $smtpserver = 'localhost', - $sendemail_from = 'MIXED', - $database_poollimit = '', - $container_heaplimit = '', - $core_packedgitopenfiles = '', - $core_packedgitlimit = '', - $core_packedgitwindowsize = '', - $sshd_threads = '', - $sshd_listen_address = '*:29418', - $httpd_acceptorthreads = '', - $httpd_minthreads = '', - $httpd_maxthreads = '', - $httpd_maxwait = '', - $commentlinks = [], - $trackingids = [], - $contactstore = false, - $contactstore_appsec = '', - $contactstore_pubkey = '', - $contactstore_url = '', - $enable_melody = false, - $melody_session = false, - $replicate_local = false, - $replicate_path = '/opt/lib/git', - $replication = [], - $gitweb = true, - $cgit = false, - $web_repo_url = '', - $testmode = false, - $secondary_index = false, - $secondary_index_type = 'LUCENE', - $enable_javamelody_top_menu = false, -) { - include apache - include jeepyb - include pip - - $java_home = $::lsbdistcodename ? { - 'precise' => '/usr/lib/jvm/java-7-openjdk-amd64/jre', - } - - $gerrit_war = '/home/gerrit2/review_site/bin/gerrit.war' - $gerrit_site = '/home/gerrit2/review_site' - - include gerrit::user - - if ($gitweb) { - package { 'gitweb': - ensure => present, - } - } - - package { 'unzip': - ensure => present, - } - - package { 'openjdk-7-jre-headless': - ensure => present, - } - - package { 'openjdk-6-jre-headless': - ensure => purged, - require => Package['openjdk-7-jre-headless'], - } - - file { '/var/log/gerrit': - ensure => directory, - owner => 'gerrit2', - } - - if ((!defined(File['/opt/lib'])) - and ($replicate_path =~ /^\/opt\/lib\/.*$/)) { - file { '/opt/lib': - ensure => directory, - owner => root, - } - } - - # Prepare gerrit directories. Even though some of these would be created - # by the init command, we can go ahead and create them now and populate them. - # That way the config files are already in place before init runs. - - file { '/home/gerrit2/review_site': - ensure => directory, - owner => 'gerrit2', - require => User['gerrit2'], - } - - file { '/home/gerrit2/review_site/plugins': - ensure => directory, - owner => 'gerrit2', - require => [User['gerrit2'], File['/home/gerrit2/review_site']], - } - - file { '/home/gerrit2/.ssh': - ensure => directory, - owner => 'gerrit2', - mode => '0700', - require => User['gerrit2'], - } - - file { '/home/gerrit2/review_site/etc': - ensure => directory, - owner => 'gerrit2', - require => File['/home/gerrit2/review_site'], - } - - file { '/home/gerrit2/review_site/bin': - ensure => directory, - owner => 'gerrit2', - require => File['/home/gerrit2/review_site'], - } - - file { '/home/gerrit2/review_site/static': - ensure => directory, - owner => 'gerrit2', - require => File['/home/gerrit2/review_site'], - } - - file { '/home/gerrit2/review_site/hooks': - ensure => directory, - owner => 'gerrit2', - require => File['/home/gerrit2/review_site'], - } - - file { '/home/gerrit2/review_site/lib': - ensure => directory, - owner => 'gerrit2', - require => File['/home/gerrit2/review_site'], - } - - # Skip replication if we're in test mode - if ($testmode == false) { - # Template uses $replication - file { '/home/gerrit2/review_site/etc/replication.config': - ensure => present, - owner => 'root', - group => 'root', - mode => '0444', - content => template('gerrit/replication.config.erb'), - replace => true, - require => File['/home/gerrit2/review_site/etc'], - } - } - - # Gerrit sets these permissions in 'init'; don't fight them. - # Template uses: - # - $mysql_host - # - $canonicalweburl - # - $database_poollimit - # - $gerrit_contributor_agreement - # - $gerrit_auth_type - # - $openidssourl - # - $ldap_server - # - $ldap_username - # - $ldap_password - # - $ldap_account_base - # - $ldap_account_pattern - # - $ldap_account_email_address - # - $smtpserver - # - $sendmail_from - # - $java_home - # - $container_heaplimit - # - $core_packedgitopenfiles - # - $core_packedgitlimit - # - $core_packedgitwindowsize - # - $sshd_listen_address - # - $sshd_threads - # - $httpd_maxwait - # - $httpd_acceptorthreads - # - $httpd_minthreads - # - $httpd_maxthreads - # - $commentlinks - # - $trackingids - # - $enable_melody - # - $melody_session - # - $gitweb - # - $contactstore_appsec - # - $contactstore_url - file { '/home/gerrit2/review_site/etc/gerrit.config': - ensure => present, - owner => 'gerrit2', - group => 'gerrit2', - mode => '0644', - content => template('gerrit/gerrit.config.erb'), - replace => true, - require => File['/home/gerrit2/review_site/etc'], - } - - # Secret files. - - # Gerrit sets these permissions in 'init'; don't fight them. If - # these permissions aren't set correctly, gerrit init will write a - # new secure.config file and lose the mysql password. - # Template uses $mysql_password, $email_private_key - file { '/home/gerrit2/review_site/etc/secure.config': - ensure => present, - owner => 'gerrit2', - group => 'gerrit2', - mode => '0600', - content => template('gerrit/secure.config.erb'), - replace => true, - require => File['/home/gerrit2/review_site/etc'], - } - - # Set up apache. - - # Template uses: - # - $vhost_name - # - $serveradmin - # - $ssl_cert_file - # - $ssl_key_file - # - $ssl_chain_file - # - $canonicalweburl - # - $replicate_local - # - $replicate_path - # - $contactstore - # - $robots_txt_source - apache::vhost { $vhost_name: - port => 443, - docroot => 'MEANINGLESS ARGUMENT', - priority => '50', - template => 'gerrit/gerrit.vhost.erb', - ssl => true, - } - a2mod { 'rewrite': - ensure => present, - } - a2mod { 'proxy': - ensure => present, - } - a2mod { 'proxy_http': - ensure => present, - } - - if $ssl_cert_file_contents != '' { - file { $ssl_cert_file: - owner => 'root', - group => 'root', - mode => '0640', - content => $ssl_cert_file_contents, - before => Apache::Vhost[$vhost_name], - } - } - - if $ssl_key_file_contents != '' { - file { $ssl_key_file: - owner => 'root', - group => 'ssl-cert', - mode => '0640', - content => $ssl_key_file_contents, - before => Apache::Vhost[$vhost_name], - } - } - - if $ssl_chain_file_contents != '' { - file { $ssl_chain_file: - owner => 'root', - group => 'root', - mode => '0640', - content => $ssl_chain_file_contents, - before => Apache::Vhost[$vhost_name], - } - } - - if $robots_txt_source != '' { - file { '/home/gerrit2/review_site/static/robots.txt': - owner => 'root', - group => 'root', - mode => '0444', - source => $robots_txt_source, - require => File['/home/gerrit2/review_site/static'], - } - } - - if $ssh_dsa_key_contents != '' { - file { '/home/gerrit2/review_site/etc/ssh_host_dsa_key': - owner => 'gerrit2', - group => 'gerrit2', - mode => '0600', - content => $ssh_dsa_key_contents, - replace => true, - require => File['/home/gerrit2/review_site/etc'] - } - } - - if $ssh_dsa_pubkey_contents != '' { - file { '/home/gerrit2/review_site/etc/ssh_host_dsa_key.pub': - owner => 'gerrit2', - group => 'gerrit2', - mode => '0644', - content => $ssh_dsa_pubkey_contents, - replace => true, - require => File['/home/gerrit2/review_site/etc'] - } - } - - if $ssh_rsa_key_contents != '' { - file { '/home/gerrit2/review_site/etc/ssh_host_rsa_key': - owner => 'gerrit2', - group => 'gerrit2', - mode => '0600', - content => $ssh_rsa_key_contents, - replace => true, - require => File['/home/gerrit2/review_site/etc'] - } - } - - if $ssh_rsa_pubkey_contents != '' { - file { '/home/gerrit2/review_site/etc/ssh_host_rsa_key.pub': - owner => 'gerrit2', - group => 'gerrit2', - mode => '0644', - content => $ssh_rsa_pubkey_contents, - replace => true, - require => File['/home/gerrit2/review_site/etc'] - } - } - - if $ssh_project_rsa_key_contents != '' { - file { '/home/gerrit2/review_site/etc/ssh_project_rsa_key': - owner => 'gerrit2', - group => 'gerrit2', - mode => '0600', - content => $ssh_project_rsa_key_contents, - replace => true, - require => File['/home/gerrit2/review_site/etc'] - } - } - - if $ssh_project_rsa_pubkey_contents != '' { - file { '/home/gerrit2/review_site/etc/ssh_project_rsa_key.pub': - owner => 'gerrit2', - group => 'gerrit2', - mode => '0644', - content => $ssh_project_rsa_pubkey_contents, - replace => true, - require => File['/home/gerrit2/review_site/etc'] - } - } - - if $ssh_replication_rsa_key_contents != '' { - file { '/home/gerrit2/.ssh/id_rsa': - owner => 'gerrit2', - group => 'gerrit2', - mode => '0600', - content => $ssh_replication_rsa_key_contents, - replace => true, - require => File['/home/gerrit2/.ssh'] - } - } - - if $ssh_replication_rsa_pubkey_contents != '' { - file { '/home/gerrit2/id_rsa.pub': - owner => 'gerrit2', - group => 'gerrit2', - mode => '0644', - content => $ssh_replication_rsa_pubkey_contents, - replace => true, - require => File['/home/gerrit2/.ssh'] - } - } - - # Install Gerrit itself. - - # The Gerrit WAR is specified as a url like - # 'http://tarballs.openstack.org/ci/gerrit-2.2.2-363-gd0a67ce.war' - # Set $basewar so that we can work with filenames like - # gerrit-2.2.2-363-gd0a67ce.war'. - - if $war =~ /.*\/(.*)/ { - $basewar = $1 - } else { - $basewar = $war - } - - # This directory is used to download and cache gerrit war files. - # That way the download and install steps are kept separate. - file { '/home/gerrit2/gerrit-wars': - ensure => directory, - require => User['gerrit2'], - } - - # If we don't already have the specified WAR, download it. - exec { "download:${war}": - command => "/usr/bin/wget ${war} -O /home/gerrit2/gerrit-wars/${basewar}", - creates => "/home/gerrit2/gerrit-wars/${basewar}", - require => File['/home/gerrit2/gerrit-wars'], - } - - # If gerrit.war isn't the same as $basewar, install it. - file { $gerrit_war: - ensure => present, - source => "file:///home/gerrit2/gerrit-wars/${basewar}", - require => Exec["download:${war}"], - replace => true, - # user, group, and mode have to be set this way to avoid retriggering - # gerrit-init on every run because gerrit init sets them this way - owner => 'gerrit2', - group => 'gerrit2', - mode => '0644', - } - - - # If gerrit.war was just installed, run the Gerrit "init" command. - exec { 'gerrit-initial-init': - user => 'gerrit2', - command => "/usr/bin/java -jar ${gerrit_war} init -d ${gerrit_site} --batch --no-auto-start; /usr/bin/java -jar ${gerrit_war} reindex -d ${gerrit_site}", - subscribe => File['/home/gerrit2/review_site/bin/gerrit.war'], - refreshonly => true, - require => [Package['openjdk-7-jre-headless'], - User['gerrit2'], - File['/home/gerrit2/review_site/etc/gerrit.config'], - File['/home/gerrit2/review_site/etc/secure.config']], - notify => Exec['install-core-plugins'], - unless => '/usr/bin/test -f /etc/init.d/gerrit', - logoutput => true, - } - - # If a new gerrit.war was just installed, run the Gerrit "init" command. - # Stop is included here because it may not be running or the init - # script may not exist, and in those cases, we don't care if it fails. - # Running the init script as the gerrit2 user _does_ work. - exec { 'gerrit-init': - user => 'gerrit2', - command => "/etc/init.d/gerrit stop; /usr/bin/java -jar ${gerrit_war} init -d ${gerrit_site} --batch --no-auto-start; /usr/bin/java -jar ${gerrit_war} reindex -d ${gerrit_site}", - subscribe => File['/home/gerrit2/review_site/bin/gerrit.war'], - refreshonly => true, - require => [Package['openjdk-7-jre-headless'], - User['gerrit2'], - File['/home/gerrit2/review_site/etc/gerrit.config'], - File['/home/gerrit2/review_site/etc/secure.config']], - notify => Exec['install-core-plugins'], - onlyif => '/usr/bin/test -f /etc/init.d/gerrit', - logoutput => true, - } - - # Install Core Plugins - exec { 'install-core-plugins': - user => 'gerrit2', - command => '/usr/bin/unzip -jo /home/gerrit2/review_site/bin/gerrit.war WEB-INF/plugins/* -d /home/gerrit2/review_site/plugins || true', - subscribe => File['/home/gerrit2/review_site/bin/gerrit.war'], - require => [Package['unzip'], - File['/home/gerrit2/review_site/plugins']], - notify => Exec['gerrit-start'], - refreshonly => true, - logoutput => true, - } - - # Symlink the init script. - file { '/etc/init.d/gerrit': - ensure => link, - target => '/home/gerrit2/review_site/bin/gerrit.sh', - require => Exec['gerrit-initial-init'], - } - - # The init script requires the path to gerrit to be set. - file { '/etc/default/gerritcodereview': - ensure => present, - source => 'puppet:///modules/gerrit/gerritcodereview.default', - replace => true, - owner => 'root', - group => 'root', - mode => '0444', - } - - # Make sure the init script starts on boot. - file { ['/etc/rc0.d/K10gerrit', - '/etc/rc1.d/K10gerrit', - '/etc/rc2.d/S90gerrit', - '/etc/rc3.d/S90gerrit', - '/etc/rc4.d/S90gerrit', - '/etc/rc5.d/S90gerrit', - '/etc/rc6.d/K10gerrit']: - ensure => link, - target => '/etc/init.d/gerrit', - require => File['/etc/init.d/gerrit'], - } - - exec { 'gerrit-start': - command => '/etc/init.d/gerrit start', - require => File['/etc/init.d/gerrit'], - refreshonly => true, - } - - file { '/usr/local/gerrit': - ensure => directory, - owner => 'root', - group => 'root', - mode => '0755', - } - - file { '/usr/local/gerrit/scripts': - ensure => absent, - } - - package { 'libmysql-java': - ensure => present, - } - file { '/home/gerrit2/review_site/lib/mysql-connector-java.jar': - ensure => link, - target => '/usr/share/java/mysql-connector-java.jar', - require => [ - Package['libmysql-java'], - File['/home/gerrit2/review_site/lib'], - ], - } - file { '/home/gerrit2/review_site/lib/mysql-connector-java-5.1.10.jar': - ensure => absent, - require => File['/home/gerrit2/review_site/lib/mysql-connector-java.jar'], - } - - package { 'libbcprov-java': - ensure => present, - } - file { '/home/gerrit2/review_site/lib/bcprov.jar': - ensure => link, - target => '/usr/share/java/bcprov.jar', - require => [ - Package['libbcprov-java'], - File['/home/gerrit2/review_site/lib'], - ], - } - file { '/home/gerrit2/review_site/lib/bcprov-jdk16-144.jar': - ensure => absent, - require => File['/home/gerrit2/review_site/lib/bcprov.jar'], - } - - # Install Bouncy Castle's OpenPGP plugin and populate the contact store - # public key file if we're using that feature. - if ($contactstore == true) { - package { 'libbcpg-java': - ensure => present, - } - file { '/home/gerrit2/review_site/lib/bcpg.jar': - ensure => link, - target => '/usr/share/java/bcpg.jar', - require => [ - Package['libbcpg-java'], - File['/home/gerrit2/review_site/lib'], - ], - } - # Template uses $contactstore_pubkey - file { '/home/gerrit2/review_site/etc/contact_information.pub': - ensure => present, - owner => 'root', - group => 'root', - mode => '0444', - content => template('gerrit/contact_information.pub.erb'), - replace => true, - require => File['/home/gerrit2/review_site/etc'], - } - file { '/home/gerrit2/review_site/lib/fakestore.cgi': - ensure => present, - owner => 'root', - group => 'root', - mode => '0555', - source => 'puppet:///modules/gerrit/fakestore.cgi', - require => File['/home/gerrit2/review_site/lib'], - } - } -} diff --git a/modules/gerrit/manifests/mysql.pp b/modules/gerrit/manifests/mysql.pp deleted file mode 100644 index cc834d9b05..0000000000 --- a/modules/gerrit/manifests/mysql.pp +++ /dev/null @@ -1,32 +0,0 @@ -# == Class: gerrit::mysql -# -class gerrit::mysql( - $mysql_root_password = '', - $database_name = '', - $database_user = '', - $database_password = '', -) { - - class { 'mysql::server': - config_hash => { - 'root_password' => $mysql_root_password, - 'default_engine' => 'InnoDB', - 'bind_address' => '127.0.0.1', - } - } - include mysql::server::account_security - - mysql::db { $database_name: - user => $database_user, - password => $database_password, - host => 'localhost', - grant => ['all'], - charset => 'latin1', - require => [ - Class['mysql::server'], - Class['mysql::server::account_security'], - ], - } -} - -# vim:sw=2:ts=2:expandtab:textwidth=79 diff --git a/modules/gerrit/manifests/plugin.pp b/modules/gerrit/manifests/plugin.pp deleted file mode 100644 index 828a598aa2..0000000000 --- a/modules/gerrit/manifests/plugin.pp +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright (C) 2014 R. Tyler Croy -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Defined resource type to install gerrit plugins. -# -# Borrowed from: https://github.com/jenkinsci/puppet-jenkins -# - -define gerrit::plugin( - $version=0, -) { - $base_plugin = "${name}.jar" - $plugin = "${name}-${version}.jar" - $plugin_cache_dir = '/home/gerrit2/gerrit-plugins' - $plugin_dir = '/home/gerrit2/review_site/plugins' - $plugin_parent_dir = '/home/gerrit2/review_site' - $base_url = "http://tarballs.openstack.org/ci/gerrit/plugins/${name}" - - include gerrit::user - - # This directory is used to download and cache gerrit plugin files. - # That way the download and install steps are kept separate. - if (!defined(File[$plugin_cache_dir])) { - file { $plugin_cache_dir: - ensure => directory, - owner => 'gerrit2', - group => 'gerrit2', - require => [ - File[$plugin_parent_dir], - Class['gerrit::user'], - ], - } - } - - # If we don't already have the specified plugin, download it. - exec { "download-${plugin}": - command => "wget ${base_url}/${plugin} -O ${plugin_cache_dir}/${plugin}", - path => ['/bin','/usr/bin', '/usr/sbin', '/usr/local/bin'], - creates => "${plugin_cache_dir}/${plugin}", - user => 'gerrit2', - require => [ - File[$plugin_cache_dir], - Class['gerrit::user'], - ], - } - - if (!defined(File[$plugin_dir])) { - file { $plugin_dir: - ensure => directory, - owner => 'gerrit2', - group => 'gerrit2', - require => [ - File[$plugin_parent_dir], - Class['gerrit::user'], - ], - } - } - - exec { "install-${base_plugin}": - command => "cp ${plugin_cache_dir}/${plugin} ${plugin_dir}/${base_plugin}", - path => ['/bin','/usr/bin', '/usr/sbin', '/usr/local/bin'], - require => Exec["download-${plugin}"], - user => 'gerrit2', - unless => "test -f ${plugin_dir}/${base_plugin}", - } - -} diff --git a/modules/gerrit/manifests/remotes.pp b/modules/gerrit/manifests/remotes.pp deleted file mode 100644 index 43c426bda1..0000000000 --- a/modules/gerrit/manifests/remotes.pp +++ /dev/null @@ -1,21 +0,0 @@ -# == Class: gerrit::remotes -# -class gerrit::remotes($ensure=present) { - cron { 'gerritfetchremotes': - ensure => $ensure, - user => 'gerrit2', - minute => '*/30', - command => 'sleep $((RANDOM\%60+90)) && /usr/local/bin/manage-projects', - require => [Class['jeepyb'], File['/var/lib/jeepyb']], - } - - file { '/var/lib/jeepyb': - ensure => directory, - owner => 'gerrit2', - require => User['gerrit2'], - } - - file { '/home/gerrit2/remotes.config': - ensure => absent, - } -} diff --git a/modules/gerrit/manifests/user.pp b/modules/gerrit/manifests/user.pp deleted file mode 100644 index 58fd610331..0000000000 --- a/modules/gerrit/manifests/user.pp +++ /dev/null @@ -1,27 +0,0 @@ -# == Class: gerrit::user -# -class gerrit::user { - - group { 'gerrit2': - ensure => present, - } - - user { 'gerrit2': - ensure => present, - comment => 'Gerrit2 User', - home => '/home/gerrit2', - gid => 'gerrit2', - shell => '/bin/bash', - membership => 'minimum', - require => Group['gerrit2'], - } - - file { '/home/gerrit2': - ensure => directory, - owner => 'gerrit2', - group => 'gerrit2', - mode => '0644', - require => User['gerrit2'], - } - -} diff --git a/modules/gerrit/templates/contact_information.pub.erb b/modules/gerrit/templates/contact_information.pub.erb deleted file mode 100644 index 0e95adc7d3..0000000000 --- a/modules/gerrit/templates/contact_information.pub.erb +++ /dev/null @@ -1 +0,0 @@ -<%= @contactstore_pubkey %> diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb deleted file mode 100644 index d93882c64c..0000000000 --- a/modules/gerrit/templates/gerrit.config.erb +++ /dev/null @@ -1,143 +0,0 @@ -# This file is managed by puppet. -# https://git.openstack.org/cgit/openstack-infra/system-config - -[gerrit] - basePath = git - canonicalWebUrl = <%= @canonicalweburl %> -[database] - type = MYSQL - hostname = <%= @mysql_host %> - database = reviewdb - username = gerrit2 -<% if @database_poollimit != "" -%> - poolLimit = <%= @database_poollimit %> -<% end -%> - connectionpool = true -[auth] -<% if @gerrit_contributor_agreement -%> - contributorAgreements = true -<% end -%> - type = <%= @gerrit_auth_type %> - cookieSecure = true - enableRunAs = true -<% if @gerrit_auth_type == 'OPENID_SSO' -%> - openIdSsoUrl = <%= @openidssourl %> -<% end -%> -<% if @gerrit_auth_type == 'LDAP' -%> -[ldap] - server = <%= @ldap_server %> - accountBase = <%= @ldap_account_base %> - <% if @ldap_username -%>username = <%= @ldap_username %><%end%> - <% if @ldap_password -%>password = <%= @ldap_password %><%end%> - <% if @ldap_accountfullname -%>accountFullName = <%= @ldap_accountfullname %><%end%> - accountPattern = <%= @ldap_account_pattern %> - accountEmailAddress = <%= @ldap_account_email_address %> - sslVerify = <%= @ldap_sslverify %> - <% if @ldap_ssh_account_name -%>accountSshUserName = <%= @ldap_ssh_account_name %><%end%> -<% end %> -[sendemail] - smtpServer = <%= @smtpserver %> - from = <%= @sendemail_from %> -[container] - user = gerrit2 - javaHome = <%= @java_home %> -<% if @container_heaplimit != "" -%> - heapLimit = <%= @container_heaplimit %> -<% end -%> -[core] -<% if @core_packedgitopenfiles != "" -%> - packedGitOpenFiles = <%= @core_packedgitopenfiles %> -<% end -%> -<% if @core_packedgitlimit != "" -%> - packedGitLimit = <%= @core_packedgitlimit %> -<% end -%> -<% if @core_packedgitwindowsize != "" -%> - packedGitWindowSize = <%= @core_packedgitwindowsize %> -<% end -%> -[sshd] - listenAddress = <%= @sshd_listen_address %> -<% if @sshd_threads != "" -%> - threads = <%= @sshd_threads %> -<% end -%> -[httpd] - listenUrl = proxy-https://*:8081/ -<% if @httpd_maxwait != "" -%> - maxWait = <%= @httpd_maxwait %> -<% end -%> -<% if @httpd_acceptorthreads != "" -%> - acceptorThreads = <%= @httpd_acceptorthreads %> -<% end -%> -<% if @httpd_minthreads != "" -%> - minThreads = <%= @httpd_minthreads %> -<% end -%> -<% if @httpd_maxthreads != "" -%> - maxThreads = <%= @httpd_maxthreads %> -<% end -%> -[cache] - directory = cache -[cache "web_sessions"] - maxAge = 1d -[user] - email = <%= @email %> -<% @commentlinks.each do |commentlink| -%> -[commentlink "<%= commentlink['name'] %>"] - match = "<%= commentlink['match'] %>" -<% if commentlink['link'] != "" -%> - link = "<%= commentlink['link'] %>" -<% end -%> -<% if commentlink['html'] != "" -%> - html = "<%= commentlink['html'] %>" -<% end -%> -<% end -%> -<% @trackingids.each do |trackingid| -%> -[trackingid "<%= trackingid['name'] %>"] - match = "<%= trackingid['match'] %>" - footer = "<%= trackingid['footer'] %>" - system = "<%= trackingid['system'] %>" -<% end -%> -[theme] - backgroundColor = ffffff - topMenuColor = ffffff - textColor = 264d69 - trimColor = eef3f5 - selectionColor = d1e6ea - changeTableOutdatedColor = f5cccc - tableOddRowColor = ffffff - tableEvenRowColor = f5f5ff -[melody] - monitoring = <%= @enable_melody %> - session = <%= @melody_session %> -[plugin "javamelody"] - allowTopMenu = <%= @enable_javamelody_top_menu %> -<% if gitweb or cgit -%> -[gitweb] -<% if gitweb -%> - revision = "?p=${project}.git;a=commitdiff;h=${commit}" -<% else -%> - type = cgit -<% end -%> -<% if scope.lookupvar("gerrit::web_repo_url") -%> - url = "<%= scope.lookupvar('gerrit::web_repo_url') %>" -<% end -%> -<% end -%> -<% if contactstore == true -%> -[contactstore] - appsec = <%= @contactstore_appsec %> - url = <%= @contactstore_url %> -<% end -%> -<% if @secondary_index == true -%> -[index] - type = <%= @secondary_index_type %> -<% end -%> -[mimetype "image/*"] - safe = true -[mimetype "application/yaml"] - safe = true -[mimetype "application/xml"] - safe = true -[mimetype "application/rst"] - safe = true -[mimetype "application/txt"] - safe = true -[mimetype "application/html"] - safe = true diff --git a/modules/gerrit/templates/gerrit.vhost.erb b/modules/gerrit/templates/gerrit.vhost.erb deleted file mode 100644 index dcd7fe8863..0000000000 --- a/modules/gerrit/templates/gerrit.vhost.erb +++ /dev/null @@ -1,89 +0,0 @@ - - ServerName <%= scope.lookupvar("gerrit::vhost_name") %> - ServerAdmin <%= scope.lookupvar("gerrit::serveradmin") %> - - ErrorLog ${APACHE_LOG_DIR}/gerrit-error.log - - LogLevel warn - - CustomLog ${APACHE_LOG_DIR}/gerrit-access.log combined - - Redirect / https://<%= scope.lookupvar("gerrit::vhost_name") %>/ - - - - - - ServerName <%= scope.lookupvar("gerrit::vhost_name") %> - ServerAdmin <%= scope.lookupvar("gerrit::serveradmin") %> - AllowEncodedSlashes NoDecode - - ErrorLog ${APACHE_LOG_DIR}/gerrit-ssl-error.log - - LogLevel warn - - CustomLog ${APACHE_LOG_DIR}/gerrit-ssl-access.log combined - - SSLEngine on - SSLProtocol All -SSLv2 -SSLv3 - - SSLCertificateFile <%= scope.lookupvar("gerrit::ssl_cert_file") %> - SSLCertificateKeyFile <%= scope.lookupvar("gerrit::ssl_key_file") %> -<% if scope.lookupvar("gerrit::ssl_chain_file") != "" %> - SSLCertificateChainFile <%= scope.lookupvar("gerrit::ssl_chain_file") %> -<% end %> - - - SSLOptions +StdEnvVars - - - SSLOptions +StdEnvVars - - - BrowserMatch "MSIE [2-6]" \ - nokeepalive ssl-unclean-shutdown \ - downgrade-1.0 force-response-1.0 - # MSIE 7 and newer should be able to use keepalive - BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown - - RewriteEngine on - RewriteCond %{HTTP_HOST} !<%= scope.lookupvar("gerrit::vhost_name") %> - RewriteRule ^.*$ <%= scope.lookupvar("gerrit::canonicalweburl") %> -<% if scope.lookupvar("gerrit::replicate_local") -%> - RewriteCond %{REQUEST_URI} !^/p/ -<% end -%> -<% if scope.lookupvar("gerrit::contactstore") == true -%> - RewriteCond %{REQUEST_URI} !^/fakestore$ -<% end -%> -<% if scope.lookupvar("gerrit::robots_txt_source") != "" -%> - RewriteCond %{REQUEST_URI} !^/robots.txt$ -<% end -%> - RewriteRule ^/(.*)$ http://localhost:8081/$1 [NE,P] - - ProxyPassReverse / http://localhost:8081/ - -<% if scope.lookupvar("gerrit::robots_txt_source") != "" -%> - Alias /robots.txt /home/gerrit2/review_site/static/robots.txt -<% end -%> - -<% if scope.lookupvar("gerrit::replicate_local") -%> - SetEnv GIT_PROJECT_ROOT <%= scope.lookupvar("gerrit::replicate_path") %> - SetEnv GIT_HTTP_EXPORT_ALL - - AliasMatch ^/p/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ <%= scope.lookupvar("gerrit::replicate_path") %>/$1 - AliasMatch ^/p/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ <%= scope.lookupvar("gerrit::replicate_path") %>/$1 - ScriptAlias /p/ /usr/lib/git-core/git-http-backend/ -<% end -%> - -<% if scope.lookupvar("gerrit::contactstore") == true -%> - ScriptAlias /fakestore /home/gerrit2/review_site/lib/fakestore.cgi -<% end -%> - - - Order allow,deny - Allow from all - - - - - diff --git a/modules/gerrit/templates/replication.config.erb b/modules/gerrit/templates/replication.config.erb deleted file mode 100644 index f058100e6f..0000000000 --- a/modules/gerrit/templates/replication.config.erb +++ /dev/null @@ -1,22 +0,0 @@ -# This file is managed by puppet. -# https://git.openstack.org/cgit/openstack-infra/system-config - -<% @replication.each do |replication| -%> -[remote "<%= replication['name'] %>"] - url = <%= replication['url'] %>${name}.git -<% if replication['replicationDelay'] != nil -%> - replicationDelay = <%= replication['replicationDelay'] %> -<% end -%> -<% if replication['threads'] != nil -%> - threads = <%= replication['threads'] %> -<% end -%> -<% if replication['authGroup'] != nil -%> - authGroup = <%= replication['authGroup'] %> -<% end -%> -<% if replication['replicatePermissions'] != nil -%> - replicatePermissions = <%= replication['replicatePermissions'] %> -<% end -%> -<% if replication['mirror'] != nil -%> - mirror = <%= replication['mirror'] %> -<% end -%> -<% end -%> diff --git a/modules/gerrit/templates/secure.config.erb b/modules/gerrit/templates/secure.config.erb deleted file mode 100644 index a33100c737..0000000000 --- a/modules/gerrit/templates/secure.config.erb +++ /dev/null @@ -1,4 +0,0 @@ -[database] - password = <%= @mysql_password %> -[auth] - registerEmailPrivateKey = <%= @email_private_key %>