forked from TrueCloudLab/frostfs-http-gw
Compare commits
No commits in common. "test-2770453200" and "master" have entirely different histories.
test-27704
...
master
18 changed files with 67 additions and 64 deletions
0
Makefile
Executable file → Normal file
0
Makefile
Executable file → Normal file
10
README.md
10
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.
|
Configuration file is optional and can be used instead of environment variables/other parameters.
|
||||||
It can be specified with `--config` parameter:
|
It can be specified with `--config` parameter:
|
||||||
```
|
```
|
||||||
$ frostfs-http-gw --config your-config.yml
|
$ frostfs-http-gw --config your-config.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
See [config](./config/config.yml) and [defaults](./docs/gate-configuration.md) for example.
|
See [config](./config/config.yaml) and [defaults](./docs/gate-configuration.md) for example.
|
||||||
|
|
||||||
#### Multiple configs
|
#### 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:
|
Also, you can combine these flags:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ frostfs-http-gw --config ./config/config.yml --config /your/partial/config.yml --config-dir ./config/dir
|
$ frostfs-http-gw --config ./config/config.yaml --config /your/partial/config.yaml --config-dir ./config/dir
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note:** next file in `--config` flag overwrites values from the previous one.
|
**Note:** next file in `--config` flag overwrites values from the previous one.
|
||||||
Files from `--config-dir` directory overwrite values from `--config` files.
|
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.yml`),
|
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.yml`,
|
applies parameters from `/your/partial/config.yaml`,
|
||||||
enable pprof (value from `./config/dir/pprof.yaml`) and prometheus (value from `./config/dir/prometheus.yaml`).
|
enable pprof (value from `./config/dir/pprof.yaml`) and prometheus (value from `./config/dir/prometheus.yaml`).
|
||||||
|
|
||||||
## HTTP API provided
|
## HTTP API provided
|
||||||
|
|
1
debian/control
vendored
1
debian/control
vendored
|
@ -12,3 +12,4 @@ Package: frostfs-http-gw
|
||||||
Architecture: any
|
Architecture: any
|
||||||
Depends: ${misc:Depends}
|
Depends: ${misc:Depends}
|
||||||
Description: FrostFS HTTP Gateway bridges FrostFS internal protocol and HTTP standard.
|
Description: FrostFS HTTP Gateway bridges FrostFS internal protocol and HTTP standard.
|
||||||
|
|
||||||
|
|
2
debian/frostfs-http-gw.install
vendored
2
debian/frostfs-http-gw.install
vendored
|
@ -1,2 +1,2 @@
|
||||||
bin/frostfs-http-gw usr/bin
|
bin/frostfs-http-gw usr/bin
|
||||||
config/config.yml etc/frostfs/http
|
config/config.yaml etc/frostfs/http
|
||||||
|
|
8
debian/frostfs-http-gw.postinst
vendored
Executable file → Normal file
8
debian/frostfs-http-gw.postinst
vendored
Executable file → Normal file
|
@ -24,13 +24,13 @@ 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
|
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
|
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
|
||||||
chown -f root:frostfs-$USERNAME /etc/frostfs/$USERNAME/config.yml || true
|
chown -f root:frostfs-$USERNAME /etc/frostfs/$USERNAME/config.yaml || true
|
||||||
chmod -f 0750 /etc/frostfs/$USERNAME
|
chmod -f 0750 /etc/frostfs/$USERNAME
|
||||||
chmod -f 0640 /etc/frostfs/$USERNAME/config.yml || true
|
chmod -f 0640 /etc/frostfs/$USERNAME/config.yaml || true
|
||||||
fi
|
fi
|
||||||
USERDIR=$(getent passwd "frostfs-$USERNAME" | cut -d: -f6)
|
USERDIR=$(getent passwd "frostfs-$USERNAME" | cut -d: -f6)
|
||||||
if ! dpkg-statoverride --list frostfs-"$USERDIR" >/dev/null; then
|
if ! dpkg-statoverride --list frostfs-$USERDIR >/dev/null; then
|
||||||
chown -f frostfs-$USERNAME: "$USERDIR"
|
chown -f frostfs-$USERNAME: $USERDIR
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
0
debian/frostfs-http-gw.postrm
vendored
Executable file → Normal file
0
debian/frostfs-http-gw.postrm
vendored
Executable file → Normal file
0
debian/frostfs-http-gw.preinst
vendored
Executable file → Normal file
0
debian/frostfs-http-gw.preinst
vendored
Executable file → Normal file
0
debian/frostfs-http-gw.prerm
vendored
Executable file → Normal file
0
debian/frostfs-http-gw.prerm
vendored
Executable file → Normal file
2
debian/frostfs-http-gw.service
vendored
2
debian/frostfs-http-gw.service
vendored
|
@ -4,7 +4,7 @@ Requires=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=/usr/bin/frostfs-http-gw --config /etc/frostfs/http/config.yml
|
ExecStart=/usr/bin/frostfs-http-gw --config /etc/frostfs/http/config.yaml
|
||||||
User=frostfs-http
|
User=frostfs-http
|
||||||
Group=frostfs-http
|
Group=frostfs-http
|
||||||
WorkingDirectory=/srv/frostfs_cache
|
WorkingDirectory=/srv/frostfs_cache
|
||||||
|
|
2
debian/rules
vendored
2
debian/rules
vendored
|
@ -12,3 +12,5 @@ override_dh_installsystemd:
|
||||||
|
|
||||||
override_dh_installchangelogs:
|
override_dh_installchangelogs:
|
||||||
dh_installchangelogs -k CHANGELOG.md
|
dh_installchangelogs -k CHANGELOG.md
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ $ kill -s SIGHUP <app_pid>
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ ./bin/frostfs-http-gw --config config.yml &> http.log &
|
$ ./bin/frostfs-http-gw --config config.yaml &> http.log &
|
||||||
[1] 998346
|
[1] 998346
|
||||||
|
|
||||||
$ cat http.log
|
$ cat http.log
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -4,7 +4,7 @@ go 1.18
|
||||||
|
|
||||||
require (
|
require (
|
||||||
git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.11.2-0.20230315095236-9dc375346703
|
git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.11.2-0.20230315095236-9dc375346703
|
||||||
git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20230329125804-552219b8e130
|
git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20230316081442-bec77f280a85
|
||||||
github.com/fasthttp/router v1.4.1
|
github.com/fasthttp/router v1.4.1
|
||||||
github.com/nspcc-dev/neo-go v0.101.0
|
github.com/nspcc-dev/neo-go v0.101.0
|
||||||
github.com/prometheus/client_golang v1.13.0
|
github.com/prometheus/client_golang v1.13.0
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -43,8 +43,8 @@ git.frostfs.info/TrueCloudLab/frostfs-contract v0.0.0-20230307110621-19a8ef2d02f
|
||||||
git.frostfs.info/TrueCloudLab/frostfs-contract v0.0.0-20230307110621-19a8ef2d02fb/go.mod h1:nkR5gaGeez3Zv2SE7aceP0YwxG2FzIB5cGKpQO2vV2o=
|
git.frostfs.info/TrueCloudLab/frostfs-contract v0.0.0-20230307110621-19a8ef2d02fb/go.mod h1:nkR5gaGeez3Zv2SE7aceP0YwxG2FzIB5cGKpQO2vV2o=
|
||||||
git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0 h1:FxqFDhQYYgpe41qsIHVOcdzSVCB8JNSfPG7Uk4r2oSk=
|
git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0 h1:FxqFDhQYYgpe41qsIHVOcdzSVCB8JNSfPG7Uk4r2oSk=
|
||||||
git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0/go.mod h1:RUIKZATQLJ+TaYQa60X2fTDwfuhMfm8Ar60bQ5fr+vU=
|
git.frostfs.info/TrueCloudLab/frostfs-crypto v0.6.0/go.mod h1:RUIKZATQLJ+TaYQa60X2fTDwfuhMfm8Ar60bQ5fr+vU=
|
||||||
git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20230329125804-552219b8e130 h1:V+3dGwEXwEvvSvseMKn8S6ZEMNhxBBYrcyx+F7VaptM=
|
git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20230316081442-bec77f280a85 h1:TUcJ5A0C1gWi3bAhw4b+V+iVM3E9mbBOdJIWWkAPNxo=
|
||||||
git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20230329125804-552219b8e130/go.mod h1:23fUGlEv/ImaOi3vck6vZj0v0b4hteOhLLPnVWHSQeA=
|
git.frostfs.info/TrueCloudLab/frostfs-sdk-go v0.0.0-20230316081442-bec77f280a85/go.mod h1:23fUGlEv/ImaOi3vck6vZj0v0b4hteOhLLPnVWHSQeA=
|
||||||
git.frostfs.info/TrueCloudLab/hrw v1.2.0 h1:KvAES7xIqmQBGd2q8KanNosD9+4BhU/zqD5Kt5KSflk=
|
git.frostfs.info/TrueCloudLab/hrw v1.2.0 h1:KvAES7xIqmQBGd2q8KanNosD9+4BhU/zqD5Kt5KSflk=
|
||||||
git.frostfs.info/TrueCloudLab/hrw v1.2.0/go.mod h1:mq2sbvYfO+BB6iFZwYBkgC0yc6mJNx+qZi4jW918m+Y=
|
git.frostfs.info/TrueCloudLab/hrw v1.2.0/go.mod h1:mq2sbvYfO+BB6iFZwYBkgC0yc6mJNx+qZi4jW918m+Y=
|
||||||
git.frostfs.info/TrueCloudLab/rfc6979 v0.4.0 h1:M2KR3iBj7WpY3hP10IevfIB9MURr4O9mwVfJ+SjT3HA=
|
git.frostfs.info/TrueCloudLab/rfc6979 v0.4.0 h1:M2KR3iBj7WpY3hP10IevfIB9MURr4O9mwVfJ+SjT3HA=
|
||||||
|
|
Loading…
Reference in a new issue