Compare commits

...

1 commit

Author SHA1 Message Date
01288cfa76 [#2] config: Rename .yaml to .yml
Make them consistent across all our repos.

Signed-off-by: Evgenii Stratonikov <stratonikov@runbox.com>
2023-03-30 19:07:05 +03:00
5 changed files with 10 additions and 10 deletions

View file

@ -1,4 +1,4 @@
config/config.yaml etc/frostfs/s3
config/config.yml etc/frostfs/s3
config/rules.json var/lib/frostfs/s3
bin/frostfs-s3-gw usr/bin
bin/frostfs-s3-authmate usr/bin

View file

@ -24,9 +24,9 @@ case "$1" in
id -u frostfs-$USERNAME >/dev/null 2>&1 || useradd -s /usr/sbin/nologin -d /var/lib/frostfs/s3 --system -M -U -c "FrostFS S3 gateway" frostfs-$USERNAME
if ! dpkg-statoverride --list /etc/frostfs/$USERNAME >/dev/null; then
chown -f -R root:frostfs-$USERNAME /etc/frostfs/$USERNAME
chown -f root:frostfs-$USERNAME /etc/frostfs/$USERNAME/config.yaml || true
chown -f root:frostfs-$USERNAME /etc/frostfs/$USERNAME/config.yml || true
chmod -f 0750 /etc/frostfs/$USERNAME
chmod -f 0640 /etc/frostfs/$USERNAME/config.yaml || true
chmod -f 0640 /etc/frostfs/$USERNAME/config.yml || true
fi
USERDIR=$(getent passwd "frostfs-$USERNAME" | cut -d: -f6)
if ! dpkg-statoverride --list frostfs-"$USERDIR" >/dev/null; then

View file

@ -4,7 +4,7 @@ Requires=network.target
[Service]
Type=simple
ExecStart=/usr/bin/frostfs-s3-gw --config /etc/frostfs/s3/config.yaml
ExecStart=/usr/bin/frostfs-s3-gw --config /etc/frostfs/s3/config.yml
User=frostfs-s3
Group=frostfs-s3
WorkingDirectory=/var/lib/frostfs/s3

View file

@ -101,13 +101,13 @@ Pprof and Prometheus are integrated into the gateway. To enable them, use `--ppr
## YAML file and environment variables
Example of a YAML configuration file: [yaml-example](/config/config.yaml)
Example of a YAML configuration file: [yaml-example](/config/config.yml)
Examples of environment variables: [env-example](/config/config.env).
A path to a configuration file can be specified with `--config` parameter:
```shell
$ frostfs-s3-gw --config your-config.yaml
$ frostfs-s3-gw --config your-config.yml
```
### Multiple configs
@ -118,13 +118,13 @@ You can either provide several files with repeating `--config` flag or provide p
Also, you can combine these flags:
```shell
$ frostfs-s3-gw --config ./config/config.yaml --config /your/partial/config.yaml --config-dir ./config/dir
$ frostfs-s3-gw --config ./config/config.yml --config /your/partial/config.yml --config-dir ./config/dir
```
**Note:** next file in `--config` flag overwrites values from the previous one.
Files from `--config-dir` directory overwrite values from `--config` files.
So the command above run `frostfs-s3-gw` to listen on `0.0.0.0:8080` address (value from `./config/config.yaml`),
applies parameters from `/your/partial/config.yaml`,
So the command above run `frostfs-s3-gw` to listen on `0.0.0.0:8080` address (value from `./config/config.yml`),
applies parameters from `/your/partial/config.yml`,
enable pprof (value from `./config/dir/pprof.yaml`) and prometheus (value from `./config/dir/prometheus.yaml`).
### Reload on SIGHUP
@ -141,7 +141,7 @@ $ kill -s SIGHUP <app_pid>
Example:
```shell
$ ./bin/frostfs-s3-gw --config config.yaml &> s3.log &
$ ./bin/frostfs-s3-gw --config config.yml &> s3.log &
[1] 998346
$ cat s3.log