Skip to content

Commit

Permalink
support sidekiq_cluster configuration options
Browse files Browse the repository at this point in the history
  • Loading branch information
David Gubler committed May 22, 2017
1 parent 49f900b commit 19ff7e0
Show file tree
Hide file tree
Showing 3 changed files with 16 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 @@ -60,6 +60,7 @@
$service_user = $::gitlab::service_user
$shell = $::gitlab::shell
$sidekiq = $::gitlab::sidekiq
$sidekiq_cluster = $::gitlab::sidekiq_cluster
$skip_auto_migrations = $::gitlab::skip_auto_migrations
$source_config_file = $::gitlab::source_config_file
$unicorn = $::gitlab::unicorn
Expand Down
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@
# Default: undef
# Hash of 'sidekiq' config parameters.
#
# [*sidekiq_cluster*]
# Default: undef
# Hash of 'sidekiq_cluster' config parameters.
#
# [*skip_auto_migrations*]
# Default: undef
# Enable or disable auto migrations. undef keeps the current state on the system.
Expand Down Expand Up @@ -356,6 +360,7 @@
$sentinel = undef,
$shell = undef,
$sidekiq = undef,
$sidekiq_cluster = undef,
$skip_auto_migrations = undef,
$source_config_file = undef,
$unicorn = undef,
Expand Down Expand Up @@ -415,6 +420,7 @@
if $sentinel { validate_hash($sentinel) }
if $shell { validate_hash($shell) }
if $sidekiq { validate_hash($sidekiq) }
if $sidekiq_cluster { validate_hash($sidekiq_cluster) }
if $skip_auto_migrations != undef { validate_bool($skip_auto_migrations) }
if $unicorn { validate_hash($unicorn) }
if $user { validate_hash($user) }
Expand Down
9 changes: 9 additions & 0 deletions templates/gitlab.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,15 @@ unicorn['<%= k -%>'] = <%= decorate(@unicorn[k]) %>
<%- @sidekiq.keys.sort.each do |k| -%>
sidekiq['<%= k -%>'] = <%= decorate(@sidekiq[k]) %>
<%- end end -%>
<%- if @sidekiq_cluster -%>

##########################
# GitLab Sidekiq Cluster #
##########################

<%- @sidekiq_cluster.keys.sort.each do |k| -%>
sidekiq_cluster['<%= k -%>'] = <%= decorate(@sidekiq_cluster[k]) %>
<%- end end -%>
<%- if @shell -%>

################
Expand Down

0 comments on commit 19ff7e0

Please sign in to comment.