From ed93330e6691255a3b28fd7e9c16c75cf6d205b3 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 13 Jul 2022 16:44:39 +0300 Subject: [PATCH] all: follow-up for d99ba3481b192d581bf6a153e40e5f99a7eb5edf --- .github/workflows/main.yml | 26 +- Makefile | 335 ++++++++++++++++---------- README.md | 8 +- app/victoria-metrics/Makefile | 114 +++++---- app/vmagent/Makefile | 70 +++--- app/vmagent/README.md | 4 +- app/vmalert/Makefile | 70 +++--- app/vmalert/README.md | 4 +- app/vmauth/Makefile | 70 +++--- app/vmbackup/Makefile | 59 +++-- app/vmctl/Makefile | 71 +++--- app/vmctl/README.md | 22 +- app/vmrestore/Makefile | 59 +++-- app/vmui/Dockerfile-web | 4 +- deployment/docker/Makefile | 99 +++----- docs/CHANGELOG.md | 9 +- docs/README.md | 8 +- docs/Single-server-VictoriaMetrics.md | 8 +- docs/vmagent.md | 4 +- docs/vmalert.md | 8 +- docs/vmctl.md | 4 +- package/package_deb.sh | 6 +- package/package_rpm.sh | 4 +- 23 files changed, 568 insertions(+), 498 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 47f59961b..a80deee27 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,30 +38,8 @@ jobs: make test-full make test-pure make test-full-386 - make victoria-metrics - make victoria-metrics-pure - make victoria-metrics-arm - make victoria-metrics-arm64 - make vmutils - GOOS=freebsd go build -mod=vendor ./app/victoria-metrics - GOOS=freebsd go build -mod=vendor ./app/vmagent - GOOS=freebsd go build -mod=vendor ./app/vmalert - GOOS=freebsd go build -mod=vendor ./app/vmbackup - GOOS=freebsd go build -mod=vendor ./app/vmrestore - GOOS=freebsd go build -mod=vendor ./app/vmctl - GOOS=openbsd go build -mod=vendor ./app/victoria-metrics - GOOS=openbsd go build -mod=vendor ./app/vmagent - GOOS=openbsd go build -mod=vendor ./app/vmalert - GOOS=openbsd go build -mod=vendor ./app/vmbackup - GOOS=openbsd go build -mod=vendor ./app/vmrestore - GOOS=openbsd go build -mod=vendor ./app/vmctl - GOOS=darwin go build -mod=vendor ./app/victoria-metrics - GOOS=darwin go build -mod=vendor ./app/vmagent - GOOS=darwin go build -mod=vendor ./app/vmalert - GOOS=darwin go build -mod=vendor ./app/vmbackup - GOOS=darwin go build -mod=vendor ./app/vmrestore - GOOS=darwin go build -mod=vendor ./app/vmctl - CGO_ENABLED=0 GOOS=windows go build -mod=vendor ./app/vmagent + make victoria-metrics-crossbuild + make vmuitils-crossbuild - name: Publish coverage uses: codecov/codecov-action@v3 with: diff --git a/Makefile b/Makefile index 1d4260a33..2766db0f0 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,10 @@ GO_BUILDINFO = -X '$(PKG_PREFIX)/lib/buildinfo.Version=$(APP_NAME)-$(DATEINFO_TA .PHONY: $(MAKECMDGOALS) +include app/*/Makefile +include deployment/*/Makefile +include snap/local/Makefile + all: \ victoria-metrics-prod \ vmagent-prod \ @@ -22,11 +26,6 @@ all: \ vmrestore-prod \ vmctl-prod -include app/*/Makefile -include deployment/*/Makefile -include snap/local/Makefile - - clean: rm -rf bin/* @@ -64,21 +63,77 @@ vmutils-pure: \ vmrestore-pure \ vmctl-pure -vmutils-arm64: \ - vmagent-arm64 \ - vmalert-arm64 \ - vmauth-arm64 \ - vmbackup-arm64 \ - vmrestore-arm64 \ - vmctl-arm64 +vmutils-linux-amd64: \ + vmagent-linux-amd64 \ + vmalert-linux-amd64 \ + vmauth-linux-amd64 \ + vmbackup-linux-amd64 \ + vmrestore-linux-amd64 \ + vmctl-linux-amd64 -vmutils-arm: \ - vmagent-arm \ - vmalert-arm \ - vmauth-arm \ - vmbackup-arm \ - vmrestore-arm \ - vmctl-arm +vmutils-linux-arm64: \ + vmagent-linux-arm64 \ + vmalert-linux-arm64 \ + vmauth-linux-arm64 \ + vmbackup-linux-arm64 \ + vmrestore-linux-arm64 \ + vmctl-linux-arm64 + +vmutils-linux-arm: \ + vmagent-linux-arm \ + vmalert-linux-arm \ + vmauth-linux-arm \ + vmbackup-linux-arm \ + vmrestore-linux-arm \ + vmctl-linux-arm + +vmutils-linux-386: \ + vmagent-linux-386 \ + vmalert-linux-386 \ + vmauth-linux-386 \ + vmbackup-linux-386 \ + vmrestore-linux-386 \ + vmctl-linux-386 + +vmutils-linux-ppc64le: \ + vmagent-linux-ppc64le \ + vmalert-linux-ppc64le \ + vmauth-linux-ppc64le \ + vmbackup-linux-ppc64le \ + vmrestore-linux-ppc64le \ + vmctl-linux-ppc64le + +vmutils-darwin-amd64: \ + vmagent-darwin-amd64 \ + vmalert-darwin-amd64 \ + vmauth-darwin-amd64 \ + vmbackup-darwin-amd64 \ + vmrestore-darwin-amd64 \ + vmctl-darwin-amd64 + +vmutils-darwin-arm64: \ + vmagent-darwin-arm64 \ + vmalert-darwin-arm64 \ + vmauth-darwin-arm64 \ + vmbackup-darwin-arm64 \ + vmrestore-darwin-arm64 \ + vmctl-darwin-arm64 + +vmutils-freebsd-amd64: \ + vmagent-freebsd-amd64 \ + vmalert-freebsd-amd64 \ + vmauth-freebsd-amd64 \ + vmbackup-freebsd-amd64 \ + vmrestore-freebsd-amd64 \ + vmctl-freebsd-amd64 + +vmutils-openbsd-amd64: \ + vmagent-openbsd-amd64 \ + vmalert-openbsd-amd64 \ + vmauth-openbsd-amd64 \ + vmbackup-openbsd-amd64 \ + vmrestore-openbsd-amd64 \ + vmctl-openbsd-amd64 vmutils-windows-amd64: \ vmagent-windows-amd64 \ @@ -86,12 +141,34 @@ vmutils-windows-amd64: \ vmauth-windows-amd64 \ vmctl-windows-amd64 +victoria-metrics-crossbuild: \ + victoria-metrics-linux-amd64 \ + victoria-metrics-linux-arm64 \ + victoria-metrics-linux-arm \ + victoria-metrics-linux-386 \ + victoria-metrics-linux-ppc64le \ + victoria-metrics-darwin-amd64 \ + victoria-metrics-darwin-arm64 \ + victoria-metrics-freebsd-amd64 \ + victoria-metrics-openbsd-amd64 + +vmutils-crossbuild: \ + vmutils-linux-amd64 \ + vmutils-linux-arm64 \ + vmutils-linux-arm \ + vmutils-linux-386 \ + vmutils-linux-ppc64le \ + vmutils-darwin-amd64 \ + vmutils-darwin-arm64 \ + vmutils-freebsd-amd64 \ + vmutils-openbsd-amd64 \ + vmutils-windows-amd64 publish-release: - git checkout $(TAG) && $(MAKE) release copy-linux publish && \ - git checkout $(TAG)-cluster && $(MAKE) release copy-linux-cluster publish && \ - git checkout $(TAG)-enterprise && $(MAKE) release copy-linux-enterprise publish && \ - git checkout $(TAG)-enterprise-cluster && $(MAKE) release copy-linux-enterprise-cluster publish + git checkout $(TAG) && $(MAKE) release publish && \ + git checkout $(TAG)-cluster && $(MAKE) release publish && \ + git checkout $(TAG)-enterprise && $(MAKE) release publish && \ + git checkout $(TAG)-enterprise-cluster && $(MAKE) release publish release: \ release-victoria-metrics \ @@ -102,82 +179,106 @@ release-victoria-metrics: \ release-victoria-metrics-linux-arm \ release-victoria-metrics-linux-arm64 \ release-victoria-metrics-darwin-amd64 \ - release-victoria-metrics-darwin-arm64 + release-victoria-metrics-darwin-arm64 \ + release-victoria-metrics-freebsd-amd64 \ + release-victoria-metrics-openbsd-amd64 release-victoria-metrics-linux-amd64: - OSARCH=linux-amd64 $(MAKE) release-victoria-metrics-generic - -release-victoria-metrics-darwin-amd64: - OSARCH=darwin-amd64 $(MAKE) release-victoria-metrics-generic + GOOS=linux GOARCH=amd64 $(MAKE) release-victoria-metrics-goos-goarch release-victoria-metrics-linux-arm: - OSARCH=linux-arm $(MAKE) release-victoria-metrics-generic + GOOS=linux GOARCH=arm $(MAKE) release-victoria-metrics-goos-goarch release-victoria-metrics-linux-arm64: - OSARCH=linux-arm64 $(MAKE) release-victoria-metrics-generic + GOOS=linux GOARCH=arm64 $(MAKE) release-victoria-metrics-goos-goarch + +release-victoria-metrics-darwin-amd64: + GOOS=darwin GOARCH=amd64 $(MAKE) release-victoria-metrics-goos-goarch release-victoria-metrics-darwin-arm64: - OSARCH=darwin-arm64 $(MAKE) release-victoria-metrics-generic + GOOS=darwin GOARCH=arm64 $(MAKE) release-victoria-metrics-goos-goarch -release-victoria-metrics-generic: victoria-metrics-$(OSARCH)-prod +release-victoria-metrics-freebsd-amd64: + GOOS=freebsd GOARCH=amd64 $(MAKE) release-victoria-metrics-goos-goarch + +release-victoria-metrics-openbsd-amd64: + GOOS=openbsd GOARCH=amd64 $(MAKE) release-victoria-metrics-goos-goarch + +release-victoria-metrics-goos-goarch: victoria-metrics-$(GOOS)-$(GOARCH)-prod cd bin && \ - tar --transform="flags=r;s|-$(OSARCH)||" -czf victoria-metrics-$(OSARCH)-$(PKG_TAG).tar.gz \ - victoria-metrics-$(OSARCH)-prod \ - && sha256sum victoria-metrics-$(OSARCH)-$(PKG_TAG).tar.gz \ - victoria-metrics-$(OSARCH)-prod \ - | sed s/-$(OSARCH)-prod/-prod/ > victoria-metrics-$(OSARCH)-$(PKG_TAG)_checksums.txt + tar --transform="flags=r;s|-$(GOOS)-$(GOARCH)||" -czf victoria-metrics-$(GOOS)-$(GOARCH)-$(PKG_TAG).tar.gz \ + victoria-metrics-$(GOOS)-$(GOARCH)-prod \ + && sha256sum victoria-metrics-$(GOOS)-$(GOARCH)-$(PKG_TAG).tar.gz \ + victoria-metrics-$(GOOS)-$(GOARCH)-prod \ + | sed s/-$(GOOS)-$(GOARCH)-prod/-prod/ > victoria-metrics-$(GOOS)-$(GOARCH)-$(PKG_TAG)_checksums.txt + cd bin && rm -rf victoria-metrics-$(GOOS)-$(GOARCH)-prod release-vmutils: \ release-vmutils-linux-amd64 \ - release-vmutils-linux-arm \ release-vmutils-linux-arm64 \ + release-vmutils-linux-arm \ release-vmutils-darwin-amd64 \ release-vmutils-darwin-arm64 \ + release-vmutils-freebsd-amd64 \ + release-vmutils-openbsd-amd64 \ release-vmutils-windows-amd64 release-vmutils-linux-amd64: - OSARCH=linux-amd64 $(MAKE) release-vmutils-generic - -release-vmutils-darwin-amd64: - OSARCH=darwin-amd64 $(MAKE) release-vmutils-generic - -release-vmutils-windows-amd64: - GOARCH=amd64 $(MAKE) release-vmutils-windows-generic - -release-vmutils-linux-arm: - OSARCH=linux-arm $(MAKE) release-vmutils-generic + GOOS=linux GOARCH=amd64 $(MAKE) release-vmutils-goos-goarch release-vmutils-linux-arm64: - OSARCH=linux-arm64 $(MAKE) release-vmutils-generic + GOOS=linux GOARCH=arm64 $(MAKE) release-vmutils-goos-goarch + +release-vmutils-linux-arm: + GOOS=linux GOARCH=arm $(MAKE) release-vmutils-goos-goarch + +release-vmutils-darwin-amd64: + GOOS=darwin GOARCH=amd64 $(MAKE) release-vmutils-goos-goarch release-vmutils-darwin-arm64: - OSARCH=darwin-arm64 $(MAKE) release-vmutils-generic + GOOS=darwin GOARCH=arm64 $(MAKE) release-vmutils-goos-goarch -release-vmutils-generic: \ - vmagent-$(OSARCH)-prod \ - vmalert-$(OSARCH)-prod \ - vmauth-$(OSARCH)-prod \ - vmbackup-$(OSARCH)-prod \ - vmrestore-$(OSARCH)-prod \ - vmctl-$(OSARCH)-prod +release-vmutils-freebsd-amd64: + GOOS=freebsd GOARCH=amd64 $(MAKE) release-vmutils-goos-goarch + +release-vmutils-openbsd-amd64: + GOOS=openbsd GOARCH=amd64 $(MAKE) release-vmutils-goos-goarch + +release-vmutils-windows-amd64: + GOARCH=amd64 $(MAKE) release-vmutils-windows-goarch + +release-vmutils-goos-goarch: \ + vmagent-$(GOOS)-$(GOARCH)-prod \ + vmalert-$(GOOS)-$(GOARCH)-prod \ + vmauth-$(GOOS)-$(GOARCH)-prod \ + vmbackup-$(GOOS)-$(GOARCH)-prod \ + vmrestore-$(GOOS)-$(GOARCH)-prod \ + vmctl-$(GOOS)-$(GOARCH)-prod cd bin && \ - tar --transform="flags=r;s|-$(OSARCH)||" -czf vmutils-$(OSARCH)-$(PKG_TAG).tar.gz \ - vmagent-$(OSARCH)-prod \ - vmalert-$(OSARCH)-prod \ - vmauth-$(OSARCH)-prod \ - vmbackup-$(OSARCH)-prod \ - vmrestore-$(OSARCH)-prod \ - vmctl-$(OSARCH)-prod \ - && sha256sum vmutils-$(OSARCH)-$(PKG_TAG).tar.gz \ - vmagent-$(OSARCH)-prod \ - vmalert-$(OSARCH)-prod \ - vmauth-$(OSARCH)-prod \ - vmbackup-$(OSARCH)-prod \ - vmrestore-$(OSARCH)-prod \ - vmctl-$(OSARCH)-prod \ - | sed s/-$(OSARCH)-prod/-prod/ > vmutils-$(OSARCH)-$(PKG_TAG)_checksums.txt + tar --transform="flags=r;s|-$(GOOS)-$(GOARCH)||" -czf vmutils-$(GOOS)-$(GOARCH)-$(PKG_TAG).tar.gz \ + vmagent-$(GOOS)-$(GOARCH)-prod \ + vmalert-$(GOOS)-$(GOARCH)-prod \ + vmauth-$(GOOS)-$(GOARCH)-prod \ + vmbackup-$(GOOS)-$(GOARCH)-prod \ + vmrestore-$(GOOS)-$(GOARCH)-prod \ + vmctl-$(GOOS)-$(GOARCH)-prod \ + && sha256sum vmutils-$(GOOS)-$(GOARCH)-$(PKG_TAG).tar.gz \ + vmagent-$(GOOS)-$(GOARCH)-prod \ + vmalert-$(GOOS)-$(GOARCH)-prod \ + vmauth-$(GOOS)-$(GOARCH)-prod \ + vmbackup-$(GOOS)-$(GOARCH)-prod \ + vmrestore-$(GOOS)-$(GOARCH)-prod \ + vmctl-$(GOOS)-$(GOARCH)-prod \ + | sed s/-$(GOOS)-$(GOARCH)-prod/-prod/ > vmutils-$(GOOS)-$(GOARCH)-$(PKG_TAG)_checksums.txt + cd bin && rm -rf \ + vmagent-$(GOOS)-$(GOARCH)-prod \ + vmalert-$(GOOS)-$(GOARCH)-prod \ + vmauth-$(GOOS)-$(GOARCH)-prod \ + vmbackup-$(GOOS)-$(GOARCH)-prod \ + vmrestore-$(GOOS)-$(GOARCH)-prod \ + vmctl-$(GOOS)-$(GOARCH)-prod -release-vmutils-windows-generic: \ +release-vmutils-windows-goarch: \ vmagent-windows-$(GOARCH)-prod \ vmalert-windows-$(GOARCH)-prod \ vmauth-windows-$(GOARCH)-prod \ @@ -194,18 +295,23 @@ release-vmutils-windows-generic: \ vmauth-windows-$(GOARCH)-prod.exe \ vmctl-windows-$(GOARCH)-prod.exe \ > vmutils-windows-$(GOARCH)-$(PKG_TAG)_checksums.txt + cd bin && rm -rf \ + vmagent-windows-$(GOARCH)-prod.exe \ + vmalert-windows-$(GOARCH)-prod.exe \ + vmauth-windows-$(GOARCH)-prod.exe \ + vmctl-windows-$(GOARCH)-prod.exe pprof-cpu: go tool pprof -trim_path=github.com/VictoriaMetrics/VictoriaMetrics@ $(PPROF_FILE) fmt: - GO111MODULE=on gofmt -l -w -s ./lib - GO111MODULE=on gofmt -l -w -s ./app + gofmt -l -w -s ./lib + gofmt -l -w -s ./app vet: - GO111MODULE=on go vet -mod=vendor ./lib/... - GO111MODULE=on go vet -mod=vendor ./app/... + go vet -mod=vendor ./lib/... + go vet -mod=vendor ./app/... lint: install-golint golint lib/... @@ -232,45 +338,45 @@ install-errcheck: check-all: fmt vet lint errcheck golangci-lint test: - GO111MODULE=on go test -mod=vendor ./lib/... ./app/... + go test -mod=vendor ./lib/... ./app/... test-race: - GO111MODULE=on go test -mod=vendor -race ./lib/... ./app/... + go test -mod=vendor -race ./lib/... ./app/... test-pure: - GO111MODULE=on CGO_ENABLED=0 go test -mod=vendor ./lib/... ./app/... + CGO_ENABLED=0 go test -mod=vendor ./lib/... ./app/... test-full: - GO111MODULE=on go test -mod=vendor -coverprofile=coverage.txt -covermode=atomic ./lib/... ./app/... + go test -mod=vendor -coverprofile=coverage.txt -covermode=atomic ./lib/... ./app/... test-full-386: - GO111MODULE=on GOARCH=386 go test -mod=vendor -coverprofile=coverage.txt -covermode=atomic ./lib/... ./app/... + GOARCH=386 go test -mod=vendor -coverprofile=coverage.txt -covermode=atomic ./lib/... ./app/... benchmark: - GO111MODULE=on go test -mod=vendor -bench=. ./lib/... - GO111MODULE=on go test -mod=vendor -bench=. ./app/... + go test -mod=vendor -bench=. ./lib/... + go test -mod=vendor -bench=. ./app/... benchmark-pure: - GO111MODULE=on CGO_ENABLED=0 go test -mod=vendor -bench=. ./lib/... - GO111MODULE=on CGO_ENABLED=0 go test -mod=vendor -bench=. ./app/... + CGO_ENABLED=0 go test -mod=vendor -bench=. ./lib/... + CGO_ENABLED=0 go test -mod=vendor -bench=. ./app/... vendor-update: - GO111MODULE=on go get -u -d ./lib/... - GO111MODULE=on go get -u -d ./app/... - GO111MODULE=on go mod tidy -compat=1.17 - GO111MODULE=on go mod vendor + go get -u -d ./lib/... + go get -u -d ./app/... + go mod tidy -compat=1.17 + go mod vendor app-local: - CGO_ENABLED=1 GO111MODULE=on go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)$(RACE) $(PKG_PREFIX)/app/$(APP_NAME) + CGO_ENABLED=1 go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)$(RACE) $(PKG_PREFIX)/app/$(APP_NAME) app-local-pure: - CGO_ENABLED=0 GO111MODULE=on go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)-pure$(RACE) $(PKG_PREFIX)/app/$(APP_NAME) + CGO_ENABLED=0 go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)-pure$(RACE) $(PKG_PREFIX)/app/$(APP_NAME) -app-local-with-goarch: - GO111MODULE=on go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)-$(GOARCH)$(RACE) $(PKG_PREFIX)/app/$(APP_NAME) +app-local-goos-goarch: + CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) GOARCH=$(GOARCH) go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)-$(GOOS)-$(GOARCH)$(RACE) $(PKG_PREFIX)/app/$(APP_NAME) -app-local-windows-with-goarch: - CGO_ENABLED=0 GO111MODULE=on go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)-windows-$(GOARCH)$(RACE).exe $(PKG_PREFIX)/app/$(APP_NAME) +app-local-windows-goarch: + CGO_ENABLED=0 GOOS=windows GOARCH=$(GOARCH) go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)-windows-$(GOARCH)$(RACE).exe $(PKG_PREFIX)/app/$(APP_NAME) quicktemplate-gen: install-qtc qtc @@ -309,40 +415,3 @@ docs-sync: SRC=app/vmctl/README.md DST=docs/vmctl.md ORDER=8 $(MAKE) copy-docs SRC=app/vmgateway/README.md DST=docs/vmgateway.md ORDER=9 $(MAKE) copy-docs SRC=app/vmbackupmanager/README.md DST=docs/vmbackupmanager.md ORDER=10 $(MAKE) copy-docs - -# temporary operation to maintain compatibility -copy-linux: - cd bin && \ - cp victoria-metrics-linux-amd64-$(PKG_TAG).tar.gz victoria-metrics-amd64-$(PKG_TAG).tar.gz && \ - cp victoria-metrics-linux-arm-$(PKG_TAG).tar.gz victoria-metrics-arm-$(PKG_TAG).tar.gz && \ - cp victoria-metrics-linux-arm64-$(PKG_TAG).tar.gz victoria-metrics-arm64-$(PKG_TAG).tar.gz && \ - cp vmutils-linux-amd64-$(PKG_TAG).tar.gz vmutils-amd64-$(PKG_TAG).tar.gz && \ - cp vmutils-linux-arm-$(PKG_TAG).tar.gz vmutils-arm-$(PKG_TAG).tar.gz && \ - cp vmutils-linux-arm64-$(PKG_TAG).tar.gz vmutils-arm64-$(PKG_TAG).tar.gz - -copy-linux-cluster: - cd bin && \ - cp victoria-metrics-linux-amd64-$(PKG_TAG)-cluster.tar.gz victoria-metrics-amd64-$(PKG_TAG)-cluster.tar.gz && \ - cp victoria-metrics-linux-arm-$(PKG_TAG)-cluster.tar.gz victoria-metrics-arm-$(PKG_TAG)-cluster.tar.gz && \ - cp victoria-metrics-linux-arm64-$(PKG_TAG)-cluster.tar.gz victoria-metrics-arm64-$(PKG_TAG)-cluster.tar.gz - cp vmutils-linux-amd64-$(PKG_TAG)-cluster.tar.gz vmutils-amd64-$(PKG_TAG)-cluster.tar.gz && \ - cp vmutils-linux-arm-$(PKG_TAG)-cluster.tar.gz vmutils-arm-$(PKG_TAG)-cluster.tar.gz && \ - cp vmutils-linux-arm64-$(PKG_TAG)-cluster.tar.gz vmutils-arm64-$(PKG_TAG)-cluster.tar.gz - -copy-linux-enterprise: - cd bin && \ - cp victoria-metrics-linux-amd64-$(PKG_TAG)-enterprise.tar.gz victoria-metrics-amd64-$(PKG_TAG)-enterprise.tar.gz && \ - cp victoria-metrics-linux-arm-$(PKG_TAG)-enterprise.tar.gz victoria-metrics-arm-$(PKG_TAG)-enterprise.tar.gz && \ - cp victoria-metrics-linux-arm64-$(PKG_TAG)-enterprise.tar.gz victoria-metrics-arm64-$(PKG_TAG)-enterprise.tar.gz && \ - cp vmutils-linux-amd64-$(PKG_TAG)-enterprise.tar.gz vmutils-amd64-$(PKG_TAG)-enterprise.tar.gz && \ - cp vmutils-linux-arm-$(PKG_TAG)-enterprise.tar.gz vmutils-arm-$(PKG_TAG)-enterprise.tar.gz && \ - cp vmutils-linux-arm64-$(PKG_TAG)-enterprise.tar.gz vmutils-arm64-$(PKG_TAG)-enterprise.tar.gz - -copy-linux-enterprise-cluster: - cd bin && \ - cp victoria-metrics-linux-amd64-$(PKG_TAG)-enterprise-cluster.tar.gz victoria-metrics-amd64-$(PKG_TAG)-enterprise-cluster.tar.gz && \ - cp victoria-metrics-linux-arm-$(PKG_TAG)-enterprise-cluster.tar.gz victoria-metrics-arm-$(PKG_TAG)-enterprise-cluster.tar.gz && \ - cp victoria-metrics-linux-arm64-$(PKG_TAG)-enterprise-cluster.tar.gz victoria-metrics-arm64-$(PKG_TAG)-enterprise-cluster.tar.gz && \ - cp vmutils-linux-amd64-$(PKG_TAG)-enterprise-cluster.tar.gz vmutils-amd64-$(PKG_TAG)-enterprise-cluster.tar.gz && \ - cp vmutils-linux-arm-$(PKG_TAG)-enterprise-cluster.tar.gz vmutils-arm-$(PKG_TAG)-enterprise-cluster.tar.gz && \ - cp vmutils-linux-arm64-$(PKG_TAG)-enterprise-cluster.tar.gz vmutils-arm64-$(PKG_TAG)-enterprise-cluster.tar.gz diff --git a/README.md b/README.md index 5968a5f37..b7d68a63c 100644 --- a/README.md +++ b/README.md @@ -745,14 +745,14 @@ ARM build may run on Raspberry Pi or on [energy-efficient ARM servers](https://b ### Development ARM build 1. [Install Go](https://golang.org/doc/install). The minimum supported version is Go 1.17. -2. Run `make victoria-metrics-arm` or `make victoria-metrics-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). - It builds `victoria-metrics-arm` or `victoria-metrics-arm64` binary respectively and puts it into the `bin` folder. +2. Run `make victoria-metrics-linux-arm` or `make victoria-metrics-linux-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). + It builds `victoria-metrics-linux-arm` or `victoria-metrics-linux-arm64` binary respectively and puts it into the `bin` folder. ### Production ARM build 1. [Install docker](https://docs.docker.com/install/). -2. Run `make victoria-metrics-arm-prod` or `make victoria-metrics-arm64-prod` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). - It builds `victoria-metrics-arm-prod` or `victoria-metrics-arm64-prod` binary respectively and puts it into the `bin` folder. +2. Run `make victoria-metrics-linux-arm-prod` or `make victoria-metrics-linux-arm64-prod` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). + It builds `victoria-metrics-linux-arm-prod` or `victoria-metrics-linux-arm64-prod` binary respectively and puts it into the `bin` folder. ### Pure Go build (CGO_ENABLED=0) diff --git a/app/victoria-metrics/Makefile b/app/victoria-metrics/Makefile index fd8e4ae0d..9d00cfc44 100644 --- a/app/victoria-metrics/Makefile +++ b/app/victoria-metrics/Makefile @@ -1,6 +1,5 @@ # All these commands must run from repository root. -# Application build victoria-metrics: APP_NAME=victoria-metrics $(MAKE) app-local @@ -13,42 +12,33 @@ victoria-metrics-prod: victoria-metrics-pure-prod: APP_NAME=victoria-metrics $(MAKE) app-via-docker-pure -# GOARCH=amd64 -victoria-metrics-amd64-prod: - APP_NAME=victoria-metrics $(MAKE) app-via-docker-amd64 - victoria-metrics-linux-amd64-prod: APP_NAME=victoria-metrics $(MAKE) app-via-docker-linux-amd64 -victoria-metrics-darwin-amd64-prod: - APP_NAME=victoria-metrics $(MAKE) app-via-docker-darwin-amd64 - -# GOARCH=arm64 -victoria-metrics-arm64-prod: - APP_NAME=victoria-metrics $(MAKE) app-via-docker-arm64 - -victoria-metrics-linux-arm64-prod: - APP_NAME=victoria-metrics $(MAKE) app-via-docker-linux-arm64 - -victoria-metrics-darwin-arm64-prod: - APP_NAME=victoria-metrics $(MAKE) app-via-docker-darwin-arm64 - -# GOARCH=arm -victoria-metrics-arm-prod: - APP_NAME=victoria-metrics $(MAKE) app-via-docker-arm - victoria-metrics-linux-arm-prod: APP_NAME=victoria-metrics $(MAKE) app-via-docker-linux-arm -# GOARCH=ppc64le -victoria-metrics-ppc64le-prod: - APP_NAME=victoria-metrics $(MAKE) app-via-docker-ppc64le +victoria-metrics-linux-arm64-prod: + APP_NAME=victoria-metrics $(MAKE) app-via-docker-linux-arm64 -# GOARCH=386 -victoria-metrics-386-prod: - APP_NAME=victoria-metrics $(MAKE) app-via-docker-386 +victoria-metrics-linux-ppc64le-prod: + APP_NAME=victoria-metrics $(MAKE) app-via-docker-linux-ppc64le + +victoria-metrics-linux-386-prod: + APP_NAME=victoria-metrics $(MAKE) app-via-docker-linux-386 + +victoria-metrics-darwin-amd64-prod: + APP_NAME=victoria-metrics $(MAKE) app-via-docker-darwin-amd64 + +victoria-metrics-darwin-arm64-prod: + APP_NAME=victoria-metrics $(MAKE) app-via-docker-darwin-arm64 + +victoria-metrics-freebsd-amd64-prod: + APP_NAME=victoria-metrics $(MAKE) app-via-docker-freebsd-amd64 + +victoria-metrics-openbsd-amd64-prod: + APP_NAME=victoria-metrics $(MAKE) app-via-docker-openbsd-amd64 -# Package build package-victoria-metrics: APP_NAME=victoria-metrics $(MAKE) package-via-docker @@ -80,60 +70,68 @@ run-victoria-metrics: ARGS='-graphiteListenAddr=:2003 -opentsdbListenAddr=:4242 -retentionPeriod=12 -search.maxUniqueTimeseries=1000000 -search.maxQueryDuration=10m' \ $(MAKE) run-via-docker -victoria-metrics-amd64: - CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/victoria-metrics-amd64 ./app/victoria-metrics +victoria-metrics-linux-amd64: + APP_NAME=victoria-metrics CGO_ENABLED=1 GOOS=linux GOARCH=amd64 $(MAKE) app-local-goos-goarch -victoria-metrics-arm: - CGO_ENABLED=0 GOOS=linux GOARCH=arm GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/victoria-metrics-arm ./app/victoria-metrics +victoria-metrics-linux-arm: + APP_NAME=victoria-metrics CGO_ENABLED=0 GOOS=linux GOARCH=arm $(MAKE) app-local-goos-goarch -victoria-metrics-arm64: - CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/victoria-metrics-arm64 ./app/victoria-metrics +victoria-metrics-linux-arm64: + APP_NAME=victoria-metrics CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(MAKE) app-local-goos-goarch -victoria-metrics-ppc64le: - CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/victoria-metrics-ppc64le ./app/victoria-metrics +victoria-metrics-linux-ppc64le: + APP_NAME=victoria-metrics CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le $(MAKE) app-local-goos-goarch -victoria-metrics-386: - CGO_ENABLED=0 GOOS=linux GOARCH=386 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/victoria-metrics-386 ./app/victoria-metrics +victoria-metrics-linux-386: + APP_NAME=victoria-metrics CGO_ENABLED=0 GOOS=linux GOARCH=386 $(MAKE) app-local-goos-goarch + +victoria-metrics-darwin-amd64: + APP_NAME=victoria-metrics CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(MAKE) app-local-goos-goarch + +victoria-metrics-darwin-arm64: + APP_NAME=victoria-metrics CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 $(MAKE) app-local-goos-goarch + +victoria-metrics-freebsd-amd64: + APP_NAME=victoria-metrics CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 $(MAKE) app-local-goos-goarch + +victoria-metrics-openbsd-amd64: + APP_NAME=victoria-metrics CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 $(MAKE) app-local-goos-goarch victoria-metrics-pure: APP_NAME=victoria-metrics $(MAKE) app-local-pure ### Packaging as DEB - amd64 -victoria-metrics-package-deb: victoria-metrics-prod +victoria-metrics-package-deb-amd64: victoria-metrics-linux-amd64-prod ./package/package_deb.sh amd64 ### Packaging as DEB - arm64 -victoria-metrics-package-deb-arm64: victoria-metrics-arm64-prod +victoria-metrics-package-deb-arm: victoria-metrics-linux-arm-prod + ./package/package_deb.sh arm + +### Packaging as DEB - arm64 +victoria-metrics-package-deb-arm64: victoria-metrics-linux-arm64-prod ./package/package_deb.sh arm64 ### Packaging as DEB - all -victoria-metrics-package-deb-all: \ - victoria-metrics-package-deb \ +victoria-metrics-package-deb: \ + victoria-metrics-package-deb-amd64 \ + victoria-metrics-package-deb-arm \ victoria-metrics-package-deb-arm64 ### Packaging as RPM - amd64 -victoria-metrics-package-rpm: victoria-metrics-prod +victoria-metrics-package-rpm-amd64: victoria-metrics-linux-amd64-prod ./package/package_rpm.sh amd64 ### Packaging as RPM - arm64 -victoria-metrics-package-rpm-arm64: victoria-metrics-arm64-prod +victoria-metrics-package-rpm-arm64: victoria-metrics-linux-arm64-prod ./package/package_rpm.sh arm64 ### Packaging as RPM - all -victoria-metrics-package-rpm-all: \ - victoria-metrics-package-rpm \ +victoria-metrics-package-rpm: \ + victoria-metrics-package-rpm-amd64 \ victoria-metrics-package-rpm-arm64 ### Packaging as both DEB and RPM - all -victoria-metrics-package-deb-rpm-all: \ +victoria-metrics-package-deb-rpm: \ victoria-metrics-package-deb \ - victoria-metrics-package-deb-arm64 \ - victoria-metrics-package-rpm \ - victoria-metrics-package-rpm-arm64 - -### Packaging as snap -victoria-metrics-package-snap: - which snapcraft || snap install snapcraft - which multipass || snap install multipass - snapcraft - + victoria-metrics-package-rpm diff --git a/app/vmagent/Makefile b/app/vmagent/Makefile index 8a7bd2f34..626ffcc5a 100644 --- a/app/vmagent/Makefile +++ b/app/vmagent/Makefile @@ -1,6 +1,5 @@ # All these commands must run from repository root. -# Application build vmagent: APP_NAME=vmagent $(MAKE) app-local @@ -13,36 +12,36 @@ vmagent-prod: vmagent-pure-prod: APP_NAME=vmagent $(MAKE) app-via-docker-pure -# GOOS=linux vmagent-linux-amd64-prod: APP_NAME=vmagent $(MAKE) app-via-docker-linux-amd64 -vmagent-linux-arm64-prod: - APP_NAME=vmagent $(MAKE) app-via-docker-linux-arm64 - vmagent-linux-arm-prod: APP_NAME=vmagent $(MAKE) app-via-docker-linux-arm -#GOOS=darwin +vmagent-linux-arm64-prod: + APP_NAME=vmagent $(MAKE) app-via-docker-linux-arm64 + +vmagent-linux-ppc64le-prod: + APP_NAME=vmagent $(MAKE) app-via-docker-linux-ppc64le + +vmagent-linux-386-prod: + APP_NAME=vmagent $(MAKE) app-via-docker-linux-386 + vmagent-darwin-amd64-prod: APP_NAME=vmagent $(MAKE) app-via-docker-darwin-amd64 vmagent-darwin-arm64-prod: APP_NAME=vmagent $(MAKE) app-via-docker-darwin-arm64 -#GOOS=windows +vmagent-freebsd-amd64-prod: + APP_NAME=vmagent $(MAKE) app-via-docker-freebsd-amd64 + +vmagent-openbsd-amd64-prod: + APP_NAME=vmagent $(MAKE) app-via-docker-openbsd-amd64 + vmagent-windows-amd64-prod: APP_NAME=vmagent $(MAKE) app-via-docker-windows-amd64 -# GOARCH=ppc64le -vmagent-ppc64le-prod: - APP_NAME=vmagent $(MAKE) app-via-docker-ppc64le - -# GOARCH=386 -vmagent-386-prod: - APP_NAME=vmagent $(MAKE) app-via-docker-386 - -# Package build package-vmagent: APP_NAME=vmagent $(MAKE) package-via-docker @@ -74,26 +73,35 @@ run-vmagent: APP_NAME=vmagent \ $(MAKE) run-via-docker -vmagent-amd64: - CGO_ENABLED=1 GOARCH=amd64 $(MAKE) vmagent-local-with-goarch +vmagent-linux-amd64: + APP_NAME=vmagent CGO_ENABLED=1 GOOS=linux GOARCH=amd64 $(MAKE) app-local-goos-goarch -vmagent-arm: - CGO_ENABLED=0 GOARCH=arm $(MAKE) vmagent-local-with-goarch +vmagent-linux-arm: + APP_NAME=vmagent CGO_ENABLED=0 GOOS=linux GOARCH=arm $(MAKE) app-local-goos-goarch -vmagent-arm64: - CGO_ENABLED=0 GOARCH=arm64 $(MAKE) vmagent-local-with-goarch +vmagent-linux-arm64: + APP_NAME=vmagent CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(MAKE) app-local-goos-goarch -vmagent-ppc64le: - CGO_ENABLED=0 GOARCH=ppc64le $(MAKE) vmagent-local-with-goarch +vmagent-linux-ppc64le: + APP_NAME=vmagent CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le $(MAKE) app-local-goos-goarch -vmagent-386: - CGO_ENABLED=0 GOARCH=386 $(MAKE) vmagent-local-with-goarch +vmagent-linux-386: + APP_NAME=vmagent CGO_ENABLED=0 GOOS=linux GOARCH=386 $(MAKE) app-local-goos-goarch -vmagent-local-with-goarch: - APP_NAME=vmagent $(MAKE) app-local-with-goarch +vmagent-darwin-amd64: + APP_NAME=vmagent CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmagent-darwin-arm64: + APP_NAME=vmagent CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 $(MAKE) app-local-goos-goarch + +vmagent-freebsd-amd64: + APP_NAME=vmagent CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmagent-openbsd-amd64: + APP_NAME=vmagent CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmagent-windows-amd64: + GOARCH=amd64 APP_NAME=vmagent $(MAKE) app-local-windows-goarch vmagent-pure: APP_NAME=vmagent $(MAKE) app-local-pure - -vmagent-windows-amd64: - GOARCH=amd64 APP_NAME=vmagent $(MAKE) app-local-windows-with-goarch diff --git a/app/vmagent/README.md b/app/vmagent/README.md index fbbf67956..8b6296aaa 100644 --- a/app/vmagent/README.md +++ b/app/vmagent/README.md @@ -817,8 +817,8 @@ ARM build may run on Raspberry Pi or on [energy-efficient ARM servers](https://b ### Development ARM build 1. [Install Go](https://golang.org/doc/install). The minimum supported version is Go 1.17. -2. Run `make vmagent-arm` or `make vmagent-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics) - It builds `vmagent-arm` or `vmagent-arm64` binary respectively and puts it into the `bin` folder. +2. Run `make vmagent-linux-arm` or `make vmagent-linux-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics) + It builds `vmagent-linux-arm` or `vmagent-linux-arm64` binary respectively and puts it into the `bin` folder. ### Production ARM build diff --git a/app/vmalert/Makefile b/app/vmalert/Makefile index 928a5dbe2..aed0abed3 100644 --- a/app/vmalert/Makefile +++ b/app/vmalert/Makefile @@ -1,6 +1,5 @@ # All these commands must run from repository root. -# Application build vmalert: APP_NAME=vmalert $(MAKE) app-local @@ -13,36 +12,36 @@ vmalert-prod: vmalert-pure-prod: APP_NAME=vmalert $(MAKE) app-via-docker-pure -# GOOS=linux vmalert-linux-amd64-prod: APP_NAME=vmalert $(MAKE) app-via-docker-linux-amd64 -vmalert-linux-arm64-prod: - APP_NAME=vmalert $(MAKE) app-via-docker-linux-arm64 - vmalert-linux-arm-prod: APP_NAME=vmalert $(MAKE) app-via-docker-linux-arm -# GOOS=darwin +vmalert-linux-arm64-prod: + APP_NAME=vmalert $(MAKE) app-via-docker-linux-arm64 + +vmalert-linux-ppc64le-prod: + APP_NAME=vmalert $(MAKE) app-via-docker-linux-ppc64le + +vmalert-linux-386-prod: + APP_NAME=vmalert $(MAKE) app-via-docker-linux-386 + vmalert-darwin-amd64-prod: APP_NAME=vmalert $(MAKE) app-via-docker-darwin-amd64 vmalert-darwin-arm64-prod: APP_NAME=vmalert $(MAKE) app-via-docker-darwin-arm64 -# GOOS=windows +vmalert-freebsd-amd64-prod: + APP_NAME=vmalert $(MAKE) app-via-docker-freebsd-amd64 + +vmalert-openbsd-amd64-prod: + APP_NAME=vmalert $(MAKE) app-via-docker-openbsd-amd64 + vmalert-windows-amd64-prod: APP_NAME=vmalert $(MAKE) app-via-docker-windows-amd64 -# GOARCH=ppc64le -vmalert-ppc64le-prod: - APP_NAME=vmalert $(MAKE) app-via-docker-ppc64le - -# GOARCH=386 -vmalert-386-prod: - APP_NAME=vmalert $(MAKE) app-via-docker-386 - -# Package build package-vmalert: APP_NAME=vmalert $(MAKE) package-via-docker @@ -103,26 +102,35 @@ replay-vmalert: vmalert -replay.timeFrom=2021-05-11T07:21:43Z \ -replay.timeTo=2021-05-29T18:40:43Z -vmalert-amd64: - CGO_ENABLED=1 GOARCH=amd64 $(MAKE) vmalert-local-with-goarch +vmalert-linux-amd64: + APP_NAME=vmalert CGO_ENABLED=1 GOOS=linux GOARCH=amd64 $(MAKE) app-local-goos-goarch -vmalert-arm: - CGO_ENABLED=0 GOARCH=arm $(MAKE) vmalert-local-with-goarch +vmalert-linux-arm: + APP_NAME=vmalert CGO_ENABLED=0 GOOS=linux GOARCH=arm $(MAKE) app-local-goos-goarch -vmalert-arm64: - CGO_ENABLED=0 GOARCH=arm64 $(MAKE) vmalert-local-with-goarch +vmalert-linux-arm64: + APP_NAME=vmalert CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(MAKE) app-local-goos-goarch -vmalert-ppc64le: - CGO_ENABLED=0 GOARCH=ppc64le $(MAKE) vmalert-local-with-goarch +vmalert-linux-ppc64le: + APP_NAME=vmalert CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le $(MAKE) app-local-goos-goarch -vmalert-386: - CGO_ENABLED=0 GOARCH=386 $(MAKE) vmalert-local-with-goarch +vmalert-linux-386: + APP_NAME=vmalert CGO_ENABLED=0 GOOS=linux GOARCH=386 $(MAKE) app-local-goos-goarch -vmalert-local-with-goarch: - APP_NAME=vmalert $(MAKE) app-local-with-goarch +vmalert-darwin-amd64: + APP_NAME=vmalert CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmalert-darwin-arm64: + APP_NAME=vmalert CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 $(MAKE) app-local-goos-goarch + +vmalert-freebsd-amd64: + APP_NAME=vmalert CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmalert-openbsd-amd64: + APP_NAME=vmalert CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmalert-windows-amd64: + GOARCH=amd64 APP_NAME=vmalert $(MAKE) app-local-windows-goarch vmalert-pure: APP_NAME=vmalert $(MAKE) app-local-pure - -vmalert-windows-amd64: - GOARCH=amd64 APP_NAME=vmalert $(MAKE) app-local-windows-with-goarch diff --git a/app/vmalert/README.md b/app/vmalert/README.md index ac0b2e47b..10021afb5 100644 --- a/app/vmalert/README.md +++ b/app/vmalert/README.md @@ -1108,8 +1108,8 @@ ARM build may run on Raspberry Pi or on [energy-efficient ARM servers](https://b ### Development ARM build 1. [Install Go](https://golang.org/doc/install). The minimum supported version is Go 1.17. -2. Run `make vmalert-arm` or `make vmalert-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). - It builds `vmalert-arm` or `vmalert-arm64` binary respectively and puts it into the `bin` folder. +2. Run `make vmalert-linux-arm` or `make vmalert-linux-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). + It builds `vmalert-linux-arm` or `vmalert-linux-arm64` binary respectively and puts it into the `bin` folder. ### Production ARM build diff --git a/app/vmauth/Makefile b/app/vmauth/Makefile index dc4f72ea8..fc40c33ef 100644 --- a/app/vmauth/Makefile +++ b/app/vmauth/Makefile @@ -1,6 +1,5 @@ # All these commands must run from repository root. -# Application build vmauth: APP_NAME=vmauth $(MAKE) app-local @@ -13,36 +12,36 @@ vmauth-prod: vmauth-pure-prod: APP_NAME=vmauth $(MAKE) app-via-docker-pure -# GOOS=linux vmauth-linux-amd64-prod: APP_NAME=vmauth $(MAKE) app-via-docker-linux-amd64 -vmauth-linux-arm64-prod: - APP_NAME=vmauth $(MAKE) app-via-docker-linux-arm64 - vmauth-linux-arm-prod: APP_NAME=vmauth $(MAKE) app-via-docker-linux-arm -# GOOS=darwin +vmauth-linux-arm64-prod: + APP_NAME=vmauth $(MAKE) app-via-docker-linux-arm64 + +vmauth-linux-ppc64le-prod: + APP_NAME=vmauth $(MAKE) app-via-docker-linux-ppc64le + +vmauth-linux-386-prod: + APP_NAME=vmauth $(MAKE) app-via-docker-linux-386 + vmauth-darwin-amd64-prod: APP_NAME=vmauth $(MAKE) app-via-docker-darwin-amd64 vmauth-darwin-arm64-prod: APP_NAME=vmauth $(MAKE) app-via-docker-darwin-arm64 -# GOOS=windows +vmauth-freebsd-amd64-prod: + APP_NAME=vmauth $(MAKE) app-via-docker-freebsd-amd64 + +vmauth-openbsd-amd64-prod: + APP_NAME=vmauth $(MAKE) app-via-docker-openbsd-amd64 + vmauth-windows-amd64-prod: APP_NAME=vmauth $(MAKE) app-via-docker-windows-amd64 -# GOARCH=ppc64le -vmauth-ppc64le-prod: - APP_NAME=vmauth $(MAKE) app-via-docker-ppc64le - -# GOARCH=386 -vmauth-386-prod: - APP_NAME=vmauth $(MAKE) app-via-docker-386 - -# Package build package-vmauth: APP_NAME=vmauth $(MAKE) package-via-docker @@ -73,26 +72,35 @@ run-vmauth: ARGS='-auth.config=app/vmauth/example_config.yml' \ $(MAKE) run-via-docker -vmauth-amd64: - CGO_ENABLED=1 GOARCH=amd64 $(MAKE) vmauth-local-with-goarch +vmauth-linux-amd64: + APP_NAME=vmauth CGO_ENABLED=1 GOOS=linux GOARCH=amd64 $(MAKE) app-local-goos-goarch -vmauth-arm: - CGO_ENABLED=0 GOARCH=arm $(MAKE) vmauth-local-with-goarch +vmauth-linux-arm: + APP_NAME=vmauth CGO_ENABLED=0 GOOS=linux GOARCH=arm $(MAKE) app-local-goos-goarch -vmauth-arm64: - CGO_ENABLED=0 GOARCH=arm64 $(MAKE) vmauth-local-with-goarch +vmauth-linux-arm64: + APP_NAME=vmauth CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(MAKE) app-local-goos-goarch -vmauth-ppc64le: - CGO_ENABLED=0 GOARCH=ppc64le $(MAKE) vmauth-local-with-goarch +vmauth-linux-ppc64le: + APP_NAME=vmauth CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le $(MAKE) app-local-goos-goarch -vmauth-386: - CGO_ENABLED=0 GOARCH=386 $(MAKE) vmauth-local-with-goarch +vmauth-linux-386: + APP_NAME=vmauth CGO_ENABLED=0 GOOS=linux GOARCH=386 $(MAKE) app-local-goos-goarch -vmauth-local-with-goarch: - APP_NAME=vmauth $(MAKE) app-local-with-goarch +vmauth-darwin-amd64: + APP_NAME=vmauth CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmauth-darwin-arm64: + APP_NAME=vmauth CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 $(MAKE) app-local-goos-goarch + +vmauth-freebsd-amd64: + APP_NAME=vmauth CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmauth-openbsd-amd64: + APP_NAME=vmauth CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmauth-windows-amd64: + GOARCH=amd64 APP_NAME=vmauth $(MAKE) app-local-windows-goarch vmauth-pure: APP_NAME=vmauth $(MAKE) app-local-pure - -vmauth-windows-amd64: - GOARCH=amd64 APP_NAME=vmauth $(MAKE) app-local-windows-with-goarch diff --git a/app/vmbackup/Makefile b/app/vmbackup/Makefile index 6dca898c9..83bd11b9e 100644 --- a/app/vmbackup/Makefile +++ b/app/vmbackup/Makefile @@ -1,6 +1,5 @@ # All these commands must run from repository root. -# Application build vmbackup: APP_NAME=vmbackup $(MAKE) app-local @@ -13,32 +12,33 @@ vmbackup-prod: vmbackup-pure-prod: APP_NAME=vmbackup $(MAKE) app-via-docker-pure -# GOOS=linux vmbackup-linux-amd64-prod: APP_NAME=vmbackup $(MAKE) app-via-docker-linux-amd64 -vmbackup-linux-arm64-prod: - APP_NAME=vmbackup $(MAKE) app-via-docker-linux-arm64 - vmbackup-linux-arm-prod: APP_NAME=vmbackup $(MAKE) app-via-docker-linux-arm -# GOOS=darwin +vmbackup-linux-arm64-prod: + APP_NAME=vmbackup $(MAKE) app-via-docker-linux-arm64 + +vmbackup-linux-ppc64le-prod: + APP_NAME=vmbackup $(MAKE) app-via-docker-linux-ppc64le + +vmbackup-linux-386-prod: + APP_NAME=vmbackup $(MAKE) app-via-docker-linux-386 + vmbackup-darwin-amd64-prod: APP_NAME=vmbackup $(MAKE) app-via-docker-darwin-amd64 vmbackup-darwin-arm64-prod: APP_NAME=vmbackup $(MAKE) app-via-docker-darwin-arm64 -# GOARCH=ppc64le -vmbackup-ppc64le-prod: - APP_NAME=vmbackup $(MAKE) app-via-docker-ppc64le +vmbackup-freebsd-amd64-prod: + APP_NAME=vmbackup $(MAKE) app-via-docker-freebsd-amd64 -# GOARCH=386 -vmbackup-386-prod: - APP_NAME=vmbackup $(MAKE) app-via-docker-386 +vmbackup-openbsd-amd64-prod: + APP_NAME=vmbackup $(MAKE) app-via-docker-openbsd-amd64 -# Package build package-vmbackup: APP_NAME=vmbackup $(MAKE) package-via-docker @@ -63,23 +63,32 @@ package-vmbackup-386: publish-vmbackup: APP_NAME=vmbackup $(MAKE) publish-via-docker -vmbackup-amd64: - CGO_ENABLED=1 GOARCH=amd64 $(MAKE) vmbackup-local-with-goarch +vmbackup-linux-amd64: + APP_NAME=vmbackup CGO_ENABLED=1 GOOS=linux GOARCH=amd64 $(MAKE) app-local-goos-goarch -vmbackup-arm: - CGO_ENABLED=0 GOARCH=arm $(MAKE) vmbackup-local-with-goarch +vmbackup-linux-arm: + APP_NAME=vmbackup CGO_ENABLED=0 GOOS=linux GOARCH=arm $(MAKE) app-local-goos-goarch -vmbackup-arm64: - CGO_ENABLED=0 GOARCH=arm64 $(MAKE) vmbackup-local-with-goarch +vmbackup-linux-arm64: + APP_NAME=vmbackup CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(MAKE) app-local-goos-goarch -vmbackup-ppc64le: - CGO_ENABLED=0 GOARCH=ppc64le $(MAKE) vmbackup-local-with-goarch +vmbackup-linux-ppc64le: + APP_NAME=vmbackup CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le $(MAKE) app-local-goos-goarch -vmbackup-386: - CGO_ENABLED=0 GOARCH=386 $(MAKE) vmbackup-local-with-goarch +vmbackup-linux-386: + APP_NAME=vmbackup CGO_ENABLED=0 GOOS=linux GOARCH=386 $(MAKE) app-local-goos-goarch -vmbackup-local-with-goarch: - APP_NAME=vmbackup $(MAKE) app-local-with-goarch +vmbackup-darwin-amd64: + APP_NAME=vmbackup CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmbackup-darwin-arm64: + APP_NAME=vmbackup CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 $(MAKE) app-local-goos-goarch + +vmbackup-freebsd-amd64: + APP_NAME=vmbackup CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmbackup-openbsd-amd64: + APP_NAME=vmbackup CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 $(MAKE) app-local-goos-goarch vmbackup-pure: APP_NAME=vmbackup $(MAKE) app-local-pure diff --git a/app/vmctl/Makefile b/app/vmctl/Makefile index 33475df24..c708b19d6 100644 --- a/app/vmctl/Makefile +++ b/app/vmctl/Makefile @@ -1,6 +1,5 @@ # All these commands must run from repository root. -# Application build vmctl: APP_NAME=vmctl $(MAKE) app-local @@ -13,36 +12,36 @@ vmctl-prod: vmctl-pure-prod: APP_NAME=vmctl $(MAKE) app-via-docker-pure -# GOOS=linux vmctl-linux-amd64-prod: APP_NAME=vmctl $(MAKE) app-via-docker-linux-amd64 -vmctl-linux-arm64-prod: - APP_NAME=vmctl $(MAKE) app-via-docker-linux-arm64 - vmctl-linux-arm-prod: APP_NAME=vmctl $(MAKE) app-via-docker-linux-arm -# GOOS=darwin +vmctl-linux-arm64-prod: + APP_NAME=vmctl $(MAKE) app-via-docker-linux-arm64 + +vmctl-linux-ppc64le-prod: + APP_NAME=vmctl $(MAKE) app-via-docker-linux-ppc64le + +vmctl-linux-386-prod: + APP_NAME=vmctl $(MAKE) app-via-docker-linux-386 + vmctl-darwin-amd64-prod: APP_NAME=vmctl $(MAKE) app-via-docker-darwin-amd64 vmctl-darwin-arm64-prod: APP_NAME=vmctl $(MAKE) app-via-docker-darwin-arm64 -# GOOS=window +vmctl-freebsd-amd64-prod: + APP_NAME=vmctl $(MAKE) app-via-docker-freebsd-amd64 + +vmctl-openbsd-amd64-prod: + APP_NAME=vmctl $(MAKE) app-via-docker-openbsd-amd64 + vmctl-windows-amd64-prod: APP_NAME=vmctl $(MAKE) app-via-docker-windows-amd64 -# GOARCH=ppc64le -vmctl-ppc64le-prod: - APP_NAME=vmctl $(MAKE) app-via-docker-ppc64le - -# GOARCH=386 -vmctl-386-prod: - APP_NAME=vmctl $(MAKE) app-via-docker-386 - -# Package build package-vmctl: APP_NAME=vmctl $(MAKE) package-via-docker @@ -67,27 +66,35 @@ package-vmctl-386: publish-vmctl: APP_NAME=vmctl $(MAKE) publish-via-docker -vmctl-amd64: - CGO_ENABLED=1 GOARCH=amd64 $(MAKE) vmctl-local-with-goarch +vmctl-linux-amd64: + APP_NAME=vmctl CGO_ENABLED=1 GOOS=linux GOARCH=amd64 $(MAKE) app-local-goos-goarch -vmctl-arm: - CGO_ENABLED=0 GOARCH=arm $(MAKE) vmctl-local-with-goarch +vmctl-linux-arm: + APP_NAME=vmctl CGO_ENABLED=0 GOOS=linux GOARCH=arm $(MAKE) app-local-goos-goarch -vmctl-arm64: - CGO_ENABLED=0 GOARCH=arm64 $(MAKE) vmctl-local-with-goarch +vmctl-linux-arm64: + APP_NAME=vmctl CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(MAKE) app-local-goos-goarch -vmctl-ppc64le: - CGO_ENABLED=0 GOARCH=ppc64le $(MAKE) vmctl-local-with-goarch +vmctl-linux-ppc64le: + APP_NAME=vmctl CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le $(MAKE) app-local-goos-goarch -vmctl-386: - CGO_ENABLED=0 GOARCH=386 $(MAKE) vmctl-local-with-goarch +vmctl-linux-386: + APP_NAME=vmctl CGO_ENABLED=0 GOOS=linux GOARCH=386 $(MAKE) app-local-goos-goarch -vmctl-local-with-goarch: - APP_NAME=vmctl $(MAKE) app-local-with-goarch +vmctl-darwin-amd64: + APP_NAME=vmctl CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmctl-darwin-arm64: + APP_NAME=vmctl CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 $(MAKE) app-local-goos-goarch + +vmctl-freebsd-amd64: + APP_NAME=vmctl CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmctl-openbsd-amd64: + APP_NAME=vmctl CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmctl-windows-amd64: + GOARCH=amd64 APP_NAME=vmctl $(MAKE) app-local-windows-goarch vmctl-pure: APP_NAME=vmctl $(MAKE) app-local-pure - -vmctl-windows-amd64: - GOARCH=amd64 APP_NAME=vmctl $(MAKE) app-local-windows-with-goarch - diff --git a/app/vmctl/README.md b/app/vmctl/README.md index 63ea083ee..fc2b1be05 100644 --- a/app/vmctl/README.md +++ b/app/vmctl/README.md @@ -16,7 +16,7 @@ To see the full list of supported modes run the following command: ```console -$ ./vmctl --help +$ ./vmctl --help NAME: vmctl - VictoriaMetrics command-line tool @@ -40,9 +40,9 @@ OPTIONS: --influx-addr value InfluxDB server addr (default: "http://localhost:8086") --influx-user value InfluxDB user [$INFLUX_USERNAME] ... - --vm-addr vmctl VictoriaMetrics address to perform import requests. -Should be the same as --httpListenAddr value for single-node version or vminsert component. -When importing into the clustered version do not forget to set additionally --vm-account-id flag. + --vm-addr vmctl VictoriaMetrics address to perform import requests. +Should be the same as --httpListenAddr value for single-node version or vminsert component. +When importing into the clustered version do not forget to set additionally --vm-account-id flag. Please note, that vmctl performs initial readiness check for the given address by checking `/health` endpoint. (default: "http://localhost:8428") --vm-user value VictoriaMetrics username for basic auth [$VM_USERNAME] --vm-password value VictoriaMetrics password for basic auth [$VM_PASSWORD] @@ -107,7 +107,7 @@ $ ./vmctl opentsdb --otsdb-addr http://opentsdb:4242/ --otsdb-retentions sum-1m- OpenTSDB import mode 2021/04/09 11:52:50 Will collect data starting at TS 1617990770 2021/04/09 11:52:50 Loading all metrics from OpenTSDB for filters: [system] -Found 9 metrics to import. Continue? [Y/n] +Found 9 metrics to import. Continue? [Y/n] 2021/04/09 11:52:51 Starting work on system.load1 23 / 402200 [>____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________] 0.01% 2 p/s ``` @@ -280,7 +280,7 @@ InfluxDB import mode 2020/01/26 14:23:29 fetching fields: command: "show field keys"; database: "benchmark"; retention: "autogen" 2020/01/26 14:23:29 found 12 fields 2020/01/26 14:23:29 fetching series: command: "show series on benchmark from cpu where hostname='host_1703'"; database: "benchmark"; retention: "autogen" -Found 10 timeseries to import. Continue? [Y/n] +Found 10 timeseries to import. Continue? [Y/n] ``` The timeseries select query would be following: @@ -499,10 +499,10 @@ processed and can't show the progress bar. It will show the current processing s --vm-native-filter-match='{job="vmagent"}' \ --vm-native-filter-time-start='2020-01-01T20:07:00Z' VictoriaMetrics Native import mode -Initing export pipe from "http://localhost:8528" with filters: +Initing export pipe from "http://localhost:8528" with filters: filter: match[]={job="vmagent"} Initing import process to "http://localhost:8428": -Total: 336.75 KiB ↖ Speed: 454.46 KiB p/s +Total: 336.75 KiB ↖ Speed: 454.46 KiB p/s 2020/10/13 17:04:59 Total time: 952.143376ms ``` @@ -524,7 +524,7 @@ and specify `accountID` param. ## Verifying exported blocks from VictoriaMetrics -In this mode, `vmctl` allows verifying correctness and integrity of data exported via [native format](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#how-to-export-data-in-native-format) from VictoriaMetrics. +In this mode, `vmctl` allows verifying correctness and integrity of data exported via [native format](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#how-to-export-data-in-native-format) from VictoriaMetrics. You can verify exported data at disk before uploading it by `vmctl verify-block` command: ```console @@ -661,8 +661,8 @@ ARM build may run on Raspberry Pi or on [energy-efficient ARM servers](https://b #### Development ARM build 1. [Install Go](https://golang.org/doc/install). The minimum supported version is Go 1.17. -2. Run `make vmctl-arm` or `make vmctl-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). - It builds `vmctl-arm` or `vmctl-arm64` binary respectively and puts it into the `bin` folder. +2. Run `make vmctl-linux-arm` or `make vmctl-linux-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). + It builds `vmctl-linux-arm` or `vmctl-linux-arm64` binary respectively and puts it into the `bin` folder. #### Production ARM build diff --git a/app/vmrestore/Makefile b/app/vmrestore/Makefile index e6f6f424a..49aa5e2d4 100644 --- a/app/vmrestore/Makefile +++ b/app/vmrestore/Makefile @@ -1,6 +1,5 @@ # All these commands must run from repository root. -# Application build vmrestore: APP_NAME=vmrestore $(MAKE) app-local @@ -13,32 +12,33 @@ vmrestore-prod: vmrestore-pure-prod: APP_NAME=vmrestore $(MAKE) app-via-docker-pure -# GOOS=linux vmrestore-linux-amd64-prod: APP_NAME=vmrestore $(MAKE) app-via-docker-linux-amd64 -vmrestore-linux-arm64-prod: - APP_NAME=vmrestore $(MAKE) app-via-docker-linux-arm64 - vmrestore-linux-arm-prod: APP_NAME=vmrestore $(MAKE) app-via-docker-linux-arm -# GOOS=darwin +vmrestore-linux-arm64-prod: + APP_NAME=vmrestore $(MAKE) app-via-docker-linux-arm64 + +vmrestore-linux-ppc64le-prod: + APP_NAME=vmrestore $(MAKE) app-via-docker-linux-ppc64le + +vmrestore-linux-386-prod: + APP_NAME=vmrestore $(MAKE) app-via-docker-linux-386 + vmrestore-darwin-amd64-prod: APP_NAME=vmrestore $(MAKE) app-via-docker-darwin-amd64 vmrestore-darwin-arm64-prod: APP_NAME=vmrestore $(MAKE) app-via-docker-darwin-arm64 -# GOARCH=ppc64le -vmrestore-ppc64le-prod: - APP_NAME=vmrestore $(MAKE) app-via-docker-ppc64le +vmrestore-freebsd-amd64-prod: + APP_NAME=vmrestore $(MAKE) app-via-docker-freebsd-amd64 -# GOARCH=386 -vmrestore-386-prod: - APP_NAME=vmrestore $(MAKE) app-via-docker-386 +vmrestore-openbsd-amd64-prod: + APP_NAME=vmrestore $(MAKE) app-via-docker-openbsd-amd64 -# Package build package-vmrestore: APP_NAME=vmrestore $(MAKE) package-via-docker @@ -63,23 +63,32 @@ package-vmrestore-386: publish-vmrestore: APP_NAME=vmrestore $(MAKE) publish-via-docker -vmrestore-amd64: - CGO_ENABLED=1 GOARCH=amd64 $(MAKE) vmrestore-local-with-goarch +vmrestore-linux-amd64: + APP_NAME=vmrestore CGO_ENABLED=1 GOOS=linux GOARCH=amd64 $(MAKE) app-local-goos-goarch -vmrestore-arm: - CGO_ENABLED=0 GOARCH=arm $(MAKE) vmrestore-local-with-goarch +vmrestore-linux-arm: + APP_NAME=vmrestore CGO_ENABLED=0 GOOS=linux GOARCH=arm $(MAKE) app-local-goos-goarch -vmrestore-arm64: - CGO_ENABLED=0 GOARCH=arm64 $(MAKE) vmrestore-local-with-goarch +vmrestore-linux-arm64: + APP_NAME=vmrestore CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(MAKE) app-local-goos-goarch -vmrestore-ppc64le: - CGO_ENABLED=0 GOARCH=ppc64le $(MAKE) vmrestore-local-with-goarch +vmrestore-linux-ppc64le: + APP_NAME=vmrestore CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le $(MAKE) app-local-goos-goarch -vmrestore-386: - CGO_ENABLED=0 GOARCH=386 $(MAKE) vmrestore-local-with-goarch +vmrestore-linux-386: + APP_NAME=vmrestore CGO_ENABLED=0 GOOS=linux GOARCH=386 $(MAKE) app-local-goos-goarch -vmrestore-local-with-goarch: - APP_NAME=vmrestore $(MAKE) app-local-with-goarch +vmrestore-darwin-amd64: + APP_NAME=vmrestore CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmrestore-darwin-arm64: + APP_NAME=vmrestore CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 $(MAKE) app-local-goos-goarch + +vmrestore-freebsd-amd64: + APP_NAME=vmrestore CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 $(MAKE) app-local-goos-goarch + +vmrestore-openbsd-amd64: + APP_NAME=vmrestore CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 $(MAKE) app-local-goos-goarch vmrestore-pure: APP_NAME=vmrestore $(MAKE) app-local-pure diff --git a/app/vmui/Dockerfile-web b/app/vmui/Dockerfile-web index c0a863fb1..7816b58bb 100644 --- a/app/vmui/Dockerfile-web +++ b/app/vmui/Dockerfile-web @@ -3,8 +3,8 @@ COPY build /build WORKDIR /build COPY web/ /build/ -RUN GOOS=linux GOARCH=amd64 GO111MODULE=on CGO_ENABLED=0 go build -o web-amd64 github.com/VictoriMetrics/vmui/ && \ - GOOS=windows GOARCH=amd64 GO111MODULE=on CGO_ENABLED=0 go build -o web-windows github.com/VictoriMetrics/vmui/ +RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o web-amd64 github.com/VictoriMetrics/vmui/ && \ + GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o web-windows github.com/VictoriMetrics/vmui/ FROM alpine:3.16.0 USER root diff --git a/deployment/docker/Makefile b/deployment/docker/Makefile index a154e87ee..7ceff85f8 100644 --- a/deployment/docker/Makefile +++ b/deployment/docker/Makefile @@ -31,7 +31,6 @@ app-via-docker: package-builder -w /VictoriaMetrics \ --mount type=bind,src="$(shell pwd)/gocache-for-docker",dst=/gocache \ --env GOCACHE=/gocache \ - --env GO111MODULE=on \ $(DOCKER_OPTS) \ $(BUILDER_IMAGE) \ go build $(RACE) -mod=vendor -trimpath -buildvcs=false \ @@ -47,7 +46,6 @@ app-via-docker-windows: package-builder -w /VictoriaMetrics \ --mount type=bind,src="$(shell pwd)/gocache-for-docker",dst=/gocache \ --env GOCACHE=/gocache \ - --env GO111MODULE=on \ $(DOCKER_OPTS) \ $(BUILDER_IMAGE) \ go build $(RACE) -mod=vendor -trimpath -buildvcs=false \ @@ -65,16 +63,11 @@ package-via-docker: package-base -f app/$(APP_NAME)/deployment/Dockerfile bin) publish-via-docker: \ - app-via-docker-amd64 \ app-via-docker-linux-amd64 \ - app-via-docker-darwin-amd64 \ - app-via-docker-arm \ app-via-docker-linux-arm \ - app-via-docker-arm64 \ app-via-docker-linux-arm64 \ - app-via-docker-darwin-arm64 \ - app-via-docker-ppc64le \ - app-via-docker-386 + app-via-docker-linux-ppc64le \ + app-via-docker-linux-386 docker buildx build \ --platform=linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/386 \ --build-arg certs_image=$(CERTS_IMAGE) \ @@ -94,71 +87,51 @@ run-via-docker: package-via-docker $(DOCKER_OPTS) \ $(DOCKER_NAMESPACE)/$(APP_NAME):$(PKG_TAG)$(APP_SUFFIX)$(RACE) $(ARGS) -app-via-docker-goarch: - APP_SUFFIX='-$(GOARCH)' \ - DOCKER_OPTS='--env CGO_ENABLED=$(CGO_ENABLED) --env GOOS=linux --env GOARCH=$(GOARCH)' \ +app-via-docker-goos-goarch: + APP_SUFFIX='-$(GOOS)-$(GOARCH)' \ + DOCKER_OPTS='--env CGO_ENABLED=$(CGO_ENABLED) --env GOOS=$(GOOS) --env GOARCH=$(GOARCH)' \ $(MAKE) app-via-docker +app-via-docker-pure: + APP_SUFFIX='-pure' DOCKER_OPTS='--env CGO_ENABLED=0' $(MAKE) app-via-docker + +app-via-docker-linux-amd64: + CGO_ENABLED=1 GOOS=linux GOARCH=amd64 $(MAKE) app-via-docker-goos-goarch + +app-via-docker-linux-arm: + CGO_ENABLED=0 GOOS=linux GOARCH=arm $(MAKE) app-via-docker-goos-goarch + +app-via-docker-linux-arm64: +ifeq ($(APP_NAME),vmagent) + CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(MAKE) app-via-docker-goos-goarch +else + APP_SUFFIX='-linux-arm64' \ + DOCKER_OPTS='--env CGO_ENABLED=1 --env GOOS=linux --env GOARCH=arm64 --env CC=/opt/cross-builder/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc' \ + $(MAKE) app-via-docker +endif + +app-via-docker-linux-ppc64le: + CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le $(MAKE) app-via-docker-goos-goarch + +app-via-docker-linux-386: + CGO_ENABLED=0 GOOS=linux GOARCH=386 $(MAKE) app-via-docker-goos-goarch + app-via-docker-darwin-amd64: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(MAKE) app-via-docker-goos-goarch app-via-docker-darwin-arm64: CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 $(MAKE) app-via-docker-goos-goarch -app-via-docker-linux-amd64: - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(MAKE) app-via-docker-goos-goarch +app-via-docker-freebsd-amd64: + CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 $(MAKE) app-via-docker-goos-goarch -app-via-docker-linux-arm64: - CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(MAKE) app-via-docker-goos-goarch - -app-via-docker-linux-arm: - CGO_ENABLED=0 GOOS=linux GOARCH=arm $(MAKE) app-via-docker-goos-goarch - -app-via-docker-goos-goarch: - APP_SUFFIX='-$(GOOS)-$(GOARCH)' \ - DOCKER_OPTS='--env CGO_ENABLED=$(CGO_ENABLED) --env GOOS=$(GOOS) --env GOARCH=$(GOARCH)' \ - $(MAKE) app-via-docker - -app-via-docker-goarch-arm64: - APP_SUFFIX='-arm64' \ - DOCKER_OPTS='--env CGO_ENABLED=1 --env GOOS=linux --env GOARCH=arm64 --env CC=/opt/cross-builder/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc' \ - $(MAKE) app-via-docker - -app-via-docker-windows-goarch: - APP_SUFFIX='-$(GOARCH)' \ - DOCKER_OPTS='--env CGO_ENABLED=0 --env GOOS=windows --env GOARCH=$(GOARCH)' \ - $(MAKE) app-via-docker-windows - -app-via-docker-goarch-cgo: - CGO_ENABLED=1 $(MAKE) app-via-docker-goarch - -app-via-docker-goarch-nocgo: - CGO_ENABLED=0 $(MAKE) app-via-docker-goarch - -app-via-docker-pure: - APP_SUFFIX='-pure' DOCKER_OPTS='--env CGO_ENABLED=0' $(MAKE) app-via-docker - -app-via-docker-amd64: - GOARCH=amd64 $(MAKE) app-via-docker-goarch-cgo - -app-via-docker-arm: - GOARCH=arm $(MAKE) app-via-docker-goarch-nocgo - -app-via-docker-arm64: -ifeq ($(APP_NAME),vmagent) - GOARCH=arm64 $(MAKE) app-via-docker-goarch-nocgo -else - $(MAKE) app-via-docker-goarch-arm64 -endif - -app-via-docker-ppc64le: - GOARCH=ppc64le $(MAKE) app-via-docker-goarch-nocgo - -app-via-docker-386: - GOARCH=386 $(MAKE) app-via-docker-goarch-nocgo +app-via-docker-openbsd-amd64: + CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 $(MAKE) app-via-docker-goos-goarch app-via-docker-windows-amd64: - GOARCH=amd64 $(MAKE) app-via-docker-windows-goarch + APP_SUFFIX='-$(GOARCH)' \ + DOCKER_OPTS='--env CGO_ENABLED=0 --env GOOS=windows --env GOARCH=amd64' \ + $(MAKE) app-via-docker-windows package-via-docker-goarch: APP_SUFFIX='-$(GOARCH)' \ diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 1beed2a79..9a312747b 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -15,9 +15,9 @@ The following tip changes can be tested by building VictoriaMetrics components f ## tip -**Update note1:** this release introduces backwards-incompatible changes to `vm_partial_results_total` metric by changing its labels to be consistent with `vm_requests_total` metric. If you use alerting rules or Grafana dashboards, which rely on this metric, then they must be updated. The official dashboards for VictoriaMetrics don't use this metric. -**Update note2:** [vmalert](https://docs.victoriametrics.com/vmalert.html) adds `/vmalert/` prefix to [web urls](https://docs.victoriametrics.com/vmalert.html#web) according to [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2825). This may affect `vmalert` instances with non-empty `-http.pathPrefix` command-line flag. After the update, configuring this flag is no longer needed. Here's [why](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2799#issuecomment-1171392005). -**Update note3:** this release introduces backwards-incompatible changes to communication protocol between `vmselect` and `vmstorage` nodes in cluster version of VictoriaMetrics because of added ability to query `vmselect` data from other `vmselect` nodes - see [these docs](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup), so read requests to `vmselect` will fail until the upgrade is complete. These errors will stop after all the `vmselect` and `vmstorage` nodes are updated to the new release. It is safe to downgrade to previous releases at any time. +**Update note 1:** this release introduces backwards-incompatible changes to `vm_partial_results_total` metric by changing its labels to be consistent with `vm_requests_total` metric. If you use alerting rules or Grafana dashboards, which rely on this metric, then they must be updated. The official dashboards for VictoriaMetrics don't use this metric. +**Update note 2:** [vmalert](https://docs.victoriametrics.com/vmalert.html) adds `/vmalert/` prefix to [web urls](https://docs.victoriametrics.com/vmalert.html#web) according to [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2825). This may affect `vmalert` instances with non-empty `-http.pathPrefix` command-line flag. After the update, configuring this flag is no longer needed. Here's [why](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2799#issuecomment-1171392005). +**Update note 3:** this release introduces backwards-incompatible changes to communication protocol between `vmselect` and `vmstorage` nodes in cluster version of VictoriaMetrics because of added ability to query `vmselect` data from other `vmselect` nodes - see [these docs](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup), so read requests to `vmselect` will fail until the upgrade is complete. These errors will stop after all the `vmselect` and `vmstorage` nodes are updated to the new release. It is safe to downgrade to previous releases at any time. * FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): deprecate alert's status link `/api/v1///status` in favour of `api/v1/alert?group_id=&alert_id="`. The old alert's status link is still supported, but will be removed in future releases. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2825). * FEATURE: [cluster version of VictoriaMetrics](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html): add support for querying lower-level `vmselect` nodes from upper-level `vmselect` nodes. This makes possible to build multi-level cluster setups for global querying view and HA purposes without the need to use [Promxy](https://github.com/jacksontj/promxy). See [these docs](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup) and [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2778). @@ -51,6 +51,9 @@ scrape_configs: * `vm_rows_read_per_series` - the number of raw samples read per queried series. * `vm_series_read_per_query` - the number of series read per query. +* FEATURE: publish binaries for FreeBSD and OpenBSD at [releases page](https://github.com/VictoriaMetrics/VictoriaMetrics/releases). + +* BUGFIX: consistently name binaries at [releases page](https://github.com/VictoriaMetrics/VictoriaMetrics/releases) in the form `$(APP_NAME)-$(GOOS)-$(GOARCH)-$(VERSION).tar.gz`. For example, `victoria-metrics-linux-amd64-v1.79.0.tar.gz`. Previously the `$(GOOS)` part was missing in binaries for Linux. * BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert.html): allow using `__name__` label (aka [metric name](https://prometheus.io/docs/prometheus/latest/querying/basics/#time-series-selectors)) in alerting annotations. For example: {% raw %} diff --git a/docs/README.md b/docs/README.md index 5968a5f37..b7d68a63c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -745,14 +745,14 @@ ARM build may run on Raspberry Pi or on [energy-efficient ARM servers](https://b ### Development ARM build 1. [Install Go](https://golang.org/doc/install). The minimum supported version is Go 1.17. -2. Run `make victoria-metrics-arm` or `make victoria-metrics-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). - It builds `victoria-metrics-arm` or `victoria-metrics-arm64` binary respectively and puts it into the `bin` folder. +2. Run `make victoria-metrics-linux-arm` or `make victoria-metrics-linux-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). + It builds `victoria-metrics-linux-arm` or `victoria-metrics-linux-arm64` binary respectively and puts it into the `bin` folder. ### Production ARM build 1. [Install docker](https://docs.docker.com/install/). -2. Run `make victoria-metrics-arm-prod` or `make victoria-metrics-arm64-prod` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). - It builds `victoria-metrics-arm-prod` or `victoria-metrics-arm64-prod` binary respectively and puts it into the `bin` folder. +2. Run `make victoria-metrics-linux-arm-prod` or `make victoria-metrics-linux-arm64-prod` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). + It builds `victoria-metrics-linux-arm-prod` or `victoria-metrics-linux-arm64-prod` binary respectively and puts it into the `bin` folder. ### Pure Go build (CGO_ENABLED=0) diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index debb26921..4b87e3e35 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -749,14 +749,14 @@ ARM build may run on Raspberry Pi or on [energy-efficient ARM servers](https://b ### Development ARM build 1. [Install Go](https://golang.org/doc/install). The minimum supported version is Go 1.17. -2. Run `make victoria-metrics-arm` or `make victoria-metrics-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). - It builds `victoria-metrics-arm` or `victoria-metrics-arm64` binary respectively and puts it into the `bin` folder. +2. Run `make victoria-metrics-linux-arm` or `make victoria-metrics-linux-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). + It builds `victoria-metrics-linux-arm` or `victoria-metrics-linux-arm64` binary respectively and puts it into the `bin` folder. ### Production ARM build 1. [Install docker](https://docs.docker.com/install/). -2. Run `make victoria-metrics-arm-prod` or `make victoria-metrics-arm64-prod` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). - It builds `victoria-metrics-arm-prod` or `victoria-metrics-arm64-prod` binary respectively and puts it into the `bin` folder. +2. Run `make victoria-metrics-linux-arm-prod` or `make victoria-metrics-linux-arm64-prod` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). + It builds `victoria-metrics-linux-arm-prod` or `victoria-metrics-linux-arm64-prod` binary respectively and puts it into the `bin` folder. ### Pure Go build (CGO_ENABLED=0) diff --git a/docs/vmagent.md b/docs/vmagent.md index 2c21f76c5..362ce8779 100644 --- a/docs/vmagent.md +++ b/docs/vmagent.md @@ -821,8 +821,8 @@ ARM build may run on Raspberry Pi or on [energy-efficient ARM servers](https://b ### Development ARM build 1. [Install Go](https://golang.org/doc/install). The minimum supported version is Go 1.17. -2. Run `make vmagent-arm` or `make vmagent-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics) - It builds `vmagent-arm` or `vmagent-arm64` binary respectively and puts it into the `bin` folder. +2. Run `make vmagent-linux-arm` or `make vmagent-linux-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics) + It builds `vmagent-linux-arm` or `vmagent-linux-arm64` binary respectively and puts it into the `bin` folder. ### Production ARM build diff --git a/docs/vmalert.md b/docs/vmalert.md index 1f0c33c2d..82bc5265d 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -1112,11 +1112,11 @@ ARM build may run on Raspberry Pi or on [energy-efficient ARM servers](https://b ### Development ARM build 1. [Install Go](https://golang.org/doc/install). The minimum supported version is Go 1.17. -2. Run `make vmalert-arm` or `make vmalert-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). - It builds `vmalert-arm` or `vmalert-arm64` binary respectively and puts it into the `bin` folder. +2. Run `make vmalert-linux-arm` or `make vmalert-linux-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). + It builds `vmalert-linux-arm` or `vmalert-linux-arm64` binary respectively and puts it into the `bin` folder. ### Production ARM build 1. [Install docker](https://docs.docker.com/install/). -2. Run `make vmalert-linux-arm-prod` or `make vmalert-arm64-prod` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). - It builds `vmalert-linux-arm-prod` or `vmalert-arm64-prod` binary respectively and puts it into the `bin` folder. +2. Run `make vmalert-linux-arm-prod` or `make vmalert-linux-arm64-prod` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). + It builds `vmalert-linux-arm-prod` or `vmalert-linux-arm64-prod` binary respectively and puts it into the `bin` folder. diff --git a/docs/vmctl.md b/docs/vmctl.md index 42f645dc1..82a7318b3 100644 --- a/docs/vmctl.md +++ b/docs/vmctl.md @@ -665,8 +665,8 @@ ARM build may run on Raspberry Pi or on [energy-efficient ARM servers](https://b #### Development ARM build 1. [Install Go](https://golang.org/doc/install). The minimum supported version is Go 1.17. -2. Run `make vmctl-arm` or `make vmctl-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). - It builds `vmctl-arm` or `vmctl-arm64` binary respectively and puts it into the `bin` folder. +2. Run `make vmctl-linux-arm` or `make vmctl-linux-arm64` from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics). + It builds `vmctl-linux-arm` or `vmctl-linux-arm64` binary respectively and puts it into the `bin` folder. #### Production ARM build diff --git a/package/package_deb.sh b/package/package_deb.sh index 901295e86..f818e6222 100755 --- a/package/package_deb.sh +++ b/package/package_deb.sh @@ -9,13 +9,13 @@ fi # Map to Debian architecture if [[ "$ARCH" == "amd64" ]]; then DEB_ARCH=amd64 - EXENAME_SRC="victoria-metrics-prod" + EXENAME_SRC="victoria-metrics-linux-amd64-prod" elif [[ "$ARCH" == "arm64" ]]; then DEB_ARCH=arm64 - EXENAME_SRC="victoria-metrics-arm64-prod" + EXENAME_SRC="victoria-metrics-linux-arm64-prod" elif [[ "$ARCH" == "arm" ]]; then DEB_ARCH=armhf - EXENAME_SRC="victoria-metrics-arm-prod" + EXENAME_SRC="victoria-metrics-linux-arm-prod" else echo "*** Unknown arch $ARCH" exit 1 diff --git a/package/package_rpm.sh b/package/package_rpm.sh index 8dba4a53d..8648aa95e 100755 --- a/package/package_rpm.sh +++ b/package/package_rpm.sh @@ -15,10 +15,10 @@ fi # Map to Debian architecture if [[ "$ARCH" == "amd64" ]]; then RPM_ARCH=x86_64 - EXENAME_SRC="victoria-metrics-prod" + EXENAME_SRC="victoria-metrics-linux-amd64-prod" elif [[ "$ARCH" == "arm64" ]]; then RPM_ARCH=aarch64 - EXENAME_SRC="victoria-metrics-arm64-prod" + EXENAME_SRC="victoria-metrics-linux-arm64-prod" else echo "*** Unknown arch $ARCH" exit 1