diff --git a/config/config.yaml b/config/config.yml similarity index 100% rename from config/config.yaml rename to config/config.yml diff --git a/debian/frostfs-s3-gw.install b/debian/frostfs-s3-gw.install index 7e4b6e1..d87f935 100644 --- a/debian/frostfs-s3-gw.install +++ b/debian/frostfs-s3-gw.install @@ -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 diff --git a/debian/frostfs-s3-gw.postinst b/debian/frostfs-s3-gw.postinst index 117b882..21acee6 100755 --- a/debian/frostfs-s3-gw.postinst +++ b/debian/frostfs-s3-gw.postinst @@ -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 diff --git a/debian/frostfs-s3-gw.service b/debian/frostfs-s3-gw.service index baad2d1..027bb05 100644 --- a/debian/frostfs-s3-gw.service +++ b/debian/frostfs-s3-gw.service @@ -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 diff --git a/docs/configuration.md b/docs/configuration.md index 695109c..14bd272 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -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 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