Skip to content

Commit

Permalink
Merge pull request #4 from tdb/high_availability
Browse files Browse the repository at this point in the history
Add high_availability config section.
  • Loading branch information
tobru committed Jun 23, 2015
2 parents 5a47894 + f29cf32 commit df4ca49
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
$unicorn = $::gitlab::unicorn
$user = $::gitlab::user
$web_server = $::gitlab::web_server
$high_availability = $::gitlab::high_availability

# replicate $nginx to $ci_nginx if $ci_nginx_eq_nginx true
if $ci_nginx_eq_nginx {
Expand Down
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@
# Default: undef
# Hash of 'web_server' config parameters.
#
# [*high_availability*]
# Default: undef
# Hash of 'high_availability' config parameters.
#
# === Examples
#
# class { 'gitlab':
Expand Down Expand Up @@ -181,6 +185,7 @@
$unicorn = undef,
$user = undef,
$web_server = undef,
$high_availability = undef,
) inherits ::gitlab::params {

# package installation handling
Expand Down Expand Up @@ -221,6 +226,7 @@
if $unicorn { validate_hash($unicorn) }
if $user { validate_hash($user) }
if $web_server { validate_hash($web_server) }
if $high_availability { validate_hash($high_availability) }

class { '::gitlab::install': } ->
class { '::gitlab::config': } ~>
Expand Down
10 changes: 10 additions & 0 deletions templates/gitlab.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,13 @@ ci_redis['<%= k -%>'] = <%= decorate(v) %>
<%- @_real_ci_nginx.each do |k,v| -%>
ci_nginx['<%= k -%>'] = <%= decorate(v) %>
<%- end end -%>
<%- if @high_availability -%>

#####################
# High Availability #
#####################
## see: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/629def0a7a26e7c2326566f0758d4a27857b52a3/README.md#only-start-omnibus-gitlab-services-after-a-given-filesystem-is-mounted

<%- @high_availability.each do |k,v| -%>
high_availability['<%= k -%>'] = <%= decorate(v) %>
<%- end end -%>

0 comments on commit df4ca49

Please sign in to comment.