Updated Production Setup (markdown)

Chris Lu 2020-04-06 23:21:37 -07:00
parent 22c7c2c1aa
commit 6deaf8425a

@ -1,6 +1,6 @@
The simple setup could be deceptive. Going to production needs more complicated setup.
There are multiple components. Please follow the steps to setup them one by one.
There are multiple layers of components. Please follow the steps to set them up from bottom up, one by one.
* Setup object storage
* Setup Masters
@ -16,7 +16,17 @@ And then, choose the component you want to setup
For dev ops, metrics is also needed:
* Setup metrics
#### For single node setup
## Prerequisite
Make sure the ports are open. By default
| server | http port | gRPC port |
| -------- | ------ | ------ |
| Master | 9333 | 19333 |
| Volume | 8080 | 18080 |
| Filer | 8888 | 18888 |
| S3 | 8333 | |
### For single node setup
You can just use `weed server -filer -s3 -ip=xx.xx.xx.xx`, to have one master, one volume server, one filer, and one S3 API server running.
It is better to have several volumes running on one machine, so that if one volume is compacting, the other volumes can still serve read and write requests. The default volume size is 30GB. So if your server does not have multiple 30GB empty spaces, you need to reduce the volume size.
@ -33,7 +43,7 @@ weed server -filer -s3 -ip=xx.xx.xx.xx -volume.max=0 -master.volumeSizeLimitMB=1
If there are 2 machines, it is not possible to achieve consensus. Just do not bother to setup multiple masters.
Even for small clusters, it is totally fine to have one single master. The load on master is very light. It is unlikely to go down. You can always just restart it
Even for small clusters, it is totally fine to have one single master. The load on master is very light. It is unlikely to go down. You can always just restart it since it only has soft states collected from volume servers.
### Setup masters
@ -48,7 +58,7 @@ weed master -mdir=/data/seaweedfs/master -peers=ip1:9333,ip2:9333,ip3:9333
```
Additional notes:
* Depending on the disk space of each volume server, the master may need to set smaller volume size, e.g., add `-volumeSizeLimitMB=1024`.
* Depending on the available disk space on each volume server, the master may need to reduce maximum volume size, e.g., add `-volumeSizeLimitMB=1024`. This will ensure each volume has several volumes.
* Since it is for production, you may also want to add `-metrics.address=<Prometheus gateway address>`. See [[System Metrics]].
### Add volume servers
@ -81,7 +91,9 @@ Additional notes:
* After adding volume servers, there will not be data rebalancing. Data are written to them after new volumes are created on them. You can use `weed shell` and run `volume.balance -force` to manually balance them.
## Check the object store setup
Now the object store setup is completed. You can visit "http://<master>:9333/" to check it around. You can also assign some file ids to trigger allocating the volumes.
Now the object store setup is completed. You can visit `http://<master>:9333/` to check it around.
* Make sure the Free volume count is not zero.
* Try to assign some file ids to trigger a volume allocation.
If you only use SeaweedFS object store, that is all.
@ -134,3 +146,4 @@ Run
* `-chunkCacheCountLimit` means how many entries cached in memory, default to 1000. With default `-chunkSizeLimitMB` set to 4, it may take up to 4x1000 MB memory. If all files are bigger than 4MB.
* `-replication` is the replication level for each file. It overwrites replication settings on both filer and master.
* `-outsideContainerClusterMode` is used if running master, volume server, and filer inside a cluster, and the volume server IP addresses are not visible to FUSE clients. If so, the volume servers need to run on different ports and the ports need to be proxied through the filer IP address.