Skip to content
This repository has been archived by the owner on Jun 10, 2019. It is now read-only.

Remove ssl_certificates cookbook dependency #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Berksfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ site :opscode

metadata

cookbook 'ssl_certificates', github: 'TYPO3-cookbooks/ssl_certificates'
cookbook 'postgresql', '~> 3.3'
3 changes: 0 additions & 3 deletions Berksfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ DEPENDENCIES
path: .
metadata: true
postgresql (~> 3.3)
ssl_certificates
git: git://github.com/TYPO3-cookbooks/ssl_certificates.git
branch: master

GRAPH
apache2 (1.10.0)
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Requirements
* git
* maven
* apache2
* [ssl_certificates](http://github.com/typo3-cookbooks/ssl_certificates)
* Optional: [git-daemon](http://github.com/typo3-cookbooks/git-daemon)

Attributes
Expand Down Expand Up @@ -56,7 +55,9 @@ connections on ([sshd.listenAddress](http://gerrit-documentation.googlecode.com/
* `node['gerrit']['canonicalGitUrl']` - The URL under which the repositories are available through the Git protocol ([gerrit.canonicalGitUrl](http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/config-gerrit.html#gerrit.canonicalGitUrl)). Has to include the protocol (`git://`). As Gerrit does _not_ support the Git protocol, such a server has to be managed through another cookbook, e.g. [git-daemon](http://github.com/typo3-cookbooks/git-daemon).
* `node['gerrit']['proxy']` - Enable Apache2 reverse proxy in front of Gerrit. Defaults to `true`, which makes Gerrit available on port 80.
* `node['gerrit']['ssl']` - Enable SSL for the reverse proxy. Defaults to `false`.
* `node['gerrit']['ssl_certificate']`- Makes use of the [ssl_certificates](http://github.com/typo3-cookbooks/ssl_certificates), to use a certain SSL certificate. An entry in the `ssl_certificates` data bag matching the given name must exist. Defaults to `nil`, which results in snakeoil certificates being used.
* `node['ssl_certificates']['ssl_certfile_path']`- Path to an SSL certfile, to be used if `node['gerrit']['ssl']` is true. Will default to snakeoil cert if unset.
* `node['ssl_certificates']['ssl_keyfile_path']`- Path to an SSL keyfile, to be used if `node['gerrit']['ssl']` is true. Will default to snakeoil key if unset.
* `node['ssl_certificates']['ssl_cabundle_path'']`- Path to an SSL ca bundle, to be used if `node['gerrit']['ssl']` is true. Defaults to nil.

SSHD
----
Expand Down
11 changes: 6 additions & 5 deletions recipes/proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@

ssl_certfile_path = "/etc/ssl/certs/ssl-cert-snakeoil.pem"
ssl_keyfile_path = "/etc/ssl/private/ssl-cert-snakeoil.key"
ssl_cabundle_path = ""

# don't use snakeoil CA, if specified otherwise
if node['gerrit']['ssl_certificate']
ssl_certificate node['gerrit']['ssl_certificate']
ssl_certfile_path = node['ssl_certificates']['path'] + "/" + node['gerrit']['ssl_certificate'] + ".crt"
ssl_keyfile_path = node['ssl_certificates']['path'] + "/" + node['gerrit']['ssl_certificate'] + ".key"
ssl_cabundle_path = node['ssl_certificates']['path'] + "/" + node['gerrit']['ssl_certificate'] + ".ca-bundle"
if node['ssl_certificates']
ssl_certfile_path = node['ssl_certificates']['ssl_certfile_path']
ssl_keyfile_path = node['ssl_certificates']['ssl_keyfile_path']
ssl_cabundle_path = node['ssl_certificates']['ssl_cabundle_path'] \
if node['ssl_certificates']['ssl_cabundle_path']
end
end

Expand Down