Commit 2f14d322 authored by Bastien Gounon's avatar Bastien Gounon 🐗
Browse files

Update README

parent 4e32605a
Pipeline #87240 passed with stage
in 4 minutes and 27 seconds
## Server side # Server side
### Using binary executable ## Using binary executable
Download the binary, make it executable and provide parameters \ Download the binary, make it executable and provide parameters \
Example: `./xcache-flusher -port 8080 -cachedir /tmp/testdir01,/tmp/testdir02 -token mysecretpassword` \ Example: `./xcache-flusher -port 8080 -cachedir /tmp/testdir01,/tmp/testdir02 -token mysecretpassword` \
Help available with `./xcache-flusher -h` Help available with `./xcache-flusher -h`
Server will listen on port 8080 Server will listen on port 8080
### Using Docker container ## Using Docker container
When running you must specify environment variables for configuration: When running you must specify environment variables for configuration:
- `FLUSHER_DIR`: comma-separated list of directories to flush - `FLUSHER_DIR`: comma-separated list of directories to flush
- (opt) `FLUSHER_PORT`: port on which to listen, default 8080. Using default and redirecting a different host port via Docker is preferrable. - (opt) `FLUSHER_PORT`: port on which to listen, default 8080. Using default and redirecting a different host port via Docker is preferrable.
- (opt) `FLUSHER_TOKEN`: string used to authenticate client requests \ - (opt) `FLUSHER_TOKEN`: string used to authenticate client requests
#### Example: ### Example:
``` ```
docker run -p 54321:8080 --env FLUSHER_DIR=/xcache/data,/xcache/metadata --env FLUSHER_TOKEN=mysecretpassword -v /path/to/data:/xcache gitlab-registry.in2p3.fr/bastien.gounon/xcache-flusher docker run -p 54321:8080 --env FLUSHER_DIR=/xcache/data,/xcache/metadata --env FLUSHER_TOKEN=mysecretpassword -v /path/to/data:/xcache gitlab-registry.in2p3.fr/bastien.gounon/xcache-flusher
``` ```
#### Docker-compose example: ### Docker-compose example:
``` ```
version: '3' version: '3'
...@@ -35,7 +35,7 @@ services: ...@@ -35,7 +35,7 @@ services:
- 54321:8080 - 54321:8080
``` ```
## Client side # Client side
Client just needs to call the DELETE HTTP operation on the server URL with method `flush`. Optionnally provide authentication token in the URL. \ Client just needs to call the DELETE HTTP operation on the server URL with method `flush`. Optionnally provide authentication token in the URL. \
example: example:
* with authentication: `curl -X DELETE http://127.0.0.1:8080/flush\?token\=mysecretpassword` * with authentication: `curl -X DELETE http://127.0.0.1:8080/flush\?token\=mysecretpassword`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment