parent
09c6e22b84
commit
765fd28a49
9 changed files with 23 additions and 23 deletions
|
@ -1,7 +1,7 @@
|
||||||
FROM golang:1.19 as builder
|
FROM golang:1.19 as builder
|
||||||
|
|
||||||
ARG BUILD=now
|
ARG BUILD=now
|
||||||
ARG REPO=github.com/nspcc-dev/neofs-s3-gw
|
ARG REPO=github.com/TrueCloudLab/frostfs-s3-gw
|
||||||
ARG VERSION=dev
|
ARG VERSION=dev
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
@ -10,12 +10,12 @@ COPY . /src
|
||||||
RUN make
|
RUN make
|
||||||
|
|
||||||
# Executable image
|
# Executable image
|
||||||
FROM alpine AS neofs-s3-gw
|
FROM alpine AS frostfs-s3-gw
|
||||||
RUN apk add --no-cache bash ca-certificates
|
RUN apk add --no-cache bash ca-certificates
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
COPY --from=builder /src/bin/neofs-s3-gw /bin/neofs-s3-gw
|
COPY --from=builder /src/bin/frostfs-s3-gw /bin/frostfs-s3-gw
|
||||||
COPY --from=builder /src/bin/neofs-s3-authmate /bin/neofs-s3-authmate
|
COPY --from=builder /src/bin/frostfs-s3-authmate /bin/frostfs-s3-authmate
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/neofs-s3-gw"]
|
ENTRYPOINT ["/bin/frostfs-s3-gw"]
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
FROM alpine AS neofs-s3-gw
|
FROM alpine AS frostfs-s3-gw
|
||||||
RUN apk add --no-cache bash ca-certificates
|
RUN apk add --no-cache bash ca-certificates
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
COPY /bin/neofs-s3-gw /bin/neofs-s3-gw
|
COPY /bin/frostfs-s3-gw /bin/frostfs-s3-gw
|
||||||
COPY /bin/neofs-s3-authmate /bin/neofs-s3-authmate
|
COPY /bin/frostfs-s3-authmate /bin/frostfs-s3-authmate
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/neofs-s3-gw"]
|
ENTRYPOINT ["/bin/frostfs-s3-gw"]
|
||||||
|
|
12
Makefile
12
Makefile
|
@ -8,12 +8,12 @@ LINT_VERSION ?= 1.49.0
|
||||||
BINDIR = bin
|
BINDIR = bin
|
||||||
|
|
||||||
# Binaries to build
|
# Binaries to build
|
||||||
CMDS = $(addprefix neofs-, $(notdir $(wildcard cmd/*)))
|
CMDS = $(addprefix frostfs-, $(notdir $(wildcard cmd/*)))
|
||||||
BINS = $(addprefix $(BINDIR)/, $(CMDS))
|
BINS = $(addprefix $(BINDIR)/, $(CMDS))
|
||||||
|
|
||||||
# Variables for docker
|
# Variables for docker
|
||||||
REPO_BASENAME = $(shell basename `go list -m`)
|
REPO_BASENAME = $(shell basename `go list -m`)
|
||||||
HUB_IMAGE ?= "nspccdev/$(REPO_BASENAME)"
|
HUB_IMAGE ?= "truecloudlab/$(REPO_BASENAME)"
|
||||||
HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')"
|
HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')"
|
||||||
|
|
||||||
.PHONY: all $(BINS) $(BINDIR) dep docker/ test cover format image image-push dirty-image lint docker/lint version clean protoc
|
.PHONY: all $(BINS) $(BINDIR) dep docker/ test cover format image image-push dirty-image lint docker/lint version clean protoc
|
||||||
|
@ -33,7 +33,7 @@ $(BINS): sync-tree $(BINDIR) dep
|
||||||
CGO_ENABLED=0 \
|
CGO_ENABLED=0 \
|
||||||
go build -v -trimpath \
|
go build -v -trimpath \
|
||||||
-ldflags "-X $(REPO)/internal/version.Version=$(VERSION)" \
|
-ldflags "-X $(REPO)/internal/version.Version=$(VERSION)" \
|
||||||
-o $@ ./cmd/$(subst neofs-,,$(notdir $@))
|
-o $@ ./cmd/$(subst frostfs-,,$(notdir $@))
|
||||||
|
|
||||||
$(BINDIR):
|
$(BINDIR):
|
||||||
@echo "⇒ Ensure dir: $@"
|
@echo "⇒ Ensure dir: $@"
|
||||||
|
@ -80,7 +80,7 @@ format:
|
||||||
|
|
||||||
# Build clean Docker image
|
# Build clean Docker image
|
||||||
image:
|
image:
|
||||||
@echo "⇒ Build NeoFS S3 Gateway docker image "
|
@echo "⇒ Build FrostFS S3 Gateway docker image "
|
||||||
@docker build \
|
@docker build \
|
||||||
--build-arg REPO=$(REPO) \
|
--build-arg REPO=$(REPO) \
|
||||||
--build-arg VERSION=$(VERSION) \
|
--build-arg VERSION=$(VERSION) \
|
||||||
|
@ -95,7 +95,7 @@ image-push:
|
||||||
|
|
||||||
# Build dirty Docker image
|
# Build dirty Docker image
|
||||||
dirty-image:
|
dirty-image:
|
||||||
@echo "⇒ Build NeoFS S3 Gateway dirty docker image "
|
@echo "⇒ Build FrostFS S3 Gateway dirty docker image "
|
||||||
@docker build \
|
@docker build \
|
||||||
--build-arg REPO=$(REPO) \
|
--build-arg REPO=$(REPO) \
|
||||||
--build-arg VERSION=$(VERSION) \
|
--build-arg VERSION=$(VERSION) \
|
||||||
|
@ -135,7 +135,7 @@ protoc:
|
||||||
|
|
||||||
# Package for Debian
|
# Package for Debian
|
||||||
debpackage:
|
debpackage:
|
||||||
dch --package neofs-s3-gw \
|
dch --package frostfs-s3-gw \
|
||||||
--controlmaint \
|
--controlmaint \
|
||||||
--newversion $(PKG_VERSION) \
|
--newversion $(PKG_VERSION) \
|
||||||
--distribution $(OS_RELEASE) \
|
--distribution $(OS_RELEASE) \
|
||||||
|
|
|
@ -22,7 +22,7 @@ version Show current version
|
||||||
```
|
```
|
||||||
|
|
||||||
Or you can also use a [Docker
|
Or you can also use a [Docker
|
||||||
image](https://hub.docker.com/r/nspccdev/frostfs-s3-gw) provided for released
|
image](https://hub.docker.com/r/truecloudlab/frostfs-s3-gw) provided for released
|
||||||
(and occasionally unreleased) versions of gateway (`:latest` points to the
|
(and occasionally unreleased) versions of gateway (`:latest` points to the
|
||||||
latest stable release).
|
latest stable release).
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ type (
|
||||||
// Key used for Get/SetReqInfo.
|
// Key used for Get/SetReqInfo.
|
||||||
type contextKeyType string
|
type contextKeyType string
|
||||||
|
|
||||||
const ctxRequestInfo = contextKeyType("NeoFS-S3-GW")
|
const ctxRequestInfo = contextKeyType("FrostFS-S3-GW")
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// De-facto standard header keys.
|
// De-facto standard header keys.
|
||||||
|
|
|
@ -110,8 +110,8 @@ func prepare() (context.Context, *zap.Logger) {
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
app := &cli.App{
|
app := &cli.App{
|
||||||
Name: "NeoFS S3 Authmate",
|
Name: "FrostFS S3 Authmate",
|
||||||
Usage: "Helps manage delegated access via gates to data stored in NeoFS network",
|
Usage: "Helps manage delegated access via gates to data stored in FrostFS network",
|
||||||
Version: version.Version,
|
Version: version.Version,
|
||||||
Flags: appFlags(),
|
Flags: appFlags(),
|
||||||
Commands: appCommands(),
|
Commands: appCommands(),
|
||||||
|
|
|
@ -400,7 +400,7 @@ func remove(list []string, element string) []string {
|
||||||
// about the stop to the log.
|
// about the stop to the log.
|
||||||
func (a *App) Wait() {
|
func (a *App) Wait() {
|
||||||
a.log.Info("application started",
|
a.log.Info("application started",
|
||||||
zap.String("name", "neofs-s3-gw"),
|
zap.String("name", "frostfs-s3-gw"),
|
||||||
zap.String("version", version.Version),
|
zap.String("version", version.Version),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -277,7 +277,7 @@ func newSettings() *viper.Viper {
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case help != nil && *help:
|
case help != nil && *help:
|
||||||
fmt.Printf("NeoFS S3 gateway %s\n", version.Version)
|
fmt.Printf("FrostFS S3 gateway %s\n", version.Version)
|
||||||
flags.PrintDefaults()
|
flags.PrintDefaults()
|
||||||
|
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
|
@ -309,7 +309,7 @@ func newSettings() *viper.Viper {
|
||||||
|
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
case versionFlag != nil && *versionFlag:
|
case versionFlag != nil && *versionFlag:
|
||||||
fmt.Printf("NeoFS S3 Gateway\nVersion: %s\nGoVersion: %s\n", version.Version, runtime.Version())
|
fmt.Printf("FrostFS S3 Gateway\nVersion: %s\nGoVersion: %s\n", version.Version, runtime.Version())
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,5 @@ var (
|
||||||
Version = "dev"
|
Version = "dev"
|
||||||
|
|
||||||
// Server contains server identification string.
|
// Server contains server identification string.
|
||||||
Server = "NeoFS-S3-GW/" + Version
|
Server = "FrostFS-S3-GW/" + Version
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue