diff --git a/manifests/site.pp b/manifests/site.pp index bed84b3106..8858ebe815 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -653,14 +653,17 @@ node /^git\d+\.openstack\.org$/ { } class { 'openstack_project::git_backend': - project_config_repo => 'https://git.openstack.org/openstack-infra/project-config', - vhost_name => 'git.openstack.org', - git_gerrit_ssh_key => hiera('gerrit_replication_ssh_rsa_pubkey_contents'), - ssl_cert_file_contents => hiera('git_ssl_cert_file_contents'), - ssl_key_file_contents => hiera('git_ssl_key_file_contents'), - ssl_chain_file_contents => hiera('git_ssl_chain_file_contents'), - behind_proxy => true, - selinux_mode => 'enforcing' + project_config_repo => 'https://git.openstack.org/openstack-infra/project-config', + vhost_name => 'git.openstack.org', + git_gerrit_ssh_key => hiera('gerrit_replication_ssh_rsa_pubkey_contents'), + ssl_cert_file_contents => hiera('git_ssl_cert_file_contents'), + ssl_key_file_contents => hiera('git_ssl_key_file_contents'), + ssl_chain_file_contents => hiera('git_ssl_chain_file_contents'), + git_zuul_ci_org_ssl_cert_file_contents => hiera('git_zuul_ci_org_ssl_cert_file_contents'), + git_zuul_ci_org_ssl_key_file_contents => hiera('git_zuul_ci_org_ssl_key_file_contents'), + git_zuul_ci_org_ssl_chain_file_contents => hiera('git_zuul_ci_org_ssl_chain_file_contents'), + behind_proxy => true, + selinux_mode => 'enforcing' } } diff --git a/modules/openstack_project/manifests/git_backend.pp b/modules/openstack_project/manifests/git_backend.pp index fe8bc57b32..33bfbf5d27 100644 --- a/modules/openstack_project/manifests/git_backend.pp +++ b/modules/openstack_project/manifests/git_backend.pp @@ -21,6 +21,9 @@ class openstack_project::git_backend ( $ssl_cert_file_contents = '', $ssl_key_file_contents = '', $ssl_chain_file_contents = '', + $git_zuul_ci_org_ssl_cert_file_contents = '', + $git_zuul_ci_org_ssl_key_file_contents = '', + $git_zuul_ci_org_ssl_chain_file_contents = '', $behind_proxy = false, $project_config_repo = '', $selinux_mode = 'enforcing', @@ -66,6 +69,34 @@ class openstack_project::git_backend ( selinux_mode => $selinux_mode } + ::cgit::site { 'git.zuul-ci.org': + cgit_vhost_name => 'git.zuul-ci.org', + ssl_cert_file => "/etc/pki/tls/certs/git.zuul-ci.org.pem", + ssl_key_file => "/etc/pki/tls/private/git.zuul-ci.org.key", + ssl_chain_file => '/etc/pki/tls/certs/git.zuul-ci.org.intermediate.pem', + ssl_cert_file_contents => $git_zuul_ci_org_ssl_cert_file_contents, + ssl_key_file_contents => $git_zuul_ci_org_ssl_key_file_contents, + ssl_chain_file_contents => $git_zuul_ci_org_ssl_chain_file_contents, + behind_proxy => $behind_proxy, + cgitrc_settings => { + 'clone-prefix' => 'https://git.zuul-ci.org', + 'commit-filter' => '/usr/local/bin/commit-filter.sh', + 'css' => '/cgit-data/cgit.css', + 'favicon' => '/cgit-data/favicon.ico', + 'logo' => '/cgit-data/cgit.png', + 'root-title' => 'Zuul git repository browser', + 'max-repo-count' => 2500, + 'robots' => 'index', + 'include' => '/etc/cgitrepos_git.zuul-ci.org', + }, + manage_cgitrc => true, + cgitrc_path => '/etc/cgitrc_git.zuul-ci.org', + local_git_dir => '/var/lib/git-alias/git.zuul-ci.org', + cgitdir => '/var/www/cgit_git.zuul-ci.org', + staticfiles => '/var/www/cgit_git.zuul-ci.org/static', + selinux_mode => $selinux_mode + } + # We don't actually use these variables in this manifest, but jeepyb # requires them to exist. $local_git_dir = '/var/lib/git'