1
0
mirror of https://github.com/coltoneshaw/CS-Repro-Mattermost.git synced 2025-12-23 10:01:30 +01:00

Added mattermost HA

This commit is contained in:
coltoneshaw
2024-04-01 12:01:38 -04:00
parent 82e5171281
commit 0212df2766
8 changed files with 141 additions and 677 deletions

2
.gitignore vendored
View File

@@ -5,7 +5,7 @@ license.txt
volumes volumes
## We hate DS_Store files. ## We hate DS_Store files.
**/.DS_Store **/**/.DS_Store
.DS_Store .DS_Store
files/postgres/replica/replica_1.conf files/postgres/replica/replica_1.conf

View File

@@ -23,23 +23,30 @@ echo-logins:
run: run:
@echo "Starting..." @echo "Starting..."
@make restore-keycloak @make restore-keycloak
@docker-compose up -d @make run-core
@make setup-mattermost @make setup-mattermost
@make echo-logins @make echo-logins
start: run-core:
@make run @echo "Starting the core services... hang in there."
@docker-compose up -d postgres openldap prometheus grafana elasticsearch mattermost keycloak
start-replicas: run-db-replicas:
@make run @echo "Starting with replicas. Hang in there..."
@echo "Starting the replicas... hold on a moment..." @docker-compose up -d postgres-replica-1 postgres-replica-2
@docker-compose -f docker-compose.yml -f docker-compose-read-replicas.yml up -d
@docker exec -it cs-repro-mattermost mmctl config patch /mattermost/config/replicaConfig.json --local @docker exec -it cs-repro-mattermost mmctl config patch /mattermost/config/replicaConfig.json --local
@echo "Sleeping for 2 minutes while the replication is established. Be back in a moment..."
@sleep 120
@make restart-mattermost
@echo "Should be up and running. Go crazy." @echo "Should be up and running. Go crazy."
## Need a way to modify the
run-mm-replicas:
@echo "Starting Mattermost replicas. Hang in there..."
@docker exec -it cs-repro-mattermost mmctl config set ClusterSettings.Enable true --local
@docker-compose down mattermost
@docker-compose up -d mattermost mattermost-2
@echo "Should be up and running. Go crazy."
run-all: run run-db-replicas run-mm-replicas
stop: stop:
@echo "Stopping..." @echo "Stopping..."
@docker-compose stop @docker-compose stop

View File

@@ -21,15 +21,21 @@ This is designed to be used as a reproduction of a standard customer production
note: If you ignore this step Mattermost will not spin up. note: If you ignore this step Mattermost will not spin up.
2. Start the docker containers. This may take a second to download everything. 2. Start the docker containers.
You'll be prompted on setting up the test data. You'll be prompted on setting up the test data.
```make ```make
make start make run
``` ```
3. Sign into Mattermost 3. (Optional) If you want to start more features you can run one of the below.
- `make run-db-replicas` - Adding the database replicas. Note this can take 2-3 minutes to spin up.
- `make run-mm-replicas` - Adding a Mattermost HA node
- `make run-all` - DB replicas and HA Mattermost.
4. Sign into Mattermost
- You can use any of the accounts to sign in. - You can use any of the accounts to sign in.
- The keycloak container can be **very** picky sometimes and require a restart of just that container to sign in with that method the first time. - The keycloak container can be **very** picky sometimes and require a restart of just that container to sign in with that method the first time.
@@ -56,7 +62,10 @@ Additionally, the keycloak container can take up to 5 minutes to spin up. If it'
## Commands ## Commands
- **`make start` / `make run`**: Initializes the environment. - **`make start` / `make run`**: Initializes the environment.
- **`make start-replica`**: Launches the environment with replicas. Ideal for adding replicas to an existing setup or initializing with replicas from the get-go. - **`make run-all`**: Spins up all environment containers with the database replicas and Mattermost HA.
- You must run `make run` before running the below:
- **`make run-db-replica`**: Launches the environment with replicas. Ideal for adding replicas to an existing setup or initializing with replicas from the get-go.
- **`make run-mm-replica`: Launches an additional Mattermost node and enables HA.
- **`make backup-keycloak`**: Generates a backup of the current Keycloak setup in the files directory. Useful for infrequent backups. - **`make backup-keycloak`**: Generates a backup of the current Keycloak setup in the files directory. Useful for infrequent backups.
- **`make restore-keycloak`**: Restores Keycloak data from an existing backup. Ensure `./volumes/keycloak` is cleared before restoration. - **`make restore-keycloak`**: Restores Keycloak data from an existing backup. Ensure `./volumes/keycloak` is cleared before restoration.
- **`make stop`**: Halts all running containers. - **`make stop`**: Halts all running containers.
@@ -155,13 +164,14 @@ The basic structure for you to add two read replicas has been included in the re
If you are starting from fresh run: If you are starting from fresh run:
```bash ```bash
make start-replicas make run
make run-db-replicas
``` ```
If you want to add replicas to an existing cs repro: If you want to add replicas to an existing cs repro:
```bash ```bash
make start-replicas make run-db-replicas
``` ```
#### Replication Config and access #### Replication Config and access
@@ -174,6 +184,20 @@ You can access each replica with the same username / password. Just need to chan
- replica_1 - `postgresql://mmuser:mmuser_password@localhost:5433/mattermost` - replica_1 - `postgresql://mmuser:mmuser_password@localhost:5433/mattermost`
- replica_2 - `postgresql://mmuser:mmuser_password@localhost:5434/mattermost` - replica_2 - `postgresql://mmuser:mmuser_password@localhost:5434/mattermost`
### Mattermost HA
Mattermost HA functionality is built into this repo already, but can be expanded out as needed. To use HA or add to an existing deployment you simply have to do:
```bash
make run
make run-mm-replicas
```
This runs mattermost on two ports that are connected on the backend.
- `localhost:8065`
- `localhost:8066`
## Grafana ## Grafana
All the Mattermost grafana charts are already installed and linked, you just have to access them. All the Mattermost grafana charts are already installed and linked, you just have to access them.

View File

@@ -1,51 +0,0 @@
services:
postgres-replica-1:
container_name: cs-repro-postgres-replica-1
environment:
- POSTGRES_USER=mmuser
- POSTGRES_PASSWORD=mmuser_password
- LISTEN_ADDRESS="*"
- REPLICA_NAME=replica_1
image: postgres:14-alpine
restart: unless-stopped
ports:
- "5433:5432"
security_opt:
- no-new-privileges:true
pids_limit: 100
read_only: false
tmpfs:
- /tmp
- /var/run/postgresql
volumes:
- ./files/postgres/replica/init.sh:/docker-entrypoint-initdb.d/init.sh
- ./volumes/db/replica_1/data:/var/lib/postgresql/data
- ./files/postgres/replica:/files/postgres/replica
depends_on:
- mattermost
- postgres
postgres-replica-2:
container_name: cs-repro-postgres-replica-2
environment:
- POSTGRES_USER=mmuser
- POSTGRES_PASSWORD=mmuser_password
- LISTEN_ADDRESS="*"
- REPLICA_NAME=replica_2
image: postgres:14-alpine
restart: unless-stopped
ports:
- "5434:5432"
security_opt:
- no-new-privileges:true
pids_limit: 100
read_only: false
tmpfs:
- /tmp
- /var/run/postgresql
volumes:
- ./files/postgres/replica/init.sh:/docker-entrypoint-initdb.d/init.sh
- ./files/postgres/replica:/files/postgres/replica
- ./volumes/db/replica_2/data:/var/lib/postgresql/data
depends_on:
- mattermost
- postgres

View File

@@ -139,7 +139,91 @@ services:
ports: ports:
- 9200:9200 - 9200:9200
- 9300:9300 - 9300:9300
# mysql: postgres-replica-1:
container_name: cs-repro-postgres-replica-1
environment:
- POSTGRES_USER=mmuser
- POSTGRES_PASSWORD=mmuser_password
- LISTEN_ADDRESS="*"
- REPLICA_NAME=replica_1
image: postgres:14-alpine
restart: unless-stopped
ports:
- "5433:5432"
security_opt:
- no-new-privileges:true
pids_limit: 100
read_only: false
tmpfs:
- /tmp
- /var/run/postgresql
volumes:
- ./files/postgres/replica/init.sh:/docker-entrypoint-initdb.d/init.sh
- ./volumes/db/replica_1/data:/var/lib/postgresql/data
- ./files/postgres/replica:/files/postgres/replica
depends_on:
- postgres
postgres-replica-2:
container_name: cs-repro-postgres-replica-2
environment:
- POSTGRES_USER=mmuser
- POSTGRES_PASSWORD=mmuser_password
- LISTEN_ADDRESS="*"
- REPLICA_NAME=replica_2
image: postgres:14-alpine
restart: unless-stopped
ports:
- "5434:5432"
security_opt:
- no-new-privileges:true
pids_limit: 100
read_only: false
tmpfs:
- /tmp
- /var/run/postgresql
volumes:
- ./files/postgres/replica/init.sh:/docker-entrypoint-initdb.d/init.sh
- ./files/postgres/replica:/files/postgres/replica
- ./volumes/db/replica_2/data:/var/lib/postgresql/data
depends_on:
- postgres
mattermost-2:
platform: linux/amd64
container_name: cs-repro-mattermost-2
depends_on:
postgres:
condition: service_healthy
image: mattermost/mattermost-enterprise-edition:release-9.6
restart: unless-stopped
security_opt:
- no-new-privileges:true
pids_limit: 200
read_only: false
ports:
- "8066:8065"
- "8068:8067"
tmpfs:
- /tmp
volumes:
- ./volumes/mattermost/config:/mattermost/config:rw
- ./volumes/mattermost/data:/mattermost/data:rw
- ./volumes/mattermost_2/logs:/mattermost/logs:rw
- ./volumes/mattermost_2/plugins:/mattermost/plugins:rw
- ./volumes/mattermost_2/client/plugins:/mattermost/client/plugins:rw
- ./volumes/mattermost_2/bleve-indexes:/mattermost/bleve-indexes:rw
- ./license.mattermost:/mattermost/config/license.mattermost-enterprise:ro
- ./files/mattermost/samlCert.crt:/mattermost/config/saml-cert.crt
- ./files/mattermost/advancedLogging.json:/mattermost/config/advancedLogging.json:ro
- ./files/mattermost/defaultConfig.json:/mattermost/config/defaultConfig.json:ro
- ./files/mattermost/replicaConfig.json:/mattermost/config/replicaConfig.json:ro
environment:
- MM_SqlSettings_DriverName=postgres
- MM_SqlSettings_DataSource=postgres://mmuser:mmuser_password@cs-repro-postgres:5432/mattermost?sslmode=disable&connect_timeout=10&binary_parameters=yes
- MM_SAMLSETTINGS_IDPCERTIFICATEFILE=/mattermost/config/saml-cert.crt
- MM_ServiceSettings_EnableLocalMode=true
- MM_ServiceSettings_LocalModeSocketLocation=/var/tmp/mattermost_local.socket
- MM_ServiceSettings_LicenseFileLocation=/mattermost/config/license.mattermost-enterprise
# mysql:
# container_name: cs-repro-mysql # container_name: cs-repro-mysql
# image: mysql:8 # image: mysql:8
# restart: always # restart: always
@@ -164,3 +248,4 @@ services:
# # Where our data will be persisted # # Where our data will be persisted
# volumes: # volumes:
# - ./volumes/db/mysql:/var/lib/mysql # - ./volumes/db/mysql:/var/lib/mysql

View File

@@ -1,605 +0,0 @@
{
"ServiceSettings": {
"SiteURL": "",
"WebsocketURL": "",
"LicenseFileLocation": "config/license.mattermost-enterprise",
"ListenAddress": ":8065",
"ConnectionSecurity": "",
"TLSCertFile": "",
"TLSKeyFile": "",
"TLSMinVer": "1.2",
"TLSStrictTransport": false,
"TLSStrictTransportMaxAge": 63072000,
"TLSOverwriteCiphers": [],
"UseLetsEncrypt": false,
"LetsEncryptCertificateCacheFile": "./config/letsencrypt.cache",
"Forward80To443": false,
"TrustedProxyIPHeader": [],
"ReadTimeout": 300,
"WriteTimeout": 300,
"IdleTimeout": 60,
"MaximumLoginAttempts": 10,
"GoroutineHealthThreshold": -1,
"EnableOAuthServiceProvider": false,
"EnableIncomingWebhooks": true,
"EnableOutgoingWebhooks": true,
"EnableCommands": true,
"EnablePostUsernameOverride": false,
"EnablePostIconOverride": false,
"GoogleDeveloperKey": "",
"EnableLinkPreviews": true,
"EnablePermalinkPreviews": true,
"RestrictLinkPreviews": "",
"EnableTesting": false,
"EnableDeveloper": false,
"DeveloperFlags": "",
"EnableClientPerformanceDebugging": false,
"EnableOpenTracing": false,
"EnableSecurityFixAlert": true,
"EnableInsecureOutgoingConnections": false,
"AllowedUntrustedInternalConnections": "cs-repro-keycloak:8080 cs-repro-keycloak",
"EnableMultifactorAuthentication": false,
"EnforceMultifactorAuthentication": false,
"EnableUserAccessTokens": false,
"AllowCorsFrom": "",
"CorsExposedHeaders": "",
"CorsAllowCredentials": false,
"CorsDebug": false,
"AllowCookiesForSubdomains": false,
"ExtendSessionLengthWithActivity": false,
"SessionLengthWebInDays": 180,
"SessionLengthWebInHours": 4320,
"SessionLengthMobileInDays": 180,
"SessionLengthMobileInHours": 4320,
"SessionLengthSSOInDays": 30,
"SessionLengthSSOInHours": 720,
"SessionCacheInMinutes": 10,
"SessionIdleTimeoutInMinutes": 43200,
"WebsocketSecurePort": 443,
"WebsocketPort": 80,
"WebserverMode": "gzip",
"EnableGifPicker": true,
"GfycatAPIKey": "2_KtH_W5",
"GfycatAPISecret": "3wLVZPiswc3DnaiaFoLkDvB4X0IV6CpMkj4tf2inJRsBY6-FnkT08zGmppWFgeof",
"EnableCustomEmoji": true,
"EnableEmojiPicker": true,
"PostEditTimeLimit": -1,
"TimeBetweenUserTypingUpdatesMilliseconds": 5000,
"EnablePostSearch": true,
"EnableFileSearch": true,
"MinimumHashtagLength": 3,
"EnableUserTypingMessages": true,
"EnableChannelViewedMessages": true,
"EnableUserStatuses": true,
"ExperimentalEnableAuthenticationTransfer": true,
"ClusterLogTimeoutMilliseconds": 2000,
"EnablePreviewFeatures": true,
"EnableTutorial": true,
"EnableOnboardingFlow": true,
"ExperimentalEnableDefaultChannelLeaveJoinMessages": true,
"ExperimentalGroupUnreadChannels": "disabled",
"EnableAPITeamDeletion": false,
"EnableAPITriggerAdminNotifications": false,
"EnableAPIUserDeletion": false,
"ExperimentalEnableHardenedMode": false,
"ExperimentalStrictCSRFEnforcement": false,
"EnableEmailInvitations": true,
"DisableBotsWhenOwnerIsDeactivated": true,
"EnableBotAccountCreation": false,
"EnableSVGs": true,
"EnableLatex": true,
"EnableInlineLatex": true,
"PostPriority": true,
"EnableAPIChannelDeletion": false,
"EnableLocalMode": true,
"LocalModeSocketLocation": "/var/tmp/mattermost_local.socket",
"EnableAWSMetering": false,
"SplitKey": "",
"FeatureFlagSyncIntervalSeconds": 30,
"DebugSplit": false,
"ThreadAutoFollow": true,
"CollapsedThreads": "always_on",
"ManagedResourcePaths": "",
"EnableCustomGroups": true,
"SelfHostedPurchase": true,
"AllowSyncedDrafts": true
},
"TeamSettings": {
"SiteName": "Mattermost",
"MaxUsersPerTeam": 50,
"EnableUserCreation": false,
"EnableOpenServer": false,
"EnableUserDeactivation": false,
"RestrictCreationToDomains": "",
"EnableCustomUserStatuses": true,
"EnableCustomBrand": false,
"CustomBrandText": "",
"CustomDescriptionText": "",
"RestrictDirectMessage": "any",
"EnableLastActiveTime": true,
"UserStatusAwayTimeout": 300,
"MaxChannelsPerTeam": 2000,
"MaxNotificationsPerChannel": 1000,
"EnableConfirmNotificationsToChannel": true,
"TeammateNameDisplay": "full_name",
"ExperimentalViewArchivedChannels": true,
"ExperimentalEnableAutomaticReplies": false,
"LockTeammateNameDisplay": false,
"ExperimentalPrimaryTeam": "",
"ExperimentalDefaultChannels": []
},
"ClientRequirements": {
"AndroidLatestVersion": "",
"AndroidMinVersion": "",
"IosLatestVersion": "",
"IosMinVersion": ""
},
"SqlSettings": {
"DriverName": "postgres",
"DataSource": "postgres://mmuser:mmuser_password@cs-repro-postgres:5432/mattermost?sslmode=disable\u0026connect_timeout=10\u0026binary_parameters=yes",
"DataSourceReplicas": [],
"DataSourceSearchReplicas": [],
"MaxIdleConns": 20,
"ConnMaxLifetimeMilliseconds": 3600000,
"ConnMaxIdleTimeMilliseconds": 300000,
"MaxOpenConns": 300,
"Trace": false,
"AtRestEncryptKey": "c6j9z5bzbsargtkk17fxcjuyw7yetkdd",
"QueryTimeout": 30,
"DisableDatabaseSearch": false,
"MigrationsStatementTimeoutSeconds": 100000,
"ReplicaLagSettings": []
},
"LogSettings": {
"EnableConsole": true,
"ConsoleLevel": "DEBUG",
"ConsoleJson": true,
"EnableColor": false,
"EnableFile": true,
"FileLevel": "DEBUG",
"FileJson": true,
"FileLocation": "",
"EnableWebhookDebugging": true,
"EnableDiagnostics": true,
"VerboseDiagnostics": false,
"EnableSentry": true,
"AdvancedLoggingConfig": ""
},
"ExperimentalAuditSettings": {
"FileEnabled": false,
"FileName": "",
"FileMaxSizeMB": 100,
"FileMaxAgeDays": 0,
"FileMaxBackups": 0,
"FileCompress": false,
"FileMaxQueueSize": 1000,
"AdvancedLoggingConfig": ""
},
"NotificationLogSettings": {
"EnableConsole": true,
"ConsoleLevel": "DEBUG",
"ConsoleJson": true,
"EnableColor": false,
"EnableFile": true,
"FileLevel": "INFO",
"FileJson": true,
"FileLocation": "",
"AdvancedLoggingConfig": ""
},
"PasswordSettings": {
"MinimumLength": 8,
"Lowercase": false,
"Number": false,
"Uppercase": false,
"Symbol": false
},
"FileSettings": {
"EnableFileAttachments": true,
"EnableMobileUpload": true,
"EnableMobileDownload": true,
"MaxFileSize": 104857600,
"MaxImageResolution": 33177600,
"MaxImageDecoderConcurrency": -1,
"DriverName": "local",
"Directory": "./data/",
"EnablePublicLink": false,
"ExtractContent": true,
"ArchiveRecursion": false,
"PublicLinkSalt": "5dt8nrqjspnjikmb7yaz9kwesanaqcf5",
"InitialFont": "nunito-bold.ttf",
"AmazonS3AccessKeyId": "",
"AmazonS3SecretAccessKey": "",
"AmazonS3Bucket": "",
"AmazonS3PathPrefix": "",
"AmazonS3Region": "",
"AmazonS3Endpoint": "s3.amazonaws.com",
"AmazonS3SSL": true,
"AmazonS3SignV2": false,
"AmazonS3SSE": false,
"AmazonS3Trace": false,
"AmazonS3RequestTimeoutMilliseconds": 30000
},
"EmailSettings": {
"EnableSignUpWithEmail": false,
"EnableSignInWithEmail": false,
"EnableSignInWithUsername": true,
"SendEmailNotifications": true,
"UseChannelInEmailNotifications": false,
"RequireEmailVerification": false,
"FeedbackName": "",
"FeedbackEmail": "test@example.com",
"ReplyToAddress": "test@example.com",
"FeedbackOrganization": "",
"EnableSMTPAuth": false,
"SMTPUsername": "",
"SMTPPassword": "",
"SMTPServer": "localhost",
"SMTPPort": "10025",
"SMTPServerTimeout": 10,
"ConnectionSecurity": "",
"SendPushNotifications": false,
"PushNotificationServer": "",
"PushNotificationContents": "full",
"PushNotificationBuffer": 1000,
"EnableEmailBatching": false,
"EmailBatchingBufferSize": 256,
"EmailBatchingInterval": 30,
"EnablePreviewModeBanner": true,
"SkipServerCertificateVerification": false,
"EmailNotificationContentsType": "full",
"LoginButtonColor": "#0000",
"LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#2389D7",
"EnableInactivityEmail": true
},
"RateLimitSettings": {
"Enable": false,
"PerSec": 10,
"MaxBurst": 100,
"MemoryStoreSize": 10000,
"VaryByRemoteAddr": true,
"VaryByUser": false,
"VaryByHeader": ""
},
"PrivacySettings": {
"ShowEmailAddress": true,
"ShowFullName": true
},
"SupportSettings": {
"TermsOfServiceLink": "https://mattermost.com/terms-of-use/",
"PrivacyPolicyLink": "https://mattermost.com/privacy-policy/",
"AboutLink": "https://docs.mattermost.com/about/product.html/",
"HelpLink": "https://mattermost.com/default-help/",
"ReportAProblemLink": "https://mattermost.com/default-report-a-problem/",
"SupportEmail": "",
"CustomTermsOfServiceEnabled": false,
"CustomTermsOfServiceReAcceptancePeriod": 365,
"EnableAskCommunityLink": true
},
"AnnouncementSettings": {
"EnableBanner": false,
"BannerText": "",
"BannerColor": "#f2a93b",
"BannerTextColor": "#333333",
"AllowBannerDismissal": true,
"AdminNoticesEnabled": true,
"UserNoticesEnabled": true,
"NoticesURL": "https://notices.mattermost.com/",
"NoticesFetchFrequency": 3600,
"NoticesSkipCache": false
},
"ThemeSettings": {
"EnableThemeSelection": true,
"DefaultTheme": "default",
"AllowCustomThemes": true,
"AllowedThemes": []
},
"GitLabSettings": {
"Enable": false,
"Secret": "",
"Id": "",
"Scope": "",
"AuthEndpoint": "",
"TokenEndpoint": "",
"UserAPIEndpoint": "",
"DiscoveryEndpoint": "",
"ButtonText": "",
"ButtonColor": ""
},
"GoogleSettings": {
"Enable": false,
"Secret": "",
"Id": "",
"Scope": "profile email",
"AuthEndpoint": "https://accounts.google.com/o/oauth2/v2/auth",
"TokenEndpoint": "https://www.googleapis.com/oauth2/v4/token",
"UserAPIEndpoint": "https://people.googleapis.com/v1/people/me?personFields=names,emailAddresses,nicknames,metadata",
"DiscoveryEndpoint": "",
"ButtonText": "",
"ButtonColor": ""
},
"Office365Settings": {
"Enable": false,
"Secret": "",
"Id": "",
"Scope": "User.Read",
"AuthEndpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
"TokenEndpoint": "https://login.microsoftonline.com/common/oauth2/v2.0/token",
"UserAPIEndpoint": "https://graph.microsoft.com/v1.0/me",
"DiscoveryEndpoint": "",
"DirectoryId": ""
},
"OpenIdSettings": {
"Enable": false,
"Secret": "",
"Id": "",
"Scope": "profile openid email",
"AuthEndpoint": "",
"TokenEndpoint": "",
"UserAPIEndpoint": "",
"DiscoveryEndpoint": "",
"ButtonText": "",
"ButtonColor": "#145DBF"
},
"LdapSettings": {
"Enable": true,
"EnableSync": true,
"LdapServer": "openldap",
"LdapPort": 10389,
"ConnectionSecurity": "",
"BaseDN": "dc=planetexpress,dc=com",
"BindUsername": "cn=admin,dc=planetexpress,dc=com",
"BindPassword": "GoodNewsEveryone",
"UserFilter": "(objectClass=Person)",
"GroupFilter": "(objectClass=Group)",
"GuestFilter": "",
"EnableAdminFilter": false,
"AdminFilter": "(memberof=cn=admin_staff,ou=people,dc=planetexpress,dc=com)",
"GroupDisplayNameAttribute": "cn",
"GroupIdAttribute": "cn",
"FirstNameAttribute": "givenName",
"LastNameAttribute": "sn",
"EmailAttribute": "mail",
"UsernameAttribute": "uid",
"NicknameAttribute": "",
"IdAttribute": "uid",
"PositionAttribute": "",
"LoginIdAttribute": "uid",
"PictureAttribute": "",
"SyncIntervalMinutes": 60,
"SkipCertificateVerification": false,
"PublicCertificateFile": "",
"PrivateKeyFile": "",
"QueryTimeout": 60,
"MaxPageSize": 0,
"LoginFieldName": "",
"LoginButtonColor": "#0000",
"LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#2389D7",
"Trace": true
},
"ComplianceSettings": {
"Enable": false,
"Directory": "./data/",
"EnableDaily": false,
"BatchSize": 30000
},
"LocalizationSettings": {
"DefaultServerLocale": "en",
"DefaultClientLocale": "en",
"AvailableLocales": ""
},
"SamlSettings": {
"Enable": true,
"EnableSyncWithLdap": true,
"EnableSyncWithLdapIncludeAuth": true,
"IgnoreGuestsLdapSync": false,
"Verify": false,
"Encrypt": false,
"SignRequest": false,
"IdpURL": "http://localhost:8080/realms/master/protocol/saml",
"IdpDescriptorURL": "http://localhost:8080/realms/master",
"IdpMetadataURL": "http://cs-repro-keycloak:8080/realms/master/protocol/saml/descriptor",
"ServiceProviderIdentifier": "mattermost",
"AssertionConsumerServiceURL": "http://localhost:8065/login/sso/saml",
"SignatureAlgorithm": "RSAwithSHA1",
"CanonicalAlgorithm": "Canonical1.0",
"ScopingIDPProviderId": "",
"ScopingIDPName": "",
"IdpCertificateFile": "samlCert.crt",
"PublicCertificateFile": "",
"PrivateKeyFile": "",
"IdAttribute": "id",
"GuestAttribute": "",
"EnableAdminAttribute": false,
"AdminAttribute": "",
"FirstNameAttribute": "",
"LastNameAttribute": "",
"EmailAttribute": "email",
"UsernameAttribute": "username",
"NicknameAttribute": "",
"LocaleAttribute": "",
"PositionAttribute": "",
"LoginButtonText": "keycloak",
"LoginButtonColor": "#34a28b",
"LoginButtonBorderColor": "#2389D7",
"LoginButtonTextColor": "#ffffff"
},
"NativeAppSettings": {
"AppCustomURLSchemes": [
"mmauth://",
"mmauthbeta://"
],
"AppDownloadLink": "https://mattermost.com/download/#mattermostApps",
"AndroidAppDownloadLink": "https://mattermost.com/mattermost-android-app/",
"IosAppDownloadLink": "https://mattermost.com/mattermost-ios-app/"
},
"ClusterSettings": {
"Enable": false,
"ClusterName": "",
"OverrideHostname": "",
"NetworkInterface": "",
"BindAddress": "",
"AdvertiseAddress": "",
"UseIPAddress": true,
"EnableGossipCompression": true,
"EnableExperimentalGossipEncryption": false,
"ReadOnlyConfig": true,
"GossipPort": 8074,
"StreamingPort": 8075,
"MaxIdleConns": 100,
"MaxIdleConnsPerHost": 128,
"IdleConnTimeoutMilliseconds": 90000
},
"MetricsSettings": {
"Enable": true,
"BlockProfileRate": 0,
"ListenAddress": ":8067"
},
"ExperimentalSettings": {
"ClientSideCertEnable": false,
"ClientSideCertCheck": "secondary",
"LinkMetadataTimeoutMilliseconds": 5000,
"RestrictSystemAdmin": false,
"UseNewSAMLLibrary": false,
"EnableSharedChannels": false,
"EnableRemoteClusterService": false,
"EnableAppBar": false,
"PatchPluginsReactDOM": false
},
"AnalyticsSettings": {
"MaxUsersForStatistics": 2500
},
"ElasticsearchSettings": {
"ConnectionURL": "http://cs-repro-elasticsearch:9200",
"Username": "elastic",
"Password": "changeme",
"EnableIndexing": true,
"EnableSearching": true,
"EnableAutocomplete": true,
"Sniff": true,
"PostIndexReplicas": 1,
"PostIndexShards": 1,
"ChannelIndexReplicas": 1,
"ChannelIndexShards": 1,
"UserIndexReplicas": 1,
"UserIndexShards": 1,
"AggregatePostsAfterDays": 365,
"PostsAggregatorJobStartTime": "03:00",
"IndexPrefix": "",
"LiveIndexingBatchSize": 1,
"BatchSize": 10000,
"RequestTimeoutSeconds": 30,
"SkipTLSVerification": false,
"Trace": ""
},
"BleveSettings": {
"IndexDir": "",
"EnableIndexing": false,
"EnableSearching": false,
"EnableAutocomplete": false,
"BatchSize": 10000
},
"DataRetentionSettings": {
"EnableMessageDeletion": false,
"EnableFileDeletion": false,
"EnableBoardsDeletion": false,
"MessageRetentionDays": 365,
"FileRetentionDays": 365,
"BoardsRetentionDays": 365,
"DeletionJobStartTime": "02:00",
"BatchSize": 3000
},
"MessageExportSettings": {
"EnableExport": false,
"ExportFormat": "actiance",
"DailyRunTime": "01:00",
"ExportFromTimestamp": 0,
"BatchSize": 10000,
"DownloadExportResults": false,
"GlobalRelaySettings": {
"CustomerType": "A9",
"SMTPUsername": "",
"SMTPPassword": "",
"EmailAddress": "",
"SMTPServerTimeout": 1800
}
},
"JobSettings": {
"RunJobs": true,
"RunScheduler": true,
"CleanupJobsThresholdDays": -1,
"CleanupConfigThresholdDays": -1
},
"ProductSettings": {
"EnablePublicSharedBoards": false
},
"PluginSettings": {
"Enable": true,
"EnableUploads": true,
"AllowInsecureDownloadURL": false,
"EnableHealthCheck": true,
"Directory": "./plugins",
"ClientDirectory": "./client/plugins",
"Plugins": {
"playbooks": {
"BotUserID": "qy9ge6fgcjf35yc5ugb93r65fh"
}
},
"PluginStates": {
"com.mattermost.apps": {
"Enable": true
},
"com.mattermost.calls": {
"Enable": true
},
"com.mattermost.nps": {
"Enable": true
},
"com.mattermost.plugin-channel-export": {
"Enable": true
},
"focalboard": {
"Enable": true
},
"playbooks": {
"Enable": true
}
},
"EnableMarketplace": true,
"EnableRemoteMarketplace": true,
"AutomaticPrepackagedPlugins": true,
"RequirePluginSignature": false,
"MarketplaceURL": "https://api.integrations.mattermost.com",
"SignaturePublicKeyFiles": [],
"ChimeraOAuthProxyURL": ""
},
"DisplaySettings": {
"CustomURLSchemes": [],
"ExperimentalTimezone": true
},
"GuestAccountsSettings": {
"Enable": true,
"AllowEmailAccounts": true,
"EnforceMultifactorAuthentication": false,
"RestrictCreationToDomains": ""
},
"ImageProxySettings": {
"Enable": false,
"ImageProxyType": "local",
"RemoteImageProxyURL": "",
"RemoteImageProxyOptions": ""
},
"CloudSettings": {
"CWSURL": "https://customers.mattermost.com",
"CWSAPIURL": "https://portal.internal.prod.cloud.mattermost.com"
},
"ImportSettings": {
"Directory": "./import",
"RetentionDays": 30
},
"ExportSettings": {
"Directory": "./export",
"RetentionDays": 30
}
}

View File

@@ -9,7 +9,7 @@
"ConsoleJson": true, "ConsoleJson": true,
"EnableColor": false, "EnableColor": false,
"EnableFile": true, "EnableFile": true,
"FileLevel": "INFO", "FileLevel": "DEBUG",
"FileJson": true, "FileJson": true,
"FileLocation": "", "FileLocation": "",
"EnableWebhookDebugging": true, "EnableWebhookDebugging": true,
@@ -135,5 +135,9 @@
"PluginSettings": { "PluginSettings": {
"Enable": true, "Enable": true,
"EnableUploads": true "EnableUploads": true
},
"ClusterSettings": {
"ClusterName": "mattermost",
"ReadOnlyConfig": false
} }
} }

View File

@@ -27,4 +27,4 @@ scrape_configs:
# scheme defaults to 'http'. # scheme defaults to 'http'.
static_configs: static_configs:
- targets: ["mattermost:8067"] - targets: ["mattermost:8067", "mattermost-2:8067"]