From cedc9cf72668ea0053b74801183ea5c05f02289d Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 30 Mar 2023 19:05:40 +0300 Subject: [PATCH] config: Rename `.yaml` to `.yml` Make them consistent across all our repos. --- README.md | 10 +++++----- config/{config.yaml => config.yml} | 0 debian/frostfs-http-gw.install | 2 +- debian/frostfs-http-gw.postinst | 4 ++-- debian/frostfs-http-gw.service | 2 +- docs/gate-configuration.md | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) rename config/{config.yaml => config.yml} (100%) diff --git a/README.md b/README.md index 504768f..ee38106 100644 --- a/README.md +++ b/README.md @@ -175,10 +175,10 @@ HTTP_GW_LOGGER_LEVEL=debug Configuration file is optional and can be used instead of environment variables/other parameters. It can be specified with `--config` parameter: ``` -$ frostfs-http-gw --config your-config.yaml +$ frostfs-http-gw --config your-config.yml ``` -See [config](./config/config.yaml) and [defaults](./docs/gate-configuration.md) for example. +See [config](./config/config.yml) and [defaults](./docs/gate-configuration.md) for example. #### Multiple configs @@ -188,13 +188,13 @@ You can either provide several files with repeating `--config` flag or provide p Also, you can combine these flags: ```shell -$ frostfs-http-gw --config ./config/config.yaml --config /your/partial/config.yaml --config-dir ./config/dir +$ frostfs-http-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-http-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-http-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`). ## HTTP API provided 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-http-gw.install b/debian/frostfs-http-gw.install index 2f71be4..63f9320 100644 --- a/debian/frostfs-http-gw.install +++ b/debian/frostfs-http-gw.install @@ -1,2 +1,2 @@ bin/frostfs-http-gw usr/bin -config/config.yaml etc/frostfs/http +config/config.yml etc/frostfs/http diff --git a/debian/frostfs-http-gw.postinst b/debian/frostfs-http-gw.postinst index 360ceef..7c0e418 100755 --- a/debian/frostfs-http-gw.postinst +++ b/debian/frostfs-http-gw.postinst @@ -24,9 +24,9 @@ case "$1" in id -u frostfs-$USERNAME >/dev/null 2>&1 || useradd -s /usr/sbin/nologin -d /srv/frostfs_cache --system -M -U -c "FrostFS HTTP gateway" frostfs-$USERNAME if ! dpkg-statoverride --list /etc/frostfs/$USERNAME >/dev/null; then chown -f 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-http-gw.service b/debian/frostfs-http-gw.service index 4851a3f..f618693 100644 --- a/debian/frostfs-http-gw.service +++ b/debian/frostfs-http-gw.service @@ -4,7 +4,7 @@ Requires=network.target [Service] Type=simple -ExecStart=/usr/bin/frostfs-http-gw --config /etc/frostfs/http/config.yaml +ExecStart=/usr/bin/frostfs-http-gw --config /etc/frostfs/http/config.yml User=frostfs-http Group=frostfs-http WorkingDirectory=/srv/frostfs_cache diff --git a/docs/gate-configuration.md b/docs/gate-configuration.md index 8323bdc..1305de3 100644 --- a/docs/gate-configuration.md +++ b/docs/gate-configuration.md @@ -23,7 +23,7 @@ $ kill -s SIGHUP Example: ```shell -$ ./bin/frostfs-http-gw --config config.yaml &> http.log & +$ ./bin/frostfs-http-gw --config config.yml &> http.log & [1] 998346 $ cat http.log