@@ -23,13 +23,11 @@ Building from a source is also easy.
2323git clone https://github.com/sadoyan/go-webrados.git
2424cd go-webrados
2525export GOROOT=/path/to/your/go
26- ./build.sh
27-
28- ./webrados /path/to/config.ini
26+ go mod tidy
27+ do build .
2928```
3029
3130
32-
3331### ** Configuration**
3432---------
3533
@@ -42,7 +40,6 @@ listen : 0.0.0.0:8080
4240dispatchers : 20
4341serveruser : admin
4442serverpass : 261a5983599fd57a016122ec85599ec4
45- uploadmaxpart : 52428800
4643dangerzone : yes
4744readonly : no
4845authread : no
@@ -52,33 +49,35 @@ logfile : no
5249logpath: /opt/webrados.log
5350allpools: no
5451poollist: bublics, donuts, images
55- database : redis
5652
57- [redis]
53+ [cache]
54+ shards: 1024
55+ lifewindow: 10
56+ cleanwindow: 1
57+ maxrntriesinwindow: 600000
58+ maxentrysize: 5000
59+ maxcachemb: 1024
60+
61+ [database]
62+ type : ceph
5863server: 127.0.0.1:6379
5964username : none
6065password : none
6166database : 0
6267
63- [mysql]
64- username : ceph
65- password : ceph
66- dbname : ceph
67- server : 127.0.0.1:3306
68-
6968[monitoring]
7069enabled : true
7170url: 127.0.0.1:9090
7271user: admin
7372pass: admin
7473```
74+
7575### ** API**
7676---------
7777
7878| ** Name** | ** Description** |
7979| ------------- | ------------- |
8080| ** Read File** | HTTP ``` GET: ``` http://{BINDADDRESS}/{POOLNAME}/{FILENAME}|
81- | ** Read File** | HTTP ``` GET: ``` http://{BINDADDRESS}/{POOLNAME}/{FILENAME}|
8281| ** Upload File** | HTTP ``` POST, PUT: ``` http://{BINDADDRESS}/{POOLNAME}/{FILENAME}|
8382| ** Remove File** | HTTP ``` DELETE: ``` http://{BINDADDRESS}/{POOLNAME}/{FILENAME}|
8483
@@ -87,23 +86,36 @@ Configuration file is pretty simple and intuitive.
8786### ** Section main**
8887---------
8988
90- | ** Name** | ** Description** |
91- | ------------- | ------------- |
92- | ** listen** | IP port to bind.|
93- | ** dispatchers** | Number of threads for webserver.|
94- | ** serveruser** | Static user.|
95- | ** serverpass** | MD5 hash of password for static user. It can be the output of `echo -n SecretPaSs | md5sum | awk '{print $1}'`|
96- | ** dangerzone** | Enable destructive methods and commands (DELETE).|
97- | ** readonly** | Enable readonly mode. If 'yes' only GET is allowed.|
98- | ** authread** | Require authentication for GET only.|
99- | ** authwrite** | Require authentication for POST/PUT/DELETE.|
100- | ** radoconns** | Number of connection to CEPH.|
101- | ** logfile** | Log to file, if 'no' logs are sent to stdout.|
102- | ** logpath** | Path for log file.|
103- | ** uploadmaxpart** | Maximum file chunk size (Sbould be amaller or erqual ro ` osd max object size ` ).|
104- | ** allpools:** | yes/no . If yes program will scan ceph and enable access via web to all pool.|
105- | ** poollist:** | Works only if ** allpools** is set to ** no** . Coma separated list of pools which should be accesible via webrados program.|
106- | ** redis** | IP address and port of Redis server.|
89+ | ** Name** | ** Description** |
90+ | -------------------| --------------------------------------------------------------------------------------------------------------------------------------|
91+ | ** listen** | IP port to bind. |
92+ | ** dispatchers** | Number of threads for webserver. |
93+ | ** serveruser** | Static user. |
94+ | ** serverpass** | MD5 hash of password for static user. It can be the output of `echo -n SecretPaSs md5sum | awk '{print $1}'`| |
95+ | ** dangerzone** | Enable destructive methods and commands (DELETE). |
96+ | ** readonly** | Enable readonly mode. If 'yes' only GET is allowed. |
97+ | ** authread** | Require authentication for GET only. |
98+ | ** authwrite** | Require authentication for POST/PUT/DELETE. |
99+ | ** radoconns** | Number of connection to CEPH. |
100+ | ** logfile** | Log to file, if 'no' logs are sent to stdout. |
101+ | ** logpath** | Path for log file. |
102+ | ** uploadmaxpart** | Maximum file chunk size (Sbould be amaller or erqual ro ` osd max object size ` ). |
103+ | ** allpools:** | yes/no . If yes program will scan ceph and enable access via web to all pool. |
104+ | ** poollist:** | Works only if ** allpools** is set to ** no** . Coma separated list of pools which should be accesible via webrados program. |
105+ | ** database** | Name of database server for storing metadata of fliles (Ceph, Redis, MySQL). MySQL and Redis are deprecated and will be removed soon |
106+
107+ ### ** Section cache**
108+ ---------
109+ | ** Name** | ** Description** |
110+ | ------------- | ---------------------------------------------------------------------------------------------------|
111+ | ** shards** | Number of shards (must be a power of 2) |
112+ | ** lifewindow** | Time after which entry can be evicted |
113+ | ** cleanwindow** | Interval between removing expired entries (clean up). If set to <= 0 then no action is performed. |
114+ | ** maxrntriesinwindow** | rps * lifeWindow, used only in initial memory allocation |
115+ | ** maxentrysize** | max entry size in bytes, used only in initial memory allocation |
116+ | ** maxcachemb** | Cache will not allocate more memory than this limit, value in MB. 0 value means no size limit |
117+
118+
107119### ** Section monitoring**
108120---------
109121| ** Name** | ** Description** |
@@ -123,9 +135,7 @@ GO-Webrados will periodically read ```uesrs.txt``` file and automatically update
123135### ** Large files**
124136
125137In order to be able to store large file in RADOS directly files needs to be split to smaller chunks.
126- GO-WebRados will automatically set maximum chunk size to ** uploadmaxpart** and split files in accordance to that.
127- For this GO-WebRados requires Redis servers to store metadata for big files. (Make sure to keep Redis database safe and periodically back it up.)
128- Redis will store metadata only for large files. Small files are to split and not require special metadata server.
138+ GO-WebRados will automatically set maximum chunk size to ** OSDMaxObjectSize** of Ceph and split files in accordance to that.
129139
130140### ** Special commands**
131141
0 commit comments