Skip to content

Commit

Permalink
Update to support Mattermost 4.2.0
Browse files Browse the repository at this point in the history
Fixes ist-dsi#3
  • Loading branch information
magicknot committed Sep 22, 2017
1 parent 30fc2d4 commit d151f91
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 38 deletions.
22 changes: 13 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
# Mattermost Cookbook Changelog

This file is used to list changes made in each version of the apache2 cookbook.
This file is used to list changes made in each version of the Mattermost cookbook.

## v1.4.0 (2017.09.22)

- [#3](https://github.com/ist-dsi/mattermost-cookbook/issues/3) Update settings for Mattermost 4.2.0

## v1.3.0 (2017-08-29)

- [MCC-14] Update settings for Mattermost 4.1.0
- Update settings for Mattermost 4.1.0

## v1.2.0 (2017-08-28)

- [MCC-10] Update settings for Mattermost 4.0.4
- Update settings for Mattermost 4.0.4

## v1.1.0 (2017-08-28)

- [MCC-9] Update settings for Mattermost 3.10.3
- Update settings for Mattermost 3.10.3

## v1.0.0 (2017-08-28)

- [MCC-4] Update settings for Mattermost 3.9.2
- [MCC-12] Add license file
- [MCC-3] Refactor settings
- [MCC-1] Fix linter errors
- Remove MySQL Recipe
- Update settings for Mattermost 3.9.2
- Add license file
- Refactor settings
- Fix linter errors
- Remove MySQL Recipe
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ This cookbook installs and configures Mattermost, the opensource Slack alternati

| Cookbook Version | Mattermost Version |
|:----------------:|:------------------:|
| v1.0.0 | 3.9.2 |
| v1.1.0 | 3.10.3 |
| v1.2.0 | 4.0.4 |
| v1.4.0 | 4.2.0 |
| v1.3.0 | 4.1.0 |
| v1.2.0 | 4.0.4 |
| v1.1.0 | 3.10.3 |
| v1.0.0 | 3.9.2 |

## Requirements

Expand Down
53 changes: 38 additions & 15 deletions attributes/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'enable_developer' => false,
'enable_security_fix_alert' => true,
'enable_insecure_outgoing_connections' => false,
'enable_untrusted_internal_connections' => '',
'enable_multifactor_authentication' => false,
'enforce_multifactor_authentication' => false,
'enable_user_access_tokens' => false,
Expand All @@ -51,17 +52,6 @@
'cluster_log_timeout_milliseconds' => 2000,
}

default['mattermost']['app']['elastic_search_settings'] = {
'connection_url' => 'http://dockerhost:9200',
'username' => 'elastic',
'password' => 'changeme',
'enable_indexing' => false,
'enable_searching' => false,
'sniff' => true,
'post_index_replicas' => 1,
'post_index_shards' => 1,
}

default['mattermost']['app']['team_settings'] = {
'site_name' => 'Mattermost',
'max_users_per_team' => 50,
Expand All @@ -81,10 +71,21 @@
'restrict_public_channel_deletion' => 'all',
'restrict_private_channel_deletion' => 'all',
'restrict_private_channel_manage_members' => 'all',
'enable_x_to_leave_channels_from_lhs' => false,
'user_status_away_timeout' => 300,
'max_channels_per_team' => 2000,
'max_notifications_per_channel' => 1000,
'teammate_name_display' => 'username',
'experimental_town_square_is_read_only' => false,
}

default['mattermost']['app']['client_requirements'] = {
'android_latest_version' => '',
'android_min_version' => '',
'desktop_latest_version' => '',
'desktop_min_version' => '',
'ios_latest_version' => '',
'ios_min_version' => '',
}

default['mattermost']['app']['sql_settings'] = {
Expand Down Expand Up @@ -139,6 +140,8 @@
'amazon_s3_endpoint' => 's3.amazonaws.com',
'amazon_s3_ssl' => true,
'amazon_s3_sign_v2' => false,
'amazon_s3_sse' => false,
'amazon_s3_trace' => false,
}

default['mattermost']['app']['email_settings'] = {
Expand Down Expand Up @@ -187,9 +190,6 @@
'about_link' => 'https://about.mattermost.com/default-about/',
'help_link' => 'https://about.mattermost.com/default-help/',
'report_a_problem_link' => 'https://about.mattermost.com/default-report-a-problem/',
'administrators_guide_link' => 'https://about.mattermost.com/administrators-guide/',
'troubleshooting_forum_link' => 'https://about.mattermost.com/troubleshooting-forum/',
'commercial_support_link' => 'https://about.mattermost.com/commercial-support/',
'support_email' => 'feedback@mattermost.com',
}

Expand All @@ -201,6 +201,13 @@
'allow_banner_dismissal' => true,
}

default['mattermost']['app']['theme_settings'] = {
'enable_theme_selection' => true,
'default_theme' => 'default',
'allow_custom_themes' => true,
'allowed_themes' => [],
}

default['mattermost']['app']['gitlab_settings'] = {
'enable' => false,
'secret' => '',
Expand Down Expand Up @@ -322,11 +329,27 @@
'turn_shared_key' => '',
}

default['mattermost']['app']['elastic_search_settings'] = {
'connection_url' => 'http://dockerhost:9200',
'username' => 'elastic',
'password' => 'changeme',
'enable_indexing' => false,
'enable_searching' => false,
'sniff' => true,
'post_index_replicas' => 1,
'post_index_shards' => 1,
'aggregate_posts_after_days' => 365,
'post_aggregator_job_start_time' => '03:00',
}

default['mattermost']['app']['data_retention_settings']['enable'] = false

default['mattermost']['app']['job_settings'] = {
'run_jobs' => true,
'run_scheduler' => true,
}

default['mattermost']['app']['plugin_settings']['plugins'] = {}
default['mattermost']['app']['plugin_settings'] = {
'enable' => false,
'plugins' => {},
}
4 changes: 2 additions & 2 deletions attributes/mattermost.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
default['mattermost']['package'] = {
'url' => 'https://releases.mattermost.com/4.1.0/mattermost-4.1.0-linux-amd64.tar.gz',
'checksum' => 'a70a120a5bc32365bc39aae79e221615ea5d569319423ff179bd4ea7b163309f',
'url' => 'https://releases.mattermost.com/4.2.0/mattermost-4.2.0-linux-amd64.tar.gz',
'checksum' => 'bcd63ec4dc7f8da16b94e6d64f679c4b0f77b08ad020ad2ef163a173cd80ecca',
}

default['mattermost']['config'] = {
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name 'mattermost-cookbook'
license 'Apache-2.0'
version '1.3.0'
version '1.4.0'

chef_version '>= 12.7'

Expand Down
4 changes: 2 additions & 2 deletions spec/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

it 'downloads and extracts ark' do
expect(chef_run).to put_ark('mattermost').with(
url: 'https://releases.mattermost.com/4.1.0/mattermost-4.1.0-linux-amd64.tar.gz',
checksum: 'a70a120a5bc32365bc39aae79e221615ea5d569319423ff179bd4ea7b163309f',
url: 'https://releases.mattermost.com/4.2.0/mattermost-4.2.0-linux-amd64.tar.gz',
checksum: 'bcd63ec4dc7f8da16b94e6d64f679c4b0f77b08ad020ad2ef163a173cd80ecca',
path: '/opt',
owner: 'mattermost'
)
Expand Down
31 changes: 25 additions & 6 deletions templates/default/config.json.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"EnableDeveloper": <%= node['mattermost']['app']['service_settings']['enable_developer'] %>,
"EnableSecurityFixAlert": <%= node['mattermost']['app']['service_settings']['enable_security_fix_alert'] %>,
"EnableInsecureOutgoingConnections": <%= node['mattermost']['app']['service_settings']['enable_insecure_outgoing_connections'] %>,
"AllowedUntrustedInternalConnections": "<%= node['mattermost']['app']['service_settings']['enable_untrusted_internal_connections'] %>",
"EnableMultifactorAuthentication": <%= node['mattermost']['app']['service_settings']['enable_multifactor_authentication'] %>,
"EnforceMultifactorAuthentication": <%= node['mattermost']['app']['service_settings']['enforce_multifactor_authentication'] %>,
"EnableUserAccessTokens": <%= node['mattermost']['app']['service_settings']['enable_user_access_tokens'] %>,
Expand Down Expand Up @@ -70,10 +71,20 @@
"RestrictPublicChannelDeletion": "<%= node['mattermost']['app']['team_settings']['restrict_public_channel_deletion'] %>",
"RestrictPrivateChannelDeletion": "<%= node['mattermost']['app']['team_settings']['restrict_private_channel_deletion'] %>",
"RestrictPrivateChannelManageMembers": "<%= node['mattermost']['app']['team_settings']['restrict_private_channel_manage_members'] %>",
"EnableXToLeaveChannelsFromLHS": <%= node['mattermost']['app']['team_settings']['enable_x_to_leave_channels_from_lhs'] %>,
"UserStatusAwayTimeout": <%= node['mattermost']['app']['team_settings']['user_status_away_timeout'] %>,
"MaxChannelsPerTeam": <%= node['mattermost']['app']['team_settings']['max_channels_per_team'] %>,
"MaxNotificationsPerChannel": <%= node['mattermost']['app']['team_settings']['max_notifications_per_channel'] %>,
"TeammateNameDisplay": "<%= node['mattermost']['app']['team_settings']['teammate_name_display'] %>"
"TeammateNameDisplay": "<%= node['mattermost']['app']['team_settings']['teammate_name_display'] %>",
"ExperimentalTownSquareIsReadOnly": <%= node['mattermost']['app']['team_settings']['experimental_town_square_is_read_only'] %>
},
"ClientRequirements": {
"AndroidLatestVersion": "<%= node['mattermost']['app']['client_requirements']['android_latest_version'] %>",
"AndroidMinVersion": "<%= node['mattermost']['app']['client_requirements']['android_min_version'] %>",
"DesktopLatestVersion": "<%= node['mattermost']['app']['client_requirements']['desktop_latest_version'] %>",
"DesktopMinVersion": "<%= node['mattermost']['app']['client_requirements']['desktop_min_version'] %>",
"IosLatestVersion": "<%= node['mattermost']['app']['client_requirements']['ios_latest_version'] %>",
"IosMinVersion": "<%= node['mattermost']['app']['client_requirements']['ios_min_version'] %>"
},
"SqlSettings": {
"DriverName": "<%= node['mattermost']['app']['sql_settings']['driver_name'] %>",
Expand Down Expand Up @@ -119,7 +130,9 @@
"AmazonS3Region": "<%= node['mattermost']['app']['file_settings']['amazon_s3_region'] %>",
"AmazonS3Endpoint": "<%= node['mattermost']['app']['file_settings']['amazon_s3_endpoint'] %>",
"AmazonS3SSL": <%= node['mattermost']['app']['file_settings']['amazon_s3_ssl'] %>,
"AmazonS3SignV2": <%= node['mattermost']['app']['file_settings']['amazon_s3_sign_v2'] %>
"AmazonS3SignV2": <%= node['mattermost']['app']['file_settings']['amazon_s3_sign_v2'] %>,
"AmazonS3SSE": <%= node['mattermost']['app']['file_settings']['amazon_s3_sse']%>,
"AmazonS3Trace": <%= node['mattermost']['app']['file_settings']['amazon_s3_trace']%>
},
"EmailSettings": {
"EnableSignUpWithEmail": <%= node['mattermost']['app']['email_settings']['enable_sign_up_with_email'] %>,
Expand Down Expand Up @@ -164,9 +177,6 @@
"AboutLink": "<%= node['mattermost']['app']['support_settings']['about_link'] %>",
"HelpLink": "<%= node['mattermost']['app']['support_settings']['help_link'] %>",
"ReportAProblemLink": "<%= node['mattermost']['app']['support_settings']['report_a_problem_link'] %>",
"AdministratorsGuideLink": "<%= node['mattermost']['app']['support_settings']['administrators_guide_link'] %>",
"TroubleshootingForumLink": "<%= node['mattermost']['app']['support_settings']['troubleshooting_forum_link'] %>",
"CommercialSupportLink": "<%= node['mattermost']['app']['support_settings']['commercial_support_link'] %>",
"SupportEmail": "<%= node['mattermost']['app']['support_settings']['support_email'] %>"
},
"AnnouncementSettings": {
Expand All @@ -176,6 +186,12 @@
"BannerTextColor": "<%= node['mattermost']['app']['announcement_settings']['banner_text_color'] %>",
"AllowBannerDismissal": <%= node['mattermost']['app']['announcement_settings']['allow_banner_dismissal'] %>
},
"ThemeSettings": {
"EnableThemeSelection": <%= node['mattermost']['app']['theme_settings']['enable_theme_selection'] %>,
"DefaultTheme": "<%= node['mattermost']['app']['theme_settings']['default_theme'] %>",
"AllowCustomThemes": <%= node['mattermost']['app']['theme_settings']['allow_custom_themes'] %>,
"AllowedThemes": <%= node['mattermost']['app']['theme_settings']['allowed_themes'] %>
},
"GitLabSettings": {
"Enable": <%= node['mattermost']['app']['gitlab_settings']['enable'] %>,
"Secret": "<%= node['mattermost']['app']['gitlab_settings']['secret'] %>",
Expand Down Expand Up @@ -295,7 +311,9 @@
"EnableSearching": <%= node['mattermost']['app']['elastic_search_settings']['enable_searching'] %>,
"Sniff": <%= node['mattermost']['app']['elastic_search_settings']['sniff'] %>,
"PostIndexReplicas": <%= node['mattermost']['app']['elastic_search_settings']['post_index_replicas'] %>,
"PostIndexShards": <%= node['mattermost']['app']['elastic_search_settings']['post_index_shards'] %>
"PostIndexShards": <%= node['mattermost']['app']['elastic_search_settings']['post_index_shards'] %>,
"AggregatePostsAfterDays": <%= node['mattermost']['app']['elastic_search_settings']['aggregate_posts_after_days'] %>,
"PostsAggregatorJobStartTime": "<%= node['mattermost']['app']['elastic_search_settings']['post_aggregator_job_start_time'] %>"
},
"DataRetentionSettings": {
"Enable": <%= node['mattermost']['app']['data_retention_settings']['enable'] %>
Expand All @@ -305,6 +323,7 @@
"RunScheduler": <%= node['mattermost']['app']['job_settings']['run_scheduler'] %>
},
"PluginSettings": {
"Enable": <%= node['mattermost']['app']['plugin_settings']['enable'] %>,
"Plugins": <%= require 'json'; node['mattermost']['app']['plugin_settings']['plugins'].to_json %>
}
}

0 comments on commit d151f91

Please sign in to comment.