Skip to content

Commit

Permalink
Merge pull request #389 from haiwen/opt_12.0_cluster
Browse files Browse the repository at this point in the history
Update 12.0 cluster deployments && init conf files
  • Loading branch information
freeplant authored Nov 11, 2024
2 parents 135227f + 3e5d545 commit 7c7c91d
Show file tree
Hide file tree
Showing 9 changed files with 205 additions and 251 deletions.
7 changes: 2 additions & 5 deletions manual/config/ccnet-conf.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@

Ccnet is the internal RPC framework used by Seafile server and also manages the user database. A few useful options are in ccnet.conf.

!!! note
ccnet.conf is removed in version 12.0.
!!! warning "`ccnet.conf` is removed in version 12.0"

## Options that moved to .env file

ccnet.conf is removed in version 12.0.

The following informaiton is read from `.env` file
Due to `ccnet.conf` is removed in version 12.0, the following informaiton is read from `.env` file

```
SEAFILE_MYSQL_DB_USER: The database user, the default is seafile
Expand Down
32 changes: 32 additions & 0 deletions manual/config/env.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,18 @@ SEAFILE_SERVER_PROTOCOL=https

[email protected]
INIT_SEAFILE_ADMIN_PASSWORD=asecret
INIT_S3_STORAGE_BACKEND_CONFIG=false # pro edition only
INIT_S3_COMMIT_BUCKET=<your-commit-objects> # pro edition only
INIT_S3_FS_BUCKET=<your-fs-objects> # pro edition only
INIT_S3_BLOCK_BUCKET=<your-block-objects> # pro edition only
INIT_S3_KEY_ID=<your-key-id> # pro edition only
INIT_S3_SECRET_KEY=<your-secret-key> # pro edition only

CLUSTER_INIT_MODE=true # cluster only
CLUSTER_INIT_MEMCACHED_HOST=<your memcached host> # cluster only
CLUSTER_INIT_ES_HOST=<your elasticsearch server HOST> # cluster only
CLUSTER_INIT_ES_PORT=<your elasticsearch server port> # cluster only
CLUSTER_MODE=frontend # cluster only


SEADOC_IMAGE=seafileltd/sdoc-server:1.0-latest
Expand Down Expand Up @@ -92,3 +104,23 @@ SEADOC_SERVER_URL=http://example.seafile.com/sdoc-server

- `ENABLE_SEADOC`: Enable the SeaDoc server or not, default is `false`.
- `SEADOC_SERVER_URL`: Only valid in `ENABLE_SEADOC=true`. Url of Seadoc server (e.g., http://example.seafile.com/sdoc-server).

## Cluster init configuration

- `CLUSTER_INIT_MODE`: (only valid in pro edition at deploying first time). Cluster initialization mode, in which the necessary configuration files for the service to run will be generated (but **the service will not be started**). If the configuration file already exists, no operation will be performed. The default value is `true`. When the configuration file is generated, ***be sure to set this item to `false`***.
- `CLUSTER_INIT_MEMCACHED_HOST`: (only valid in pro edition at deploying first time). Cluster Memcached host. (If your Memcached server dose not use port `11211`, please modify the [seahub_settings.py](./seahub_settings_py.md) and [seafile.conf](./seafile-conf.md)).
- `CLUSTER_INIT_ES_HOST`: (only valid in pro edition at deploying first time). Your cluster Elasticsearch server host.
- `CLUSTER_INIT_ES_PORT`: (only valid in pro edition at deploying first time). Your cluster Elasticsearch server port.
- `CLUSTER_MODE`: Seafile service node type, i.e., `frontend` (default) or `backend`

## S3 storage backend configurations (only valid in pro edition at deploying first time)

- `INIT_S3_STORAGE_BACKEND_CONFIG`: Whether to configure S3 storage backend synchronously during initialization (i.e., the following features in this section, for more details, please refer to [AWS S3](../setup/setup_with_amazon_s3.md#aws-s3)), default is `false`.
- `INIT_S3_COMMIT_BUCKET`: S3 storage backend fs objects bucket
- `INIT_S3_FS_BUCKET`: S3 storage backend block objects bucket
- `INIT_S3_BLOCK_BUCKET`: S3 storage backend block objects bucket
- `INIT_S3_KEY_ID`: S3 storage backend key ID
- `INIT_S3_SECRET_KEY`: S3 storage backend secret key
- `INIT_S3_USE_V4_SIGNATURE`: Use the v4 protocol of S3 if enabled, default is `true`
- `INIT_S3_AWS_REGION`: Region you create the buckets, default is `us-east-1`. (Only valid when `INIT_S3_USE_V4_SIGNATURE` sets to `true`)
- `INIT_S3_USE_HTTPS`: Use HTTPS connections to S3 if enabled, default is `true`
34 changes: 34 additions & 0 deletions manual/docker/cluster/env
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
COMPOSE_FILE='seafile-server.yml'
COMPOSE_PATH_SEPARATOR=','
SEAFILE_IMAGE=docker.seadrive.org/seafileltd/seafile-pro-mc:12.0-latest
SEAFILE_VOLUME=/opt/seafile/shared
SEAFILE_SERVER_HOSTNAME=seafile.example.com
SEAFILE_SERVER_PROTOCOL=http

# mysql
SEAFILE_MYSQL_DB_HOST=<your MySQL host>
INIT_SEAFILE_MYSQL_ROOT_PASSWORD=<your MySQL root password>
SEAFILE_MYSQL_DB_USER=seafile
SEAFILE_MYSQL_DB_PASSWORD=<MySQL password for user seafile>

# Cluster
CLUSTER_INIT_MODE=true # if you have the configurations file, please set to false
CLUSTER_INIT_MEMCACHED_HOST=<your memcached host> # only valid in config init
CLUSTER_INIT_ES_HOST=<your elasticsearch server HOST> # only valid in config init
CLUSTER_INIT_ES_PORT=<your elasticsearch server port> # only valid in config init

CLUSTER_MODE=frontend # backend for backend node

# Time zone
TIME_ZONE=UTC

# S3 storage backend (the below configurations are only valid in configuration - files initial mode)
INIT_S3_STORAGE_BACKEND_CONFIG=false # if you use S3 as backend storage, please set to true
INIT_S3_COMMIT_BUCKET=<your-commit-objects>
INIT_S3_FS_BUCKET=<your-fs-objects>
INIT_S3_BLOCK_BUCKET=<your-block-objects>
INIT_S3_KEY_ID=<your-key-id>
INIT_S3_SECRET_KEY=<your-secret-key>
INIT_S3_USE_V4_SIGNATURE=true
INIT_S3_AWS_REGION=us-east-1
INIT_S3_USE_HTTPS=true
30 changes: 30 additions & 0 deletions manual/docker/cluster/seafile-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
services:
seafile:
image: ${SEAFILE_IMAGE:-docker.seadrive.org/seafileltd/seafile-pro-mc:12.0-latest}
container_name: seafile
ports:
- 80:80
volumes:
- ${SEAFILE_VOLUME:-/opt/seafile/shared}:/shared
environment:
- DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db}
- DB_PORT=${SEAFILE_MYSQL_DB_PORT:-3306}
- DB_ROOT_PASSWD=${INIT_SEAFILE_MYSQL_ROOT_PASSWORD:?Variable is not set or empty}
- DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty}
- CLUSTER_SERVER=true
- CLUSTER_INIT_MODE=${CLUSTER_INIT_MODE:-false}
- CLUSTER_INIT_MEMCACHED_HOST=${CLUSTER_MEMCACHED_HOST}
- CLUSTER_INIT_ES_HOST=${CLUSTER_ES_HOST}
- CLUSTER_INIT_ES_PORT=${CLUSTER_INIT_ES_PORT}
- CLUSTER_MODE=${CLUSTER_MODE:-frontend}
- TIME_ZONE=${TIME_ZONE:-UTC}
- INIT_S3_STORAGE_BACKEND_CONFIG=${INIT_S3_STORAGE_BACKEND_CONFIG:-false}
- INIT_S3_COMMIT_BUCKET=${INIT_S3_COMMIT_BUCKET}
- INIT_S3_FS_BUCKET=${INIT_S3_FS_BUCKET}
- INIT_S3_BLOCK_BUCKET=${INIT_S3_BLOCK_BUCKET}
- INIT_S3_KEY_ID=${INIT_S3_KEY_ID}
- INIT_S3_SECRET_KEY=${INIT_S3_SECRET_KEY}
- INIT_S3_USE_V4_SIGNATURE=${INIT_S3_USE_V4_SIGNATURE:-true}
- INIT_S3_AWS_REGION=${INIT_S3_AWS_REGION:-us-east-1}
- INIT_S3_USE_HTTPS=${INIT_S3_USE_HTTPS:-true}

9 changes: 9 additions & 0 deletions manual/docker/pro/env
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ SEAFILE_SERVER_PROTOCOL=http

[email protected]
INIT_SEAFILE_ADMIN_PASSWORD=asecret
INIT_S3_STORAGE_BACKEND_CONFIG=false
INIT_S3_COMMIT_BUCKET=<your-commit-objects>
INIT_S3_FS_BUCKET=<your-fs-objects>
INIT_S3_BLOCK_BUCKET=<your-block-objects>
INIT_S3_KEY_ID=<your-key-id>
INIT_S3_SECRET_KEY=<your-secret-key>
INIT_S3_USE_V4_SIGNATURE=true
INIT_S3_AWS_REGION=us-east-1
INIT_S3_USE_HTTPS=true


SEADOC_IMAGE=seafileltd/sdoc-server:1.0-latest
Expand Down
9 changes: 9 additions & 0 deletions manual/docker/pro/seafile-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ services:
- JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
- ENABLE_SEADOC=${ENABLE_SEADOC:-false}
- SEADOC_SERVER_URL=${SEADOC_SERVER_URL:-http://example.example.com/sdoc-server}
- INIT_S3_STORAGE_BACKEND_CONFIG=${INIT_S3_STORAGE_BACKEND_CONFIG:-false}
- INIT_S3_COMMIT_BUCKET=${INIT_S3_COMMIT_BUCKET}
- INIT_S3_FS_BUCKET=${INIT_S3_FS_BUCKET}
- INIT_S3_BLOCK_BUCKET=${INIT_S3_BLOCK_BUCKET}
- INIT_S3_KEY_ID=${INIT_S3_KEY_ID}
- INIT_S3_SECRET_KEY=${INIT_S3_SECRET_KEY}
- INIT_S3_USE_V4_SIGNATURE=${INIT_S3_USE_V4_SIGNATURE:-true}
- INIT_S3_AWS_REGION=${INIT_S3_AWS_REGION:-us-east-1}
- INIT_S3_USE_HTTPS=${INIT_S3_USE_HTTPS:-true}
labels:
caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
caddy.reverse_proxy: "{{upstreams 80}}"
Expand Down
Loading

0 comments on commit 7c7c91d

Please sign in to comment.