diff --git a/manual/repo/docker/cluster/env b/manual/repo/docker/cluster/env index d10cb1da..2374fe19 100644 --- a/manual/repo/docker/cluster/env +++ b/manual/repo/docker/cluster/env @@ -27,6 +27,11 @@ SEAFILE_MYSQL_DB_CCNET_DB_NAME=ccnet_db SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=seafile_db SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=seahub_db +### Redis +REDIS_HOST=redis +REDIS_PORT=6379 +REDIS_PASSWORD= + ## Memcached MEMCACHED_HOST= MEMCACHED_PORT=11211 diff --git a/manual/repo/docker/cluster/seafile-server.yml b/manual/repo/docker/cluster/seafile-server.yml index e506555a..af238345 100644 --- a/manual/repo/docker/cluster/seafile-server.yml +++ b/manual/repo/docker/cluster/seafile-server.yml @@ -16,7 +16,10 @@ services: - SEAFILE_MYSQL_DB_CCNET_DB_NAME=${SEAFILE_MYSQL_DB_CCNET_DB_NAME:-ccnet_db} - SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=${SEAFILE_MYSQL_DB_SEAFILE_DB_NAME:-seafile_db} - SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=${SEAFILE_MYSQL_DB_SEAHUB_DB_NAME:-seahub_db} - - CACHE_PROVIDER=memcached + - CACHE_PROVIDER=redis + - REDIS_HOST=${REDIS_HOST:-redis} + - REDIS_PORT=${REDIS_PORT:-6379} + - REDIS_PASSWORD=${REDIS_PASSWORD:-} - MEMCACHED_HOST=${MEMCACHED_HOST:-memcached} - MEMCACHED_PORT=${MEMCACHED_PORT:-11211} - CLUSTER_SERVER=true diff --git a/manual/repo/k8s/cluster/seafile-backend-deployment.yaml b/manual/repo/k8s/cluster/seafile-backend-deployment.yaml index 23d2cbd1..ea2332bb 100644 --- a/manual/repo/k8s/cluster/seafile-backend-deployment.yaml +++ b/manual/repo/k8s/cluster/seafile-backend-deployment.yaml @@ -93,7 +93,20 @@ spec: name: seafile-env key: SEAFILE_MYSQL_DB_SEAHUB_DB_NAME - name: CACHE_PROVIDER - value: "memcached" + valueFrom: + configMapKeyRef: + name: seafile-env + key: CACHE_PROVIDER + - name: REDIS_HOST + valueFrom: + configMapKeyRef: + name: seafile-env + key: REDIS_HOST + - name: REDIS_PORT + valueFrom: + configMapKeyRef: + name: seafile-env + key: REDIS_PORT - name: MEMCACHED_HOST valueFrom: configMapKeyRef: @@ -169,16 +182,6 @@ spec: configMapKeyRef: name: seafile-env key: S3_PATH_STYLE_REQUEST - - name: INNER_NOTIFICATION_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: NOTIFICATION_SERVER_URL - - name: NOTIFICATION_SERVER_URL - valueFrom: - configMapKeyRef: - name: seafile-env - key: NOTIFICATION_SERVER_URL - name: ENABLE_SEAFILE_AI valueFrom: configMapKeyRef: @@ -224,6 +227,11 @@ spec: secretKeyRef: name: seafile-secret key: S3_SSE_C_KEY + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: seafile-secret + key: REDIS_PASSWORD - name: SEAFILE_AI_SECRET_KEY valueFrom: secretKeyRef: diff --git a/manual/repo/k8s/cluster/seafile-env.yaml b/manual/repo/k8s/cluster/seafile-env.yaml index 582ccd32..decc9925 100644 --- a/manual/repo/k8s/cluster/seafile-env.yaml +++ b/manual/repo/k8s/cluster/seafile-env.yaml @@ -18,7 +18,14 @@ data: SEAFILE_MYSQL_DB_SEAFILE_DB_NAME: "seafile_db" SEAFILE_MYSQL_DB_SEAHUB_DB_NAME: "seahub_db" - # for memcached + # for cached + CACHE_PROVIDER: "redis" # or "memcached" + + ## for redis + REDIS_HOST: "" + REDIS_PORT: "6379" + + ## for memcached MEMCACHED_HOST: "" MEMCACHED_PORT: "11211" diff --git a/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml b/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml index b405fc16..06a73202 100644 --- a/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml +++ b/manual/repo/k8s/cluster/seafile-frontend-deployment.yaml @@ -93,7 +93,20 @@ spec: name: seafile-env key: SEAFILE_MYSQL_DB_SEAHUB_DB_NAME - name: CACHE_PROVIDER - value: "memcached" + valueFrom: + configMapKeyRef: + name: seafile-env + key: CACHE_PROVIDER + - name: REDIS_HOST + valueFrom: + configMapKeyRef: + name: seafile-env + key: REDIS_HOST + - name: REDIS_PORT + valueFrom: + configMapKeyRef: + name: seafile-env + key: REDIS_PORT - name: MEMCACHED_HOST valueFrom: configMapKeyRef: @@ -194,6 +207,11 @@ spec: secretKeyRef: name: seafile-secret key: S3_SSE_C_KEY + - name: REDIS_PASSWORD + valueFrom: + secretKeyRef: + name: seafile-secret + key: REDIS_PASSWORD - name: SEAFILE_AI_SECRET_KEY valueFrom: secretKeyRef: diff --git a/manual/repo/k8s/cluster/seafile-secret.yaml b/manual/repo/k8s/cluster/seafile-secret.yaml index c8079b40..56e8fb2d 100644 --- a/manual/repo/k8s/cluster/seafile-secret.yaml +++ b/manual/repo/k8s/cluster/seafile-secret.yaml @@ -20,3 +20,6 @@ data: # For S3 storage backend (only valid in USE_S3_STORAGE = true) S3_SECRET_KEY: "" S3_SSE_C_KEY: "" + + # for redis + REDIS_PASSWORD: "" diff --git a/manual/setup/cluster_deploy_with_docker.md b/manual/setup/cluster_deploy_with_docker.md index 9be7ed4e..c91bb2ee 100644 --- a/manual/setup/cluster_deploy_with_docker.md +++ b/manual/setup/cluster_deploy_with_docker.md @@ -14,7 +14,7 @@ This architecture scales horizontally. That means, you can handle more traffic b There are two main components on the Seafile server node: web server (Nginx/Apache) and Seafile app server. The web server passes requests from the clients to Seafile app server. The Seafile app servers work independently. They don't know about each other's state. That means each app server can fail independently without affecting other app server instances. The load balancer is responsible for detecting failure and re-routing requests. -Even though Seafile app servers work independently, they still have to share some session information. All shared session information is stored in memory cache. Thus, all Seafile app servers have to connect to the same memory cache server (cluster). Since Pro Edition 11.0, both memcached and Redis can be used as memory cache. Before 11.0, only memcached is supported. More details about memory cache configuration is available later. +Even though Seafile app servers work independently, they still have to share some session information. All shared session information is stored in memory cache. Thus, all Seafile app servers have to connect to the same memory cache server (cluster). Since Pro Edition 11.0, both memcached and Redis can be used as memory cache. Before 11.0, only memcached is supported. More details about memory cache configuration is available later. Since Seafile 13.0, we recommend that you use Redis as a cache to adapt to new features (such as Seafile AI, Metadata management, etc.). The background server is the workhorse for various background tasks, including full-text indexing, office file preview, virus scanning, LDAP syncing. It should usually be run on a dedicated server for better performance. Currently only one background task server can be running in the entire cluster. If more than one background servers are running, they may conflict with each others when doing some tasks. If you need HA for background task server, you can consider using [Keepalived](http://www.keepalived.org/) to build a hot backup for it. @@ -64,11 +64,6 @@ Please refer [here](./system_requirements.md#seafile-cluster) for the details ab 4. Modify the [variables](../config/env.md) in `.env` (especially the terms like `<...>`). - !!! tip - - If you have already deployed S3 storage backend and plan to apply it to Seafile cluster, you can modify the variables in `.env` to [set them synchronously during initialization](../config/env.md#s3-storage-backend-configurations-only-valid-in-pro-edition-at-deploying-first-time). - - - Although the current Seafile cluster only supports *Memcached* as the cache, it also supports setting configurations through '. env'. **Therefore, you do not need to pay attention to the selection of `CACHE_PROVIDER`**, so you only need to correctly set `MEMCACHED_HOST` and `MEMCACHED_PORT` in `.env`. - 5. Pleace license file If you have a `seafile-license.txt` license file, simply put it in the volume of the Seafile container. The volumne's default path in the Compose file is `/opt/seafile/shared`. If you have modified the path, save the license file under your custom path. @@ -121,12 +116,6 @@ Please refer [here](./system_requirements.md#seafile-cluster) for the details ab ``` -7. In initialization mode, the service will not be started. During this time you can check the generated configuration files (e.g., MySQL, Memcached, Elasticsearch) in configuration files: - - - [seafevents.conf](../config/seafevents-conf.md) - - [seafile.conf](../config/seafile-conf.md) - - [seahub_settings.py](../config/seahub_settings_py.md) - 8. After initailizing the cluster, the following fields can be removed in `.env` - `CLUSTER_INIT_MODE`, must be removed from .env file - `CLUSTER_INIT_ES_HOST` diff --git a/manual/setup/helm_chart_cluster.md b/manual/setup/helm_chart_cluster.md index e273583b..7995d90a 100644 --- a/manual/setup/helm_chart_cluster.md +++ b/manual/setup/helm_chart_cluster.md @@ -36,6 +36,7 @@ After installation, you need to start the k8s control plane service on each node --from-literal=SEAFILE_MYSQL_DB_PASSWORD='' \ --from-literal=INIT_SEAFILE_ADMIN_PASSWORD='' \ --from-literal=INIT_SEAFILE_MYSQL_ROOT_PASSWORD='' \ + --from-literal=REDIS_PASSWORD='' \ --from-literal=S3_SECRET_KEY='' \ --from-literal=S3_SSE_C_KEY='' ``` diff --git a/manual/setup/system_requirements.md b/manual/setup/system_requirements.md index e9be2e78..002af096 100644 --- a/manual/setup/system_requirements.md +++ b/manual/setup/system_requirements.md @@ -91,6 +91,6 @@ This page shows the minimal requirements of Seafile. - **Docker-base deployment integration services**: *Seafile* only !!! note "More suggestions in Seafile cluster" - - We assume you have already deployed ***Memcached*** (*redis* is not supported in cluster), ***MariaDB***, file indexer (e.g., ***ElasticSearch***) in separate machines and use ***S3*** like object storage. + - We assume you have already deployed ***Redis*** (Memcached alternatively, but still recommend Redis), ***MariaDB***, file indexer (e.g., ***ElasticSearch***) in separate machines and use ***S3*** like object storage. - Generally, when deploying Seafile in a cluster, we recommend that you use a **storage backend** (such as AWS S3) to store Seafile data. However, according to the Seafile image startup rules and K8S persistent storage strategy, you still need to **prepare a persistent directory** for configuring the startup of the Seafile container. \ No newline at end of file diff --git a/manual/upgrade/upgrade_a_cluster.md b/manual/upgrade/upgrade_a_cluster.md index fbe3cc1d..ced8bc03 100644 --- a/manual/upgrade/upgrade_a_cluster.md +++ b/manual/upgrade/upgrade_a_cluster.md @@ -1,3 +1,7 @@ +--- +status: new +--- + # Upgrade a Seafile cluster ## Major and minor version upgrade diff --git a/manual/upgrade/upgrade_a_cluster_binary.md b/manual/upgrade/upgrade_a_cluster_binary.md index 08f8969e..fa015196 100644 --- a/manual/upgrade/upgrade_a_cluster_binary.md +++ b/manual/upgrade/upgrade_a_cluster_binary.md @@ -1,3 +1,7 @@ +--- +status: new +--- + # Upgrade a Seafile cluster (binary) ## Major and minor version upgrade