Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[teleport-update] Add teleport-update to build and archive #48839

Merged
merged 7 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ GO_LDFLAGS ?= -w -s $(KUBECTL_SETVERSION)
ifeq ("$(TELEPORT_DEBUG)","true")
BUILDFLAGS ?= $(ADDFLAGS) -gcflags=all="-N -l"
BUILDFLAGS_TBOT ?= $(ADDFLAGS) -gcflags=all="-N -l"
BUILDFLAGS_TELEPORT_UPDATE ?= $(ADDFLAGS) -gcflags=all="-N -l"
else
BUILDFLAGS ?= $(ADDFLAGS) -ldflags '$(GO_LDFLAGS)' -trimpath -buildmode=pie
BUILDFLAGS_TBOT ?= $(ADDFLAGS) -ldflags '$(GO_LDFLAGS)' -trimpath
# teleport-update builds with disabled cgo, buildmode=pie is not required.
BUILDFLAGS_TELEPORT_UPDATE ?= $(ADDFLAGS) -ldflags '$(GO_LDFLAGS)' -trimpath
vapopov marked this conversation as resolved.
Show resolved Hide resolved
endif

GO_ENV_OS := $(shell go env GOOS)
Expand Down Expand Up @@ -240,7 +243,8 @@ endif

# On Windows only build tsh. On all other platforms build teleport, tctl,
# and tsh.
BINS_default = teleport tctl tsh tbot fdpass-teleport
BINS_default = teleport tctl tsh tbot fdpass-teleport teleport-update
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the actual target for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

teleport/Makefile

Lines 398 to 400 in c7d8791

.PHONY: $(BUILDDIR)/teleport-update
$(BUILDDIR)/teleport-update:
GOOS=$(OS) GOARCH=$(ARCH) CGO_ENABLED=0 go build -o $(BUILDDIR)/teleport-update $(BUILDFLAGS) ./tool/teleport-update

BINS_darwin = teleport tctl tsh tbot fdpass-teleport
BINS_windows = tsh tctl
BINS = $(or $(BINS_$(OS)),$(BINS_default))
BINARIES = $(addprefix $(BUILDDIR)/,$(BINS))
Expand Down Expand Up @@ -312,6 +316,8 @@ endif
CGOFLAG = CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++
BUILDFLAGS = $(ADDFLAGS) -ldflags '-w -s $(KUBECTL_SETVERSION)' -trimpath -buildmode=pie
BUILDFLAGS_TBOT = $(ADDFLAGS) -ldflags '-w -s $(KUBECTL_SETVERSION)' -trimpath
# teleport-update builds with disabled cgo, buildmode=pie is not required.
BUILDFLAGS_TELEPORT_UPDATE = $(ADDFLAGS) -ldflags '-w -s $(KUBECTL_SETVERSION)' -trimpath
endif

ifeq ("$(OS)","darwin")
Expand Down Expand Up @@ -397,7 +403,7 @@ $(BUILDDIR)/tbot:

.PHONY: $(BUILDDIR)/teleport-update
$(BUILDDIR)/teleport-update:
GOOS=$(OS) GOARCH=$(ARCH) CGO_ENABLED=0 go build -o $(BUILDDIR)/teleport-update $(BUILDFLAGS) ./tool/teleport-update
GOOS=$(OS) GOARCH=$(ARCH) CGO_ENABLED=0 go build -o $(BUILDDIR)/teleport-update $(BUILDFLAGS_TELEPORT_UPDATE) ./tool/teleport-update

TELEPORT_ARGS ?= start
.PHONY: teleport-hot-reload
Expand Down
5 changes: 4 additions & 1 deletion assets/install-scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ install_via_zypper() {
}


# download .tar.gz file via curl/wget, unzip it and run the install sript
# download .tar.gz file via curl/wget, unzip it and run the install script
install_via_curl() {
TEMP_DIR=$(mktemp -d -t teleport-XXXXXXXXXX)

Expand Down Expand Up @@ -387,6 +387,9 @@ install_teleport() {
if type fdpass-teleport &>/dev/null; then
echo " fdpass-teleport - Teleport Machine ID client."
fi
if type teleport-update &>/dev/null; then
echo " teleport-update - Teleport auto-update agent."
fi
}

# The suffix is "-ent" if we are installing a commercial edition of Teleport and
Expand Down
2 changes: 1 addition & 1 deletion build.assets/install
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ VARDIR=/var/lib/teleport
echo "Starting Teleport installation..."
cd $(dirname $0)
mkdir -p $VARDIR $BINDIR
cp -f teleport tctl tsh tbot $BINDIR/ || exit 1
cp -f teleport tctl tsh tbot teleport-update $BINDIR/ || exit 1

#
# What operating system is the user running?
Expand Down
2 changes: 1 addition & 1 deletion lib/web/scripts/node-join/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SYSTEMD_UNIT_PATH="/lib/systemd/system/teleport.service"
TARGET_PORT_DEFAULT=443
TELEPORT_ARCHIVE_PATH='{{.packageName}}'
TELEPORT_BINARY_DIR="/usr/local/bin"
TELEPORT_BINARY_LIST="teleport tctl tsh"
TELEPORT_BINARY_LIST="teleport tctl tsh teleport-update"
TELEPORT_CONFIG_PATH="/etc/teleport.yaml"
TELEPORT_DATA_DIR="/var/lib/teleport"
TELEPORT_DOCS_URL="https://goteleport.com/docs/"
Expand Down
Loading