You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: manual/setup/cluster_deploy_with_docker.md
+91-14
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,16 @@ Seafile Docker cluster deployment requires "sticky session" settings in the load
4
4
5
5
## Environment
6
6
7
+
!!! note "Prerequisites"
8
+
9
+
- We assume you have already deployed ***memcache***, ***MariaDB***, ***ElasticSearch*** in separate machines and use ***S3*** like object storage.
10
+
11
+
- Usually, each node of Seafile Cluster should have at least **2 cores** and **2G memory**. If the above services are deployed together with a node in the Seafile cluster, we recommend that you prepare **4 cores** and **4G memory** for the node (especially if ElasticSearch is also deployed on the node)
12
+
7
13
System: Ubuntu 24.04
8
14
9
15
Seafile Server: 2 frontend nodes, 1 backend node
10
16
11
-
We assume you have already deployed memcache, MariaDB, ElasticSearch in separate machines and use S3 like object storage.
12
-
13
17
## Deploy Seafile service
14
18
15
19
### Deploy the first Seafile frontend node
@@ -22,13 +26,13 @@ We assume you have already deployed memcache, MariaDB, ElasticSearch in separate
22
26
23
27
2. Pulling Seafile image
24
28
29
+
!!! tip
30
+
Since v12.0, Seafile PE versions are hosted on DockerHub and does not require username and password to download.
31
+
25
32
```bash
26
33
docker pull seafileltd/seafile-pro-mc:12.0-latest
27
34
```
28
35
29
-
!!! note
30
-
Since v12.0, Seafile PE versions are hosted on DockerHub and does not require username and password to download.
31
-
32
36
3. Download the `seafile-server.yml` and `.env`
33
37
34
38
```sh
@@ -45,8 +49,7 @@ We assume you have already deployed memcache, MariaDB, ElasticSearch in separate
45
49
5. Start the Seafile docker
46
50
47
51
```sh
48
-
$ cd /opt/seafile
49
-
$ docker compose up -d
52
+
docker compose up -d
50
53
```
51
54
52
55
!!! success "Cluster init mode"
@@ -155,12 +158,22 @@ We assume you have already deployed memcache, MariaDB, ElasticSearch in separate
155
158
156
159
### Deploy the others Seafile frontend nodes
157
160
158
-
You can directly copy all the directories generated by the first frontend node, including the Docker-compose files (e.g., `seafile-server.yml`, `.env`) and modified configuration files, and then start the seafile docker container:
161
+
1. Create the mount directory
159
162
160
-
```sh
161
-
docker compose down
162
-
docker compose up -d
163
-
```
163
+
```
164
+
$ mkdir -p /opt/seafile/shared
165
+
166
+
```
167
+
168
+
2. Pull Seafile image
169
+
170
+
3. Copy `seafile-server.yml`, `.env `and configuration files from the first frontend node
171
+
172
+
4. Start the service
173
+
174
+
```sh
175
+
docker compose up -d
176
+
```
164
177
165
178
### Deploy seafile backend node
166
179
@@ -171,7 +184,7 @@ docker compose up -d
171
184
172
185
```
173
186
174
-
2. Pulling Seafile image
187
+
2. Pull Seafile image
175
188
176
189
3. Copy `seafile-server.yml`, `.env` and configuration files from frontend node
177
190
@@ -217,7 +230,67 @@ docker compose up -d
217
230
218
231
## Deploy load balance (Optional)
219
232
220
-
### Install HAproxy and Keepalived services
233
+
Generally speaking, in order to better access the Seafile service, we recommend that you use a load balancing service to access the Seafile cluster and bind your domain name (such as `seafile.cluster.com`) to the load balancing service. Usually, you can use:
234
+
235
+
- Cloud service provider's load balancing service
236
+
- Deploy your own load balancing service, our document will give two of common load balance services:
237
+
238
+
- Nginx
239
+
- HAproxy
240
+
241
+
### Nginx
242
+
243
+
1. Install Nginx in the host if you would like to deploy load balance service
244
+
245
+
```sh
246
+
sudo apt update
247
+
sudo apt install nginx
248
+
```
249
+
250
+
2. Create the configurations file for Seafile cluster
You can engaged HTTPS in your load balance service, as you can use certificates manager (e.g., [Certbot](https://certbot.eff.org)) to acquire and enable HTTPS to your Seafile cluster. You have to modify the relative URLs from the prefix `http://` to `https://` in `seahub_settings.py` and `.env`, after enabling HTTPS.
420
+
344
421
## (Optional) Deploy SeaDoc server
345
422
346
423
You can follow [here](../extension/setup_seadoc.md) to deploy SeaDoc server. And then modify `SEADOC_SERVER_URL` in your `.env` file
Copy file name to clipboardexpand all lines: manual/upgrade/upgrade_a_cluster_docker.md
+122-10
Original file line number
Diff line number
Diff line change
@@ -16,24 +16,136 @@ Seafile adds new features in major and minor versions. It is likely that some da
16
16
In general, to upgrade a cluster, you need:
17
17
18
18
1. Download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version. Start with docker compose up.
19
-
2. Run the upgrade script in container (for example, /opt/seafile/seafile-server-latest/upgrade/upgrade_10_0_11_0.sh) in one frontend node
19
+
2. Run the upgrade script in container (for example, `/opt/seafile/seafile-server-latest/upgrade/upgrade_x_x_x_x.sh`) in one frontend node
20
20
3. Update configuration files at each node according to the documentation for each version
21
21
4. Delete old search index in the backend node if needed
22
22
23
-
## Maintanence upgrade
23
+
## Upgrade a cluster from Seafile 11 to 12
24
24
25
-
Maintanence upgrade only needs to download the new image, stop the old docker container, modify the Seafile image version in docker-compose.yml to the new version. Start with docker compose up.
25
+
1. Stop the seafile service in all nodes
26
26
27
-
## Upgrade from 10.0 to 11.0
27
+
```sh
28
+
docker compose down
29
+
```
28
30
29
-
Migrate your configuration for LDAP and OAuth according to [here](upgrade_notes_for_11.0.x.md)
31
+
2. Download the docker-compose files for*Seafile 12*
If you are using with ElasticSearch, SAML SSO and storage backend features, follow the upgrading manual on how to update the configuration for [these features](upgrade_notes_for_10.0.x.md).
38
+
3. Modify `.env`:
34
39
35
-
If you want to use the new notification server and rate control (pro edition only), please refer to the [upgrading manual](upgrade_notes_for_10.0.x.md).
40
+
- Generate a JWT key
36
41
37
-
## Upgrade from 8.0 to 9.0
42
+
```sh
43
+
pwgen -s 40 1
38
44
39
-
If you are using with ElasticSearch, follow the upgrading manual on how to [update the configuration](upgrade_notes_for_9.0.x.md).
45
+
# e.g., EkosWcXonPCrpPE9CFsnyQLLPqoPhSJZaqA3JMFw
46
+
```
47
+
48
+
- Fill up the following field according to your configurations using in*Seafile 11*:
49
+
50
+
```sh
51
+
SEAFILE_SERVER_HOSTNAME=<your loadbalance's host>
52
+
SEAFILE_SERVER_PROTOCOL=https # or http
53
+
SEAFILE_MYSQL_DB_HOST=<your mysql host>
54
+
SEAFILE_MYSQL_DB_USER=seafile # if you don't use `seafile` as your Seafile server's account, please correct it
55
+
SEAFILE_MYSQL_DB_PASSWORD=<your mysql password for user `seafile`>
56
+
JWT_PRIVATE_KEY=<your JWT key generated in Sec. 3.1>
57
+
```
58
+
59
+
!!! tip "Remove the variables using in Cluster initialization"
60
+
Since Seafile has been initialized in Seafile 11, the variables related to Seafile cluster initialization can be removed from `.env`:
61
+
62
+
- INIT_SEAFILE_MYSQL_ROOT_PASSWORD
63
+
- CLUSTER_INIT_MODE
64
+
- CLUSTER_INIT_MEMCACHED_HOST
65
+
- CLUSTER_INIT_ES_HOST
66
+
- CLUSTER_INIT_ES_PORT
67
+
- INIT_S3_STORAGE_BACKEND_CONFIG
68
+
- INIT_S3_COMMIT_BUCKET
69
+
- INIT_S3_FS_BUCKET
70
+
- INIT_S3_BLOCK_BUCKET
71
+
- INIT_S3_KEY_ID
72
+
- INIT_S3_USE_V4_SIGNATURE
73
+
- INIT_S3_SECRET_KEY
74
+
- INIT_S3_AWS_REGION
75
+
- INIT_S3_HOST
76
+
- INIT_S3_USE_HTTPS
77
+
78
+
4. Start the Seafile in a node
79
+
80
+
!!! note
81
+
According to this upgrade document, a **frontend** service will be started here. If you plan to use this node as a backend node, you need to modify this item in `.env` and set it to `backend`:
82
+
83
+
```sh
84
+
CLUSTER_MODE=backend
85
+
```
86
+
87
+
```sh
88
+
docker compose up -d
89
+
```
90
+
91
+
5. Upgrade Seafile
92
+
93
+
```sh
94
+
docker exec -it seafile bash
95
+
# enter the container `seafile`
96
+
97
+
# stop servers
98
+
cd /opt/seafile/seafile-server-latest
99
+
./seafile.sh stop
100
+
./seahub.sh stop
101
+
102
+
# upgrade seafile
103
+
cd upgrade
104
+
./upgrade_11.0_12.0.sh
105
+
```
106
+
107
+
!!! success
108
+
After upgrading the Seafile, you can see the following messages in your console:
109
+
110
+
```
111
+
Updating seafile/seahub database ...
112
+
113
+
[INFO] You are using MySQL
114
+
[INFO] updating seafile database...
115
+
[INFO] updating seahub database...
116
+
[INFO] updating seafevents database...
117
+
Done
118
+
119
+
migrating avatars ...
120
+
121
+
Done
122
+
123
+
updating /opt/seafile/seafile-server-latest symbolic link to /opt/seafile/seafile-pro-server-12.0.6 ...
0 commit comments