Skip to content
Snippets Groups Projects
Commit bd77631b authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Merge branch 'master' of gitlab.com:gitlab-org/omnibus-gitlab

parents da856335 a8ad7085
No related branches found
No related tags found
No related merge requests found
Showing
with 29 additions and 18 deletions
Loading
Loading
@@ -17,10 +17,10 @@
#
 
name 'mattermost'
default_version '3.7.5'
default_version '3.9.0'
 
source url: "https://releases.mattermost.com/#{version}/mattermost-team-#{version}-linux-amd64.tar.gz",
md5: '94fb39daca94a506cd188afba2102146'
md5: 'b7801f6d2516c8c2456378ea30cd9ac4'
 
relative_path 'mattermost'
 
Loading
Loading
Loading
Loading
@@ -1024,6 +1024,8 @@ external_url 'GENERATED_EXTERNAL_URL'
# mattermost['service_time_between_user_typing_updates_milliseconds'] = 5000
# mattermost['service_enable_link_previews'] = false
# mattermost['service_enable_user_typing_messages'] = true
# mattermost['service_enable_post_search'] = true
# mattermost['service_enable_user_statuses'] = true
 
# mattermost['team_site_name'] = "GitLab Mattermost"
# mattermost['team_max_users_per_team'] = 150
Loading
Loading
@@ -1044,6 +1046,7 @@ external_url 'GENERATED_EXTERNAL_URL'
# mattermost['sql_max_idle_conns'] = 10
# mattermost['sql_max_open_conns'] = 10
# mattermost['sql_trace'] = false
# mattermost['sql_data_source_search_replicas'] = []
 
# mattermost['log_file_directory'] = '/var/log/gitlab/mattermost'
# mattermost['log_console_enable'] = true
Loading
Loading
@@ -1082,6 +1085,7 @@ external_url 'GENERATED_EXTERNAL_URL'
# mattermost['email_enable_batching'] = false
# mattermost['email_batching_buffer_size'] = 256
# mattermost['email_batching_interval'] = 30
# mattermost['email_skip_server_certificate_verification'] = false
 
# mattermost['file_max_file_size'] = 52428800
# mattermost['file_driver_name'] = "local"
Loading
Loading
@@ -1103,6 +1107,7 @@ external_url 'GENERATED_EXTERNAL_URL'
# mattermost["file_amazon_s3_location_constraint"] = false
# mattermost["file_amazon_s3_lowercase_bucket"] = false
# mattermost["file_amazon_s3_ssl"] = true
# mattermost['file_enable_file_attachments'] = true
 
# mattermost['ratelimit_enable_rate_limiter'] = false
# mattermost['ratelimit_per_sec'] = 10
Loading
Loading
Loading
Loading
@@ -126,6 +126,7 @@ database_name = node['gitlab']['geo-secondary']['db_database']
 
if node['gitlab']['geo-postgresql']['enable']
postgresql_user gitlab_sql_user do
helper pg_helper
action :create
end
 
Loading
Loading
Loading
Loading
@@ -734,6 +734,8 @@ default['gitlab']['mattermost']['service_write_timeout'] = 300
default['gitlab']['mattermost']['service_time_between_user_typing_updates_milliseconds'] = 5000
default['gitlab']['mattermost']['service_enable_link_previews'] = false
default['gitlab']['mattermost']['service_enable_user_typing_messages'] = true
default['gitlab']['mattermost']['service_enable_post_search'] = true
default['gitlab']['mattermost']['service_enable_user_statuses'] = true
 
default['gitlab']['mattermost']['sql_driver_name'] = 'postgres'
default['gitlab']['mattermost']['sql_data_source'] = nil
Loading
Loading
@@ -741,6 +743,7 @@ default['gitlab']['mattermost']['sql_data_source_replicas'] = []
default['gitlab']['mattermost']['sql_max_idle_conns'] = 10
default['gitlab']['mattermost']['sql_max_open_conns'] = 10
default['gitlab']['mattermost']['sql_trace'] = false
default['gitlab']['mattermost']['sql_data_source_search_replicas'] = []
 
# default['gitlab']['mattermost']['gitlab'] = {'Allow' => true, 'Secret' => "123", 'Id' => "123", "AuthEndpoint" => "aa", "TokenEndpoint" => "bb", "UserApiEndpoint" => "cc" }
default['gitlab']['mattermost']['gitlab'] = {}
Loading
Loading
@@ -765,6 +768,7 @@ default['gitlab']['mattermost']["file_amazon_s3_bucket_endpoint"] = nil
default['gitlab']['mattermost']["file_amazon_s3_location_constraint"] = false
default['gitlab']['mattermost']["file_amazon_s3_lowercase_bucket"] = false
default['gitlab']['mattermost']["file_amazon_s3_ssl"] = true
default['gitlab']['mattermost']['file_enable_file_attachments'] = true
 
default['gitlab']['mattermost']['email_enable_sign_up_with_email'] = false
default['gitlab']['mattermost']['email_enable_sign_in_with_email'] = true
Loading
Loading
@@ -785,6 +789,7 @@ default['gitlab']['mattermost']['email_push_notification_contents'] = "generic"
default['gitlab']['mattermost']['email_enable_batching'] = false
default['gitlab']['mattermost']['email_batching_buffer_size'] = 256
default['gitlab']['mattermost']['email_batching_interval'] = 30
default['gitlab']['mattermost']['email_skip_server_certificate_verification'] = false
 
default['gitlab']['mattermost']['ratelimit_enable_rate_limiter'] = false
default['gitlab']['mattermost']['ratelimit_per_sec'] = 10
Loading
Loading
Loading
Loading
@@ -173,7 +173,6 @@ module Gitlab
 
Gitlab['mattermost']['email_invite_salt'] ||= SecretsHelper.generate_hex(16)
Gitlab['mattermost']['file_public_link_salt'] ||= SecretsHelper.generate_hex(16)
Gitlab['mattermost']['email_password_reset_salt'] ||= SecretsHelper.generate_hex(16)
Gitlab['mattermost']['sql_at_rest_encrypt_key'] ||= SecretsHelper.generate_hex(16)
 
SecretsHelper.write_to_gitlab_secrets
Loading
Loading
Loading
Loading
@@ -97,8 +97,6 @@ class BasePgHelper
EOF
end
 
protected
def service_name
raise NotImplementedError
end
Loading
Loading
Loading
Loading
@@ -2,8 +2,6 @@ require_relative 'base_pg_helper'
 
# Helper class to interact with bundled Geo PostgreSQL instance
class GeoPgHelper < BasePgHelper
protected
# internal name for the service (node['gitlab'][service_name])
def service_name
'geo-postgresql'
Loading
Loading
Loading
Loading
@@ -2,8 +2,6 @@ require_relative 'base_pg_helper'
 
# Helper class to interact with bundled PostgreSQL instance
class PgHelper < BasePgHelper
protected
# internal name for the service (node['gitlab'][service_name])
def service_name
'postgresql'
Loading
Loading
Loading
Loading
@@ -51,7 +51,6 @@ class SecretsHelper
'mattermost' => {
'email_invite_salt' => Gitlab['mattermost']['email_invite_salt'],
'file_public_link_salt' => Gitlab['mattermost']['file_public_link_salt'],
'email_password_reset_salt' => Gitlab['mattermost']['email_password_reset_salt'],
'sql_at_rest_encrypt_key' => Gitlab['mattermost']['sql_at_rest_encrypt_key']
}
}
Loading
Loading
Loading
Loading
@@ -2,10 +2,10 @@ resource_name :postgresql_user
 
property :username, String, name_property: true
property :password, String
property :helper, default: PgHelper.new(node)
 
action :create do
account_helper = AccountHelper.new(node)
pg_helper = PgHelper.new(node)
 
query = if password.nil?
"CREATE USER #{username};"
Loading
Loading
@@ -13,10 +13,10 @@ action :create do
"CREATE USER #{username} PASSWORD '#{password}';"
end
execute "create #{username} postgresql user" do
command %(/opt/gitlab/bin/gitlab-psql -d template1 -c "#{query}")
command %(/opt/gitlab/bin/#{helper.service_cmd} -d template1 -c "#{query}")
user account_helper.postgresql_user
# Added retries to give the service time to start on slower systems
retries 20
not_if { !pg_helper.is_running? || pg_helper.user_exists?(username) }
not_if { !helper.is_running? || helper.user_exists?(username) }
end
end
Loading
Loading
@@ -31,7 +31,9 @@
"SessionCacheInMinutes" : <%= @service_session_cache_in_minutes %>,
"TimeBetweenUserTypingUpdatesMilliseconds" : <%= @service_time_between_user_typing_updates_milliseconds %>,
"EnableUserTypingMessages" : <%= @service_enable_user_typing_messages %>,
"EnableLinkPreviews" : <%= @service_enable_link_previews %>
"EnableLinkPreviews" : <%= @service_enable_link_previews %>,
"EnablePostSearch" : <%= @service_enable_post_search %>,
"EnableUserStatuses" : <%= @service_enable_post_search %>
},
"TeamSettings": {
"SiteName": "<%= @team_site_name %>",
Loading
Loading
@@ -52,7 +54,8 @@
"MaxIdleConns": <%= @sql_max_idle_conns %>,
"MaxOpenConns": <%= @sql_max_open_conns %>,
"Trace": <%= @sql_trace %>,
"AtRestEncryptKey": "<%= @sql_at_rest_encrypt_key %>"
"AtRestEncryptKey": "<%= @sql_at_rest_encrypt_key %>",
"DataSourceSearchReplicas": "<%= @sql_data_source_search_replicas %>"
},
"LogSettings": {
"EnableConsole": <%= @log_console_enable %>,
Loading
Loading
@@ -85,7 +88,8 @@
"AmazonS3BucketEndpoint": "<%= @file_amazon_s3_bucket_endpoint %>",
"AmazonS3LocationConstraint": <%= @file_amazon_s3_location_constraint %>,
"AmazonS3LowercaseBucket": <%= @file_amazon_s3_lowercase_bucket %>,
"AmazonS3SSL": <%= @file_amazon_s3_ssl %>
"AmazonS3SSL": <%= @file_amazon_s3_ssl %>,
"EnableFileAttachments": <%= @file_enable_file_attachments %>
},
"EmailSettings": {
"EnableSignUpWithEmail": <%= @email_enable_sign_up_with_email %>,
Loading
Loading
@@ -102,13 +106,13 @@
"SMTPPort": "<%= @email_smtp_port %>",
"ConnectionSecurity": "<%= @email_connection_security %>",
"InviteSalt": "<%= @email_invite_salt %>",
"PasswordResetSalt": "<%= @email_password_reset_salt %>",
"SendPushNotifications": <%= @email_send_push_notifications %>,
"PushNotificationServer": "<%= @email_push_notification_server %>",
"PushNotificationContents": "<%= @email_push_notification_contents %>",
"EnableEmailBatching": <%= @email_enable_batching %>,
"EmailBatchingBufferSize": <%= @email_batching_buffer_size %>,
"EmailBatchingInterval": <%= @email_batching_interval %>
"EmailBatchingInterval": <%= @email_batching_interval %>,
"SkipServerCertificateVerification": <%= @email_skip_server_certificate_verification %>
},
"RateLimitSettings": {
"Enable": <%= @ratelimit_enable_rate_limiter %>,
Loading
Loading
Loading
Loading
@@ -32,6 +32,10 @@ describe 'geo postgresql 9.2' do
expect(chef_run).to include_recipe('gitlab::postgresql-bin')
end
 
it 'creates the gitlab_geo role in the geo-postgresql database' do
expect(chef_run).to create_postgresql_user('gitlab_geo')
end
it 'correctly sets the shared_preload_libraries default setting' do
expect(chef_run.node['gitlab']['geo-postgresql']['shared_preload_libraries']).to be_nil
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment