mirror of
https://github.com/coltoneshaw/CS-Repro-Mattermost.git
synced 2025-12-23 18:11:34 +01:00
add claude file and update readme (#21)
This commit is contained in:
92
CLAUDE.md
Normal file
92
CLAUDE.md
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
# CLAUDE.md
|
||||||
|
|
||||||
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||||
|
|
||||||
|
## Project Overview
|
||||||
|
|
||||||
|
This repository contains a CS Repro Mattermost environment - a reproduction of a standard Mattermost customer production environment with preconfigured SAML, LDAP, Advanced Logging, Prometheus, Grafana, Elasticsearch, and read replicas. It is designed for testing and reproducing customer environments.
|
||||||
|
|
||||||
|
## Environment Setup
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
You need to have Docker and Docker Compose installed on your machine to run this environment.
|
||||||
|
|
||||||
|
### Initial Setup
|
||||||
|
|
||||||
|
1. Add an enterprise license file named `license.mattermost` to the root directory
|
||||||
|
2. Run `make run` to start the core services
|
||||||
|
|
||||||
|
## Common Commands
|
||||||
|
|
||||||
|
### Environment Management
|
||||||
|
|
||||||
|
- `make run` - Initialize environment and create containers
|
||||||
|
- `make run-all` - Spin up all environment containers (with DB replicas and Mattermost HA)
|
||||||
|
- `make run-db-replicas` - Add database replicas to the environment
|
||||||
|
- `make run-mm-replicas` - Add Mattermost HA nodes to the environment
|
||||||
|
- `make run-rtcd` - Launch RTCD service for Mattermost Calls
|
||||||
|
- `make start` - Start existing containers
|
||||||
|
- `make stop` - Stop all running containers
|
||||||
|
- `make restart` - Restart all containers
|
||||||
|
- `make restart-mattermost` - Restart only Mattermost containers (preferred for testing changes)
|
||||||
|
- `make backup-keycloak` - Generate a backup of the current Keycloak setup
|
||||||
|
- `make restore-keycloak` - Restore Keycloak data from an existing backup
|
||||||
|
- `make reset` - Clean volumes directory and reinitialize the environment
|
||||||
|
- `make delete-data` - Clear all data within volumes
|
||||||
|
- `make nuke` - Erase all configurations and data
|
||||||
|
- `make nuke-rmi` - Complete cleanup including removing Docker images
|
||||||
|
|
||||||
|
### Upgrading and Downgrading
|
||||||
|
|
||||||
|
To upgrade Mattermost:
|
||||||
|
1. Modify the image tag in `docker-compose.yml`
|
||||||
|
2. Run `make restart-mattermost`
|
||||||
|
|
||||||
|
To downgrade Mattermost:
|
||||||
|
1. Modify the image tag in `docker-compose.yml`
|
||||||
|
2. Run `make downgrade`
|
||||||
|
|
||||||
|
## Component Access
|
||||||
|
|
||||||
|
### Mattermost
|
||||||
|
|
||||||
|
- URL: http://localhost:8065
|
||||||
|
- Default credentials available in the accounts section below
|
||||||
|
|
||||||
|
### LDAP
|
||||||
|
|
||||||
|
- Admin access: `cn=admin,dc=planetexpress,dc=com` / `GoodNewsEveryone`
|
||||||
|
- Commands for LDAP operations are in the README.md
|
||||||
|
|
||||||
|
### Grafana
|
||||||
|
|
||||||
|
- URL: http://localhost:3000
|
||||||
|
- Credentials: admin / admin
|
||||||
|
|
||||||
|
### Elasticsearch
|
||||||
|
|
||||||
|
- URL: http://localhost:9200
|
||||||
|
|
||||||
|
### mitmproxy
|
||||||
|
|
||||||
|
- URL: http://localhost:8181
|
||||||
|
|
||||||
|
## Account Information
|
||||||
|
|
||||||
|
| Username | Password | Role in Mattermost | Can use LDAP? | Can use SAML? |
|
||||||
|
|-----------|-----------|-------------------|---------------|---------------|
|
||||||
|
| admin | admin | n/a | n/a | n/a |
|
||||||
|
| professor | professor | Sys Admin | Yes | Yes |
|
||||||
|
| bender | bender | Member | Yes | Yes |
|
||||||
|
| hermes | hermes | Sys Admin | Yes | Yes |
|
||||||
|
| fry | fry | Member | Yes | Yes |
|
||||||
|
| leela | leela | Member | Yes | Yes |
|
||||||
|
| zoidberg | zoidberg | Member | Yes | Yes |
|
||||||
|
| amy | amy | Member | Yes | Yes |
|
||||||
|
|
||||||
|
## Database Information
|
||||||
|
|
||||||
|
- Primary PostgreSQL: `postgresql://mmuser:mmuser_password@localhost:5432/mattermost`
|
||||||
|
- Replica 1: `postgresql://mmuser:mmuser_password@localhost:5433/mattermost`
|
||||||
|
- Replica 2: `postgresql://mmuser:mmuser_password@localhost:5434/mattermost`
|
||||||
11
README.md
11
README.md
@@ -71,7 +71,7 @@ Additionally, the keycloak container can take up to 5 minutes to spin up. If it'
|
|||||||
- **`make run`**: Initializes the environment and creates the containers
|
- **`make run`**: Initializes the environment and creates the containers
|
||||||
- **`make run-all`**: Spins up all environment containers with the database replicas and Mattermost HA.
|
- **`make run-all`**: Spins up all environment containers with the database replicas and Mattermost HA.
|
||||||
- You must run `make run` before running the below:
|
- 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-db-replicas`**: 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 run-mm-replica`**: Launches an additional Mattermost node and enables HA.
|
||||||
- **`make run-rtcd`**: Launches the RTCD service for Mattermost Calls and updates the config to use it correctly.
|
- **`make run-rtcd`**: Launches the RTCD service for Mattermost Calls and updates the config to use it correctly.
|
||||||
- **`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.
|
||||||
@@ -79,6 +79,7 @@ Additionally, the keycloak container can take up to 5 minutes to spin up. If it'
|
|||||||
- **`make stop`**: Halts all running containers.
|
- **`make stop`**: Halts all running containers.
|
||||||
- **`make restart`**: Restarts all Docker containers in the environment.
|
- **`make restart`**: Restarts all Docker containers in the environment.
|
||||||
- **`make restart-mattermost`**: Specifically restarts only the Mattermost containers for quick testing.
|
- **`make restart-mattermost`**: Specifically restarts only the Mattermost containers for quick testing.
|
||||||
|
- **`make restart-grafana`**: Specifically restarts only the Grafana container.
|
||||||
- **`make reset`**: Cleans the volumes directory and reinitializes the environment to default settings.
|
- **`make reset`**: Cleans the volumes directory and reinitializes the environment to default settings.
|
||||||
- **`make delete-data`**: Clears all data within volumes, effectively stopping Mattermost.
|
- **`make delete-data`**: Clears all data within volumes, effectively stopping Mattermost.
|
||||||
- **`make nuke`**: Erases all configurations and data, sparing your personal data.
|
- **`make nuke`**: Erases all configurations and data, sparing your personal data.
|
||||||
@@ -90,10 +91,10 @@ Additionally, the keycloak container can take up to 5 minutes to spin up. If it'
|
|||||||
|
|
||||||
1. Modify the line in the `docker-compose.yml` file to be the version you want
|
1. Modify the line in the `docker-compose.yml` file to be the version you want
|
||||||
|
|
||||||
You're just replacing the tag at the end, this one is `7.7` for example. It must be a version of Mattermost that exists on Docker.
|
You're just replacing the tag at the end, this one is `10.7` for example. It must be a version of Mattermost that exists on Docker.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mattermost/mattermost-enterprise-edition:release-7.7
|
mattermost/mattermost-enterprise-edition:10.7
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Run `make restart-mattermost`
|
2. Run `make restart-mattermost`
|
||||||
@@ -106,10 +107,10 @@ Doing this will wipe anything you have in the database and any existing Mattermo
|
|||||||
|
|
||||||
1. Modify the line in the `docker-compose.yml` file to be the version you want
|
1. Modify the line in the `docker-compose.yml` file to be the version you want
|
||||||
|
|
||||||
You're just replacing the tag at the end, this one is `7.7` for example. It must be a version of Mattermost that exists on Docker.
|
You're just replacing the tag at the end, this one is `10.7` for example. It must be a version of Mattermost that exists on Docker.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mattermost/mattermost-enterprise-edition:release-7.7
|
mattermost/mattermost-enterprise-edition:10.7
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Run `make downgrade`
|
2. Run `make downgrade`
|
||||||
|
|||||||
Reference in New Issue
Block a user