mirror of
https://github.com/haiwen/seafile-admin-docs.git
synced 2025-12-26 02:32:50 +00:00
update 13.0 cluster deployment (#558)
* update 13.0 cluster deployment * add REDIS_PASSWORD literal in helm secretmap
This commit is contained in:
parent
1e8ed39bfd
commit
bb3f4abb1e
|
|
@ -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=<your memcached host>
|
||||
MEMCACHED_PORT=11211
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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: "<your redis host>"
|
||||
REDIS_PORT: "6379"
|
||||
|
||||
## for memcached
|
||||
MEMCACHED_HOST: "<your Memcached server host>"
|
||||
MEMCACHED_PORT: "11211"
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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: ""
|
||||
|
|
|
|||
|
|
@ -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`
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ After installation, you need to start the k8s control plane service on each node
|
|||
--from-literal=SEAFILE_MYSQL_DB_PASSWORD='<required>' \
|
||||
--from-literal=INIT_SEAFILE_ADMIN_PASSWORD='<required>' \
|
||||
--from-literal=INIT_SEAFILE_MYSQL_ROOT_PASSWORD='<required>' \
|
||||
--from-literal=REDIS_PASSWORD='' \
|
||||
--from-literal=S3_SECRET_KEY='' \
|
||||
--from-literal=S3_SSE_C_KEY=''
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
status: new
|
||||
---
|
||||
|
||||
# Upgrade a Seafile cluster
|
||||
|
||||
## Major and minor version upgrade
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
status: new
|
||||
---
|
||||
|
||||
# Upgrade a Seafile cluster (binary)
|
||||
|
||||
## Major and minor version upgrade
|
||||
|
|
|
|||
Loading…
Reference in New Issue