Commit Graph

29 Commits

Author SHA1 Message Date
Monty Taylor ff8acfb6b4 Retire repo
Depends-On: https://review.opendev.org/720892
Change-Id: I7b36dd190fba304ce19ba5fa2fb994504f1368cc
2020-04-22 10:18:52 -05:00
James E. Blair 48cef6aba7 Fix erroneous serveraliases entry
The current code creates a ServerAliases line even if the variable
is nil.  Correct that.

Also, fix a missed cgit:: scope reference.

Create distinct log files for each vhost, and also separate out
http/https logs.

Change-Id: Id03c72ece93350b26586490757cd50dd3d791c0d
2018-03-27 14:16:04 -07:00
James E. Blair 53d3dad0ca Support multiple git sites
Story: 2001382
Task: 6092
Change-Id: I8a2e209cc550bb6b1f494efbd3cb54fde73642c6
2018-03-26 09:34:24 -07:00
Clark Boylan dc7e58943d Use systemd'd git-daemon on Centos7
Centos7 is a bit more opinionated on how git-daemon should run. In
particular with selinux the git_system_t context does not have
permissions to the git_port_t port(s) because systemd is expected to do
socket activation for git-daemon.

Fix this by not fighting systemd and embracing it. Use it for socket
activation with the git-daemon process and potentially add the git
daemon port to git_port_t label if necessary.

Change-Id: Id3fadfa74261649d158f4f31879f74f83d5856a8
2015-08-28 09:31:37 -07:00
Yolanda Robla 0ae79e0106 New Updated config for CentOS 7 and Apache 2.4
This patch takes the original which was reverted and
adds mod_version which is needed to parse IfVersion if
on a Debian system.

When using puppet-cgit under CentOS 7, apache
fails because the config file is not working
in Apache 2.4 version.
Also, as CentOS 7 is starting apache on systemd,
it needs to load the systemd apache config under
conf.modules.d.

Original Patch: I7e0d51ee176c4f27721c16afeaae120eb8edf7ab

Change-Id: If3acc672ccd85b5704a2120379b60cb95528b7f7
Co-Authored-By: Yolanda Robla <yolanda.robla-mota@hp.com>
Co-Authored-By: Nicola Heald <nicola.heald@hp.com>
2015-08-27 14:34:32 -07:00
Jenkins ddb501e501 Merge "Add cgit::ssh class to manage git over ssh" 2015-08-20 07:16:48 +00:00
Colleen Murphy 36b9dc1e5c Add Gemfile and puppet 4 checks
In anticipation of puppet 4, start trying to deal with puppet 4 things
that can be helpfully predicted by puppet lint plugins. This patch also
corrects lint errors caught by the puppet-lint-absolute_classname-check
and puppet-lint-empty_string-check gems as well as arrow alignment
which wasn't being caught under the system version of puppet-lint.

Change-Id: I7b9efb0fce3b59d611aa9aaaf6899bc6e6cc62b0
2015-08-05 21:09:41 -07:00
Colleen Murphy b40fb93f90 Use instance variables in templates
Refering to manifest variables via method calls has been deprecated for
some time and breaks in puppet 4. This patch changes the remaining
variable references in templates to use ruby instance variables.

Change-Id: Ib8265da9699f9f34b4a3185930c9dbfe8fe44733
2015-08-05 21:09:41 -07:00
Yolanda Robla 49288d9356 Add cgit::ssh class to manage git over ssh
Class to configure ssh access to git repositories.

Co-Authored-By: K Jonathan Harker <k.jonathan.harker@hp.com>
Change-Id: I9bc857251b6ce119c6b6d6c9323f882327281466
2015-07-20 15:26:31 +02:00
Anita Kuno 5d7a2565b5 Remove whitespace errors.
This file had a number of whitespaces it didn't need. This patch
removes them.

Change-Id: I267d532b455b5e2041abe9bd4fe194551936bdb2
2015-07-13 12:07:49 -04:00
James E. Blair b7b8428bc5 Revert "Updated config for CentOS 7 and Apache 2.4"
This reverts commit 0e9440c1ce.

Change-Id: Idb5ee5ea2d5aab0df499b42d08b845f04a2cc350
2015-07-08 17:08:12 -07:00
Jenkins 98f407e6bb Merge "Updated config for CentOS 7 and Apache 2.4" 2015-07-08 22:27:27 +00:00
Joshua Hesketh 864549a087 Up the apache timeout
For a while we have been having trouble cloning nova from git.o.o,
particularly during busy times of the day or if we have a job that
needs to clone it multiple times across workers (turbo-hipster for
example).

After investigating the tcpdumps it appears to be because the
origin sends a RST during the git pack headers which regularly
takes more than 60 seconds now.

Co-Authored-By: Angus Lees <gus@inodes.org>
Change-Id: Id1078dfaed2a8e17ec086e13b53df51cb59d480c
2015-06-17 11:45:55 +10:00
Yolanda Robla 0e9440c1ce Updated config for CentOS 7 and Apache 2.4
When using puppet-cgit under CentOS 7, apache
fails because the config file is not working
in Apache 2.4 version.
Also, as CentOS 7 is starting apache on systemd,
it needs to load the systemd apache config under
conf.modules.d.

Co-Authored-By: Nicola Heald <nicola.heald@hp.com>
Change-Id: I7e0d51ee176c4f27721c16afeaae120eb8edf7ab
2015-05-13 08:44:59 +02:00
Yolanda Robla 2d2408010b Manage cgitrc config file
In same way as other config files, add a sane
default list, and allow manifest to override that
list, to configure cgitrc from the manifest.

Change-Id: I5c8ef0e7036c4b7a33aa12dc502c048af0499dda
2015-05-02 09:23:28 +02:00
Yolanda Robla 0865a53dbe Add configurable settings for httpd.conf
For fine-tuning git, add the ability to configure
settings per prefork and mpm cases.

Co-Authored-By: Nikki Heald <nicky@notnowlewis.com>
Change-Id: I34e66f90b4e9b9156f6ce845642048da04841c6f
2015-04-06 13:54:43 +02:00
Yolanda Robla adbe6aef57 Add configurable Timeout settings on git vhost
Under certain situations it can be good to force
a higher timeout for git vhost. Add the possibility
to send that parameter on the manifest, and ignore
if no timeout is set.

Change-Id: Ib74b5b5182e583dd7fa586f244174e41681636c8
2015-03-06 07:48:28 +01:00
Timothy Chavez a6f9e76ffe Use the SSLProtocol blacklist approach
It turns out that specifying the ciphers we want to use leads to
breakage.  So instead we'll explicitly tell Apache which ciphers
we don't want to use.

Change-Id: I0f8211533495a6a4340c01dadb8069ccf9be429c
2014-10-16 11:41:04 -05:00
Clark Boylan 6e14e5f9af Use only TLSv1 and greater to depoodle
The poodle SSLv3 vulnerability is a good reason to stop using SSLv3.
Switch to TLS everywhere in our apache vhost configs.

Change-Id: If7b18174253b6f185e029f97bfa77d8ad4941385
2014-10-14 17:07:06 -07:00
Spencer Krum 5b8a4588b8 Fixing deprecation warnings in cgit module
Change-Id: Ie5ef97fea66c33abfbd073a15dd3ae200517c3ee
2014-08-01 22:21:07 -07:00
Manuel Desbonnet 763efb0dc0 Add serveraliases to cgit vhost template
Allow for specifying ServerAlias entries in the apache
vhost for the cgit puppet module.
(vhost template section lifted from the puppetlabs-apache v0.0.4
vhost-default template).

Change-Id: If7c297247b9556458154e4d01a1e0165a25a14b5
2014-05-16 08:30:29 +01:00
Mathieu Gagné 3504494ba9 Configure cgit to show git notes
Change-Id: Id76bfa2b269591b6c125b31584542962d32fb048
2013-08-28 18:58:25 -04:00
Clark Boylan 69d776c80e Load balance git requests.
* install_modules.sh: Add puppetlabs-haproxy forge module.

* modules/cgit/manifests/init.pp: Add haproxy config to load balance
https, https and git protocol git access. Each git server will host git
http on port 8080, https on port 4443 and git protocol on 29418. These
endpoints will then be load balanced by a single haproxy instance
listening on ports 80, 443 and 9418. The use of haproxy and having
services listen on offset ports to accomodate haproxy is toggleable
using the $balance_git and $behind_proxy boolean flags.
Additionally, configure rsyslog for haproxy.

* modules/cgit/files/rsyslog.haproxy.conf: Enable syslog over UDP on
port 514. This is needed by haproxy to perform logging. Send local0
messages to /var/log/haproxy.log.

* modules/cgit/templates/ssl.conf.erb: Make Apache https listen port
configurable. Remove default virtualhost.

* modules/cgit/templates/httpd.conf.erb: Make Apache http listen port
configurable.

* modules/cgit/templates/git.vhost..erb: Make Apache http(s) listen
ports configuruable. Allow http without redirecting to https as a
fallback option to accomodate CentOS clients.

* modules/openstack_project/manifests/git.pp: Pass load balancer
variables through to the cgit manifest.

* manifests/site.pp: Configure git.o.o to run the load balancer haproxy
and balance across the new gitXX.o.o nodes.

Change-Id: Icefc5923cff9a7c6ce62c1923ec2ea87ebc6474a
2013-08-22 10:52:04 -07:00
Elizabeth Krumbach Joseph 58a1a68cc0 Swap git daemon in xinetd for service
Add git-daemon init file to /etc/init.d and make sure the service
is started.

For transition, keep the git xinetd file and service defined but
switch git service to stopped, we can remove this later.

Change-Id: I0cf02c7292496e39695b80b00cdcb82ec7a61700
2013-08-22 10:03:05 -07:00
Elizabeth Krumbach Joseph 5b7df9f70a Add static web directory for cgit & initial files
Create and define a static directory for cgit to use.

Add initial favicon and logo files and include in cgitrc.

Also include custom CSS and background image.

Change-Id: If1e20d8e62557cc90aafbf92f4291b964400e029
2013-08-16 16:41:30 -07:00
Jeremy Stanley f01c2266b1 Serve repos via git+https outside of cgit
* modules/cgit/templates/git.vhost.erb: Add Apache aliases to the
git-http-backend CGI and static git files where possible. This makes
git clone, pull and fetch HTTPS URLs more consistent with their git
protocol counterparts.

* modules/openstack_project/files/git/cgitrc: Adjust the displayed
HTTPS clone URL in the WebUI to match.

Change-Id: Ibb4fd41191f33b615ed36f78e1951555a1c0dad1
2013-08-15 03:04:04 +00:00
Monty Taylor adc3872621 Remove if module statements
Because of the way we're doing ssl on the centos, the ifmodule
statements evaluate to false. Remove them.

Change-Id: Iad771249c6dc5cf5ede493183f5cebb98c3deb69
2013-08-10 20:52:55 -03:00
Elizabeth Krumbach 9e87cf1dff Update httpd log directory in template for git.o.o
The ${APACHE_LOG_DIR} isn't expanding as I had expected on
the CentOS server, updating to default CentOS apache log
directory.

Change-Id: I8fc6ee5084e2ef69be9e888473155c865bdbdfd0
2013-08-07 22:14:02 -07:00
Elizabeth Krumbach 9ccd4b7ef4 Add httpd ssl support to git.openstack.org
Certificates have been added to hiera, now adding the support for
https in a new apache file.

Change-Id: I8447d60a15779b103556e53f04accf671dbf4843
2013-08-06 16:26:52 -07:00