From 6a912d2787cf6ad92c7d391c6bd5f21dde6a31bb Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Wed, 6 Jun 2018 09:41:46 -0500 Subject: [PATCH] Add git.starlingx.io Change-Id: Ie54b0cb24a7b91ba64add6177ba6d2c167fdb601 --- manifests/site.pp | 3 ++ .../manifests/git_backend.pp | 31 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/manifests/site.pp b/manifests/site.pp index 16f402ec66..bb5bfae353 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -643,6 +643,9 @@ node /^git\d+\.openstack\.org$/ { git_airshipit_org_ssl_cert_file_contents => hiera('git_airshipit_org_ssl_cert_file_contents'), git_airshipit_org_ssl_key_file_contents => hiera('git_airshipit_org_ssl_key_file_contents'), git_airshipit_org_ssl_chain_file_contents => hiera('git_airshipit_org_ssl_chain_file_contents'), + git_starlingx_io_ssl_cert_file_contents => hiera('git_starlingx_io_ssl_cert_file_contents'), + git_starlingx_io_ssl_key_file_contents => hiera('git_starlingx_io_ssl_key_file_contents'), + git_starlingx_io_ssl_chain_file_contents => hiera('git_starlingx_io_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 c76b226363..d1995c74c0 100644 --- a/modules/openstack_project/manifests/git_backend.pp +++ b/modules/openstack_project/manifests/git_backend.pp @@ -27,6 +27,9 @@ class openstack_project::git_backend ( $git_airshipit_org_ssl_cert_file_contents = '', $git_airshipit_org_ssl_key_file_contents = '', $git_airshipit_org_ssl_chain_file_contents = '', + $git_starlingx_io_ssl_cert_file_contents = '', + $git_starlingx_io_ssl_key_file_contents = '', + $git_starlingx_io_ssl_chain_file_contents = '', $behind_proxy = false, $project_config_repo = '', $selinux_mode = 'enforcing', @@ -128,6 +131,34 @@ class openstack_project::git_backend ( selinux_mode => $selinux_mode } + ::cgit::site { 'git.starlingx.io': + cgit_vhost_name => 'git.starlingx.io', + ssl_cert_file => "/etc/pki/tls/certs/git.starlingx.io.pem", + ssl_key_file => "/etc/pki/tls/private/git.starlingx.io.key", + ssl_chain_file => '/etc/pki/tls/certs/git.starlingx.io.intermediate.pem', + ssl_cert_file_contents => $git_starlingx_io_ssl_cert_file_contents, + ssl_key_file_contents => $git_starlingx_io_ssl_key_file_contents, + ssl_chain_file_contents => $git_starlingx_io_ssl_chain_file_contents, + behind_proxy => $behind_proxy, + cgitrc_settings => { + 'clone-prefix' => 'https://git.starlingx.io', + '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' => 'StarlingX git repository browser', + 'max-repo-count' => 2500, + 'robots' => 'index', + 'include' => '/etc/cgitrepos_git.starlingx.io', + }, + manage_cgitrc => true, + cgitrc_path => '/etc/cgitrc_git.starlingx.io', + local_git_dir => '/var/lib/git-alias/git.starlingx.io', + cgitdir => '/var/www/cgit_git.starlingx.io', + staticfiles => '/var/www/cgit_git.starlingx.io/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'