Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f1c9830
Add autoupdate agent protos (#47666)
hugoShaka Oct 21, 2024
05369e5
fix agent autoupdate protos (#47830)
hugoShaka Oct 22, 2024
f4d5216
Add autoupdate agent type validations (#47831)
hugoShaka Oct 23, 2024
d3d8a9f
Add AutoUpdateAgentRollout service and cache (#47833)
hugoShaka Oct 24, 2024
760e0ab
Fix defaults on incomplete AU config or version resources (#47872)
hugoShaka Oct 24, 2024
d5ea4d5
[v17] enforce conditional updates on AutoUpdate* + rename typos (#48390)
hugoShaka Nov 5, 2024
0aa01c7
[v17] implement autoupdate_agent_rollout reconciler (#48944)
hugoShaka Nov 14, 2024
38b8e31
[v17] RFD 184: automatic updates, server-side logic (#52275)
hugoShaka Feb 27, 2025
432df72
[v17] Modulate install script when managed updates v2 are off (#52609)
hugoShaka Feb 28, 2025
7efa325
Set the autoupdate singleton names (#52751)
hugoShaka Mar 4, 2025
bd5732f
Add autoupdate events to web UI (#52748) (#52838)
hugoShaka Mar 6, 2025
5e23953
Fix backport to include the label fix
hugoShaka Mar 14, 2025
3987582
lint
hugoShaka Mar 14, 2025
9be8872
fix tests
hugoShaka Mar 17, 2025
1908508
Add teleport-update binary scaffolding and disable command (#46418)
sclevine Oct 10, 2024
3ab8c8f
[teleport-update] Add enable command (#47565)
sclevine Oct 21, 2024
1c7ab62
RFD 0184: Automatic Updates for Teleport Agents (#47126)
sclevine Oct 25, 2024
221e535
[v17] RFD 184: Agent Automatic Updates, teleport-update (#52372)
sclevine Feb 27, 2025
8333d70
[v17] [teleport-update] Fix usage of default $PATH dir, overrides, an…
sclevine Feb 28, 2025
8d53983
[v17] [teleport-update] Set umask 0022 for teleport-update to avoid e…
sclevine Mar 4, 2025
879432e
[v17] [teleport-update] Support for CentOS 7 (#53017)
sclevine Mar 13, 2025
baa81e0
[v17] [teleport-update] Improve clarity of error logs and address UX …
sclevine Mar 14, 2025
eada0f4
update UI snapshots
hugoShaka Mar 17, 2025
d5591bf
[v17] Backport packaging restructuring and teleport-update build (#52…
vapopov Feb 27, 2025
c9b1bac
bump e
hugoShaka Mar 17, 2025
71290d9
Fix RPM linking logic (#52704)
hugoShaka Mar 3, 2025
f883fbd
Use quoting style supported by pre-2015 systemd (#53179) (#53196)
sclevine Mar 19, 2025
6047e43
[teleport-update] Additional log message and UX cleanup (#53180) (#53…
sclevine Mar 19, 2025
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
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## 16.5.0 (Upcoming)

### Automatic Updates

16.5 introduces a new automatic update mechanism for system administrators to control which Teleport version their
agents are running. You can now configure the agent update schedule and desired agent version via the `autoupdate_config`
and `autoupdate_version` resources.

Updates are performed by the new `teleport-update` binary.
This new system is package manager-agnostic and opt-in. Existing agents won't be automatically enrolled, you can enroll
existing 17.3+ agents by running `teleport-update enable`.

`teleport-update` will become the new standard way of installing Teleport as it always picks the appropriate Teleport
edition (Community vs Enterprise), the cluster's desired version, and the correct Teleport variant (e.g. FIPS-compliant
cryptography).

You can find more information about the feature in [our documentation]().

### Package layout changes

Starting with 16.5.0, the Teleport DEB and RPM packages, notably used by the `apt`, `yum`, `dnf` and `zypper` package
managers, will place the Teleport binaries in `/opt/teleport` instead of `/usr/local/bin`.

The binaries will be symlinked to their previous location, no change should be required in your scripts or systemd units.

This change allows us to do automatic updates without conflicting with the package manager.

## 16.4.18 (03/18/25)

* Fixed the Teleport process to crashing on group database errors when host user creation was enabled. [#53080](https://github.com/gravitational/teleport/pull/53080)
Expand Down
21 changes: 16 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,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
endif

GO_ENV_OS := $(shell go env GOOS)
Expand Down Expand Up @@ -221,7 +224,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
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 @@ -290,6 +294,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 @@ -377,6 +383,10 @@ $(BUILDDIR)/tbot: BUILDFLAGS_TBOT += $(if $(findstring CGO_ENABLED=1,$(TBOT_CGO_
$(BUILDDIR)/tbot:
GOOS=$(OS) GOARCH=$(ARCH) $(TBOT_CGO_FLAGS) go build -tags "$(FIPS_TAG) $(KUSTOMIZE_NO_DYNAMIC_PLUGIN)" -o $(BUILDDIR)/tbot $(BUILDFLAGS_TBOT) $(TOOLS_LDFLAGS) ./tool/tbot

.PHONY: $(BUILDDIR)/teleport-update
$(BUILDDIR)/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
teleport-hot-reload:
Expand Down Expand Up @@ -1561,10 +1571,11 @@ print/env:
.PHONY: install
install: build
@echo "\n** Make sure to run 'make install' as root! **\n"
cp -f $(BUILDDIR)/tctl $(BINDIR)/
cp -f $(BUILDDIR)/tsh $(BINDIR)/
cp -f $(BUILDDIR)/tbot $(BINDIR)/
cp -f $(BUILDDIR)/teleport $(BINDIR)/
cp -f $(BUILDDIR)/tctl $(BINDIR)/
cp -f $(BUILDDIR)/tsh $(BINDIR)/
cp -f $(BUILDDIR)/tbot $(BINDIR)/
cp -f $(BUILDDIR)/teleport $(BINDIR)/
cp -f $(BUILDDIR)/teleport-update $(BINDIR)/
mkdir -p $(DATADIR)

# Docker image build. Always build the binaries themselves within docker (see
Expand Down
53 changes: 53 additions & 0 deletions api/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3107,6 +3107,59 @@ func (c *Client) DeleteAutoUpdateVersion(ctx context.Context) error {
return trace.Wrap(err)
}

// CreateAutoUpdateAgentRollout creates AutoUpdateAgentRollout resource.
func (c *Client) CreateAutoUpdateAgentRollout(ctx context.Context, rollout *autoupdatev1pb.AutoUpdateAgentRollout) (*autoupdatev1pb.AutoUpdateAgentRollout, error) {
client := autoupdatev1pb.NewAutoUpdateServiceClient(c.conn)
resp, err := client.CreateAutoUpdateAgentRollout(ctx, &autoupdatev1pb.CreateAutoUpdateAgentRolloutRequest{
Rollout: rollout,
})
if err != nil {
return nil, trace.Wrap(err)
}
return resp, nil
}

// GetAutoUpdateAgentRollout gets AutoUpdateAgentRollout resource.
func (c *Client) GetAutoUpdateAgentRollout(ctx context.Context) (*autoupdatev1pb.AutoUpdateAgentRollout, error) {
client := autoupdatev1pb.NewAutoUpdateServiceClient(c.conn)
resp, err := client.GetAutoUpdateAgentRollout(ctx, &autoupdatev1pb.GetAutoUpdateAgentRolloutRequest{})
if err != nil {
return nil, trace.Wrap(err)
}
return resp, nil
}

// UpdateAutoUpdateAgentRollout updates AutoUpdateAgentRollout resource.
func (c *Client) UpdateAutoUpdateAgentRollout(ctx context.Context, rollout *autoupdatev1pb.AutoUpdateAgentRollout) (*autoupdatev1pb.AutoUpdateAgentRollout, error) {
client := autoupdatev1pb.NewAutoUpdateServiceClient(c.conn)
resp, err := client.UpdateAutoUpdateAgentRollout(ctx, &autoupdatev1pb.UpdateAutoUpdateAgentRolloutRequest{
Rollout: rollout,
})
if err != nil {
return nil, trace.Wrap(err)
}
return resp, nil
}

// UpsertAutoUpdateAgentRollout updates or creates AutoUpdateAgentRollout resource.
func (c *Client) UpsertAutoUpdateAgentRollout(ctx context.Context, rollout *autoupdatev1pb.AutoUpdateAgentRollout) (*autoupdatev1pb.AutoUpdateAgentRollout, error) {
client := autoupdatev1pb.NewAutoUpdateServiceClient(c.conn)
resp, err := client.UpsertAutoUpdateAgentRollout(ctx, &autoupdatev1pb.UpsertAutoUpdateAgentRolloutRequest{
Rollout: rollout,
})
if err != nil {
return nil, trace.Wrap(err)
}
return resp, nil
}

// DeleteAutoUpdateAgentRollout deletes AutoUpdateAgentRollout resource.
func (c *Client) DeleteAutoUpdateAgentRollout(ctx context.Context) error {
client := autoupdatev1pb.NewAutoUpdateServiceClient(c.conn)
_, err := client.DeleteAutoUpdateAgentRollout(ctx, &autoupdatev1pb.DeleteAutoUpdateAgentRolloutRequest{})
return trace.Wrap(err)
}

// GetClusterAccessGraphConfig retrieves the Cluster Access Graph configuration from Auth server.
func (c *Client) GetClusterAccessGraphConfig(ctx context.Context) (*clusterconfigpb.AccessGraphConfig, error) {
rsp, err := c.ClusterConfigClient().GetClusterAccessGraphConfig(ctx, &clusterconfigpb.GetClusterAccessGraphConfigRequest{})
Expand Down
8 changes: 8 additions & 0 deletions api/client/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ func EventToGRPC(in types.Event) (*proto.Event, error) {
out.Resource = &proto.Event_WorkloadIdentityX509Revocation{
WorkloadIdentityX509Revocation: r,
}
case *autoupdate.AutoUpdateAgentRollout:
out.Resource = &proto.Event_AutoUpdateAgentRollout{
AutoUpdateAgentRollout: r,
}

default:
return nil, trace.BadParameter("resource type %T is not supported", r)
}
Expand Down Expand Up @@ -574,6 +579,9 @@ func EventFromGRPC(in *proto.Event) (*types.Event, error) {
} else if r := in.GetAutoUpdateVersion(); r != nil {
out.Resource = types.Resource153ToLegacy(r)
return &out, nil
} else if r := in.GetAutoUpdateAgentRollout(); r != nil {
out.Resource = types.Resource153ToLegacy(r)
return &out, nil
} else if r := in.GetWorkloadIdentity(); r != nil {
out.Resource = types.Resource153ToLegacy(r)
return &out, nil
Expand Down
96 changes: 61 additions & 35 deletions api/client/proto/event.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading