Mono repo -> Master (#22553)
Combines the following repositories into one: https://github.com/mattermost/mattermost-server https://github.com/mattermost/mattermost-webapp https://github.com/mattermost/focalboard https://github.com/mattermost/mattermost-plugin-playbooks
Этот коммит содержится в:
15
server/build/docker/grafana/dashboards/README.md
Обычный файл
15
server/build/docker/grafana/dashboards/README.md
Обычный файл
@@ -0,0 +1,15 @@
|
||||
# Developer Dashboards
|
||||
|
||||
This folder contains a modified form of the following Grafana dashboards:
|
||||
* [Mattermost Performance Monitoring](https://grafana.com/grafana/dashboards/2542)
|
||||
* [Mattermost Performance Monitoring (Bonus Metrics)](https://grafana.com/grafana/dashboards/2545)
|
||||
* [Mattermost Performance KPI Metrics](https://grafana.com/grafana/dashboards/2539)
|
||||
|
||||
The dashboards are modified from the version available on grafana.com since [Grafana doesn't currently support variables](https://github.com/grafana/grafana/issues/10786) (i.e. `${DS_MATTERMOST}`) and has no way of binding the datasource with the dashboards at the time of provisioning. Instead of falling back to the REST API to effect these changes, the following in-place changes were made to the exported dashboards available above:
|
||||
* Remove the top-level `__inputs` key
|
||||
* Remove the top-level `__requires` key
|
||||
* Replace all instances of `${DS_MATTERMOST}` with `Prometheus`, matching the name of the provisioned datasource.
|
||||
|
||||
Upon using the dashboards within Grafana however, it immediately adds various missing fields, presumably due to some internal migration. This results in a spurious prompt to "save" the dashboard. To avoid confusion, these changes were subsequently exported and written back into the provisioned dashboards above.
|
||||
|
||||
This entire process above will need to be repeated in the event newer versions of these dashboards are published.
|
||||
129
server/build/docker/grafana/dashboards/home.json
Обычный файл
129
server/build/docker/grafana/dashboards/home.json
Обычный файл
@@ -0,0 +1,129 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"id": 5,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 3,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"title": "",
|
||||
"type": "welcome"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 15,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 3
|
||||
},
|
||||
"headings": true,
|
||||
"id": 3,
|
||||
"limit": 30,
|
||||
"links": [],
|
||||
"query": "Mattermost",
|
||||
"recent": false,
|
||||
"search": true,
|
||||
"starred": false,
|
||||
"tags": [],
|
||||
"title": "Dashboards",
|
||||
"type": "dashlist"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 15,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 3
|
||||
},
|
||||
"id": 4,
|
||||
"links": [],
|
||||
"options": {
|
||||
"feedUrl": "https://grafana.com/blog/news.xml"
|
||||
},
|
||||
"title": "Latest from the blog",
|
||||
"type": "news"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 26,
|
||||
"style": "dark",
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"hidden": true,
|
||||
"refresh_intervals": [
|
||||
"5s",
|
||||
"10s",
|
||||
"30s",
|
||||
"1m",
|
||||
"5m",
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
],
|
||||
"time_options": [
|
||||
"5m",
|
||||
"15m",
|
||||
"1h",
|
||||
"6h",
|
||||
"12h",
|
||||
"24h",
|
||||
"2d",
|
||||
"7d",
|
||||
"30d"
|
||||
],
|
||||
"type": "timepicker"
|
||||
},
|
||||
"timezone": "browser",
|
||||
"title": "Home",
|
||||
"uid": "4yRNKfaGz",
|
||||
"version": 1
|
||||
}
|
||||
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
9
server/build/docker/grafana/grafana.ini
Обычный файл
9
server/build/docker/grafana/grafana.ini
Обычный файл
@@ -0,0 +1,9 @@
|
||||
[auth]
|
||||
disable_login_form = false
|
||||
|
||||
[auth.anonymous]
|
||||
enabled = true
|
||||
org_role = Editor
|
||||
|
||||
[dashboards]
|
||||
default_home_dashboard_path = /var/lib/grafana/dashboards/home.json
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
- name: 'mattermost'
|
||||
orgId: 1
|
||||
folder: 'mattermost'
|
||||
type: file
|
||||
disableDeletion: true
|
||||
updateIntervalSeconds: 300
|
||||
allowUiUpdates: true
|
||||
options:
|
||||
# <string, required> path to dashboard files on disk. Required when using the 'file' type
|
||||
path: /var/lib/grafana/dashboards
|
||||
foldersFromFilesStructure: true
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
type: 'prometheus'
|
||||
access: 'proxy'
|
||||
orgId: 1
|
||||
url: 'http://prometheus:9090'
|
||||
isDefault: true
|
||||
version: 1
|
||||
editable: false
|
||||
61
server/build/docker/keycloak/README.md
Обычный файл
61
server/build/docker/keycloak/README.md
Обычный файл
@@ -0,0 +1,61 @@
|
||||
To use this keycloak image, we suggest you to use this configuration settings:
|
||||
|
||||
- Enable Login With SAML 2.0: `true`
|
||||
- Enable Synchronizing SAML Accounts With AD/LDAP: `true`
|
||||
- Override SAML bind data with AD/LDAP information: `false`
|
||||
- Identity Provider Metadata URL: empty string
|
||||
- SAML SSO URL: `http://localhost:8484/auth/realms/mattermost/protocol/saml`
|
||||
- Identity Provider Issuer URL: `http://localhost:8484/auth/realms/mattermost`
|
||||
- Identity Provider Public Certificate: The file `keycloak.crt` in this same directory
|
||||
- Verify Signature: `true`
|
||||
- Service Provider Login URL: `http://localhost:8065/login/sso/saml`
|
||||
- Service Provider Identifier: `http://localhost:8065/login/sso/saml`
|
||||
- Enable Encryption: `false`
|
||||
- Sign Request: `false`
|
||||
- Email Attribute: `email`
|
||||
- Username Attribute: `username`
|
||||
- Id Attribute: `id`
|
||||
- First Name Attribute: `firstName`
|
||||
- Last Name Attribute: `lastName`
|
||||
|
||||
or overwrite your SamleSettings section with this settings in your config.json file (if you are not using
|
||||
database configuration) and restart the server:
|
||||
|
||||
```json
|
||||
"SamlSettings": {
|
||||
"Enable": true,
|
||||
"EnableSyncWithLdap": true,
|
||||
"EnableSyncWithLdapIncludeAuth": false,
|
||||
"IgnoreGuestsLdapSync": false,
|
||||
"Verify": true,
|
||||
"Encrypt": false,
|
||||
"SignRequest": false,
|
||||
"IdpUrl": "http://localhost:8484/auth/realms/mattermost/protocol/saml",
|
||||
"IdpDescriptorUrl": "http://localhost:8484/auth/realms/mattermost",
|
||||
"IdpMetadataUrl": "",
|
||||
"ServiceProviderIdentifier": "http://localhost:8065/login/sso/saml",
|
||||
"AssertionConsumerServiceURL": "http://localhost:8065/login/sso/saml",
|
||||
"SignatureAlgorithm": "RSAwithSHA1",
|
||||
"CanonicalAlgorithm": "Canonical1.0",
|
||||
"ScopingIDPProviderId": "",
|
||||
"ScopingIDPName": "",
|
||||
"IdpCertificateFile": "saml-idp.crt",
|
||||
"PublicCertificateFile": "",
|
||||
"PrivateKeyFile": "",
|
||||
"IdAttribute": "id",
|
||||
"GuestAttribute": "",
|
||||
"EnableAdminAttribute": false,
|
||||
"AdminAttribute": "",
|
||||
"FirstNameAttribute": "firstName",
|
||||
"LastNameAttribute": "lastName",
|
||||
"EmailAttribute": "email",
|
||||
"UsernameAttribute": "username",
|
||||
"NicknameAttribute": "",
|
||||
"LocaleAttribute": "",
|
||||
"PositionAttribute": "",
|
||||
"LoginButtonText": "SAML",
|
||||
"LoginButtonColor": "#34a28b",
|
||||
"LoginButtonBorderColor": "#2389D7",
|
||||
"LoginButtonTextColor": "#ffffff"
|
||||
},
|
||||
```
|
||||
3
server/build/docker/keycloak/keycloak.crt
Обычный файл
3
server/build/docker/keycloak/keycloak.crt
Обычный файл
@@ -0,0 +1,3 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICmzCCAYMCBgFyzt0uTDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZtYXN0ZXIwHhcNMjAwNjE5MjMxMzIxWhcNMzAwNjE5MjMxNTAxWjARMQ8wDQYDVQQDDAZtYXN0ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC2F7Ce+UoGvaSBtuo4ZEPASjDPl2uMK4ADcjDf9LBaVGCEu9Zs2yVIb45F27RrEMQOxph2mpBnKQQajlkIi28ABCxTgWvOhw+w8D+a6g2yphjS8hB5jAcgkw2jkHIKBfyMnjqxZRi33k+7oBhaDKosyCvThKG/QbqC293/ckvBZUJaLEoJn4s0eQoE0oQekXg0Snfhx7JqAqtvrOXtsACb5vbGGLnZIdi9SxcLDAC7mHviU2c7GQKAGVLo4aLYlJnr8by7yIEGvYmnjDx393V8XluKjc/DIsyEP9M4LmStzRRMd81DmZCOg0zx8AXVcqZCsERLOvflvX1bMM7/QtvfAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAHCyf7wTY8ZrPcqWuBj6JfD9iw+45dT4ZOAIlPXL5+wwYzdA7kkSfF7GCXLyYD0U6QEB2SA0RFPXU25WfIVMbDP1OyM4oCbzEqQvAeWkTxe0P+ZWgEUfVN9jgv4N9l/oUXiHkvyZi9K1KM8oLK3j1/YSAqBx60P6iS69a49Pry4eb6ab5mZyU/Tp7Ll7wTpdFW1o/pY9GCcX8cEBhfp+Jm2sVGczIF0s/aJ69rtcK1f8wmXOgY2VKx0eQ00wSOtkHvcPPWAmZzlkpYzdPSmMjluWVusA1T4QPOj44dxB+xI62i25BKUlQpWMmKaZX4Zb6QTUAyvDZusySnwMbr20ijE=
|
||||
-----END CERTIFICATE-----
|
||||
1966
server/build/docker/keycloak/realm.json
Обычный файл
1966
server/build/docker/keycloak/realm.json
Обычный файл
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
19
server/build/docker/mysql.conf.d/custom.cnf
Обычный файл
19
server/build/docker/mysql.conf.d/custom.cnf
Обычный файл
@@ -0,0 +1,19 @@
|
||||
[mysqld]
|
||||
bind-address = 0.0.0.0
|
||||
|
||||
log-output = NONE
|
||||
slow-query-log = 0
|
||||
innodb_flush_log_at_trx_commit = 2
|
||||
innodb_flush_method = nosync
|
||||
innodb_lock_wait_timeout = 50
|
||||
innodb_log_buffer_size = 3M
|
||||
innodb_buffer_pool_size = 180M
|
||||
|
||||
max_connect_errors = 1000000
|
||||
max_connections = 900
|
||||
|
||||
character-set-server = utf8
|
||||
sql_mode = ""
|
||||
innodb = FORCE
|
||||
default-storage-engine = Memory
|
||||
max_allowed_packet = 256M
|
||||
3
server/build/docker/mysql.conf.d/replica.cnf
Обычный файл
3
server/build/docker/mysql.conf.d/replica.cnf
Обычный файл
@@ -0,0 +1,3 @@
|
||||
[mysqld]
|
||||
|
||||
server-id = 2
|
||||
4
server/build/docker/mysql.conf.d/source.cnf
Обычный файл
4
server/build/docker/mysql.conf.d/source.cnf
Обычный файл
@@ -0,0 +1,4 @@
|
||||
[mysqld]
|
||||
|
||||
server-id = 1
|
||||
log-bin = mysql-bin
|
||||
38
server/build/docker/nginx/default.conf
Обычный файл
38
server/build/docker/nginx/default.conf
Обычный файл
@@ -0,0 +1,38 @@
|
||||
upstream app_cluster {
|
||||
server leader:8065 fail_timeout=10s max_fails=10;
|
||||
server follower:8065 fail_timeout=10s max_fails=10;
|
||||
server follower2:8065 fail_timeout=10s max_fails=10;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8065;
|
||||
|
||||
location ~ /api/v[0-9]+/(users/)?websocket$ {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_http_version 1.1;
|
||||
client_max_body_size 50M;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Frame-Options SAMEORIGIN;
|
||||
proxy_buffers 256 16k;
|
||||
proxy_buffer_size 16k;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_pass http://app_cluster;
|
||||
}
|
||||
|
||||
location / {
|
||||
client_max_body_size 50M;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Frame-Options SAMEORIGIN;
|
||||
proxy_pass http://app_cluster;
|
||||
}
|
||||
}
|
||||
7
server/build/docker/postgres.conf
Обычный файл
7
server/build/docker/postgres.conf
Обычный файл
@@ -0,0 +1,7 @@
|
||||
max_connections = 300
|
||||
listen_addresses = '*'
|
||||
fsync = off
|
||||
full_page_writes = off
|
||||
default_text_search_config = 'pg_catalog.english'
|
||||
commit_delay=1000
|
||||
logging_collector=off
|
||||
8
server/build/docker/prometheus-linux.yml
Обычный файл
8
server/build/docker/prometheus-linux.yml
Обычный файл
@@ -0,0 +1,8 @@
|
||||
global:
|
||||
scrape_interval: 5s
|
||||
evaluation_interval: 60s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'mattermost'
|
||||
static_configs:
|
||||
- targets: ['172.17.0.1:8067']
|
||||
8
server/build/docker/prometheus.yml
Обычный файл
8
server/build/docker/prometheus.yml
Обычный файл
@@ -0,0 +1,8 @@
|
||||
global:
|
||||
scrape_interval: 5s
|
||||
evaluation_interval: 60s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'mattermost'
|
||||
static_configs:
|
||||
- targets: ['host.docker.internal:8067']
|
||||
Ссылка в новой задаче
Block a user