* Add TELEPORT_EXT_UPGRADER env to AWS OIDC deployments
* Add unit tests
* Fix import
* Remove subtest
* Remove constants pkg
* Iterate over all container definitions
* Remove TELEPORT_EXT_UPGRADER from ensured env var
TELEPORT_EXT_UPGRADER=awsoidc_integration is not supported when
attempting to initialize a new exporter. Instead of including version
checks, it is safer to use the install method environment variable to
populate the upgrader value in the heartbeat.
* Use constant
* Remove comment
* Enable automatic upgrade server by default
This commit means the proxy now serves automatic upgrade channels by
default. The default channel is "default" and its version is the
teleport proxy binary version.
This commit also fixes a bug with the automatic update version server
returning `teleport.Version` instead of `"v"+teleport.Version` when the
version was too high. This was not a critical issue because agents are
supposed to tolerate versions not prefixed with 'v'.
* lint
* thread safety
* Update lib/automaticupgrades/channel.go
* Update lib/config/configuration.go
Co-authored-by: Noah Stride <noah.stride@goteleport.com>
* fix tests and lint
---------
Co-authored-by: Noah Stride <noah.stride@goteleport.com>
Adds the new linter and configures it to prevent direct error
comparisions and type assertions in favor of errors.Is and errors.As.
All current violations caught by the linter have been updated
accordingly.
* Use default upgrade channel
This commit:
- initializes default upgrade channels based on the server features
- makes all integrations use the upgrade channels instead of hitting
hardcoded s3 bucket
- makes the version channel return its own version if the target
version is too high
- makes the NoVersion handler properly: returned as an error. This way
soneone relying on the version getter doesn't have to check
- moves the version kube-agent-updater lib in main teleport libs
- add tests for noVersion channels
* Update lib/web/join_tokens.go
Co-authored-by: Bernard Kim <bernard@goteleport.com>
* address marco's feedback
* address marco's feedback pt.2
---------
Co-authored-by: Bernard Kim <bernard@goteleport.com>
* Add external upgrader version to proto message
* Inlcude upgrader version in metrics and inventory
* Include TELEPORT_EXT_UPGRADER_VERSION in deployment
* whitespace
* Include upgrader version in inventory ls
* Small docs change
* Use teleport-upgrade version if available
* Normalize version
* Address feedback
* Revert e
* Update lib/automaticupgrades/config.go
Co-authored-by: Marco André Dinis <marco.dinis@goteleport.com>
---------
Co-authored-by: Marco André Dinis <marco.dinis@goteleport.com>
* EC2 Instance Connect Endpoint: List EC2 Instances
We must list the EC2 instances to the user, so they can pick one and
then add them as a Node.
This PR adds EC2 Instance Listing.
To do this, we convert the EC2 Instance into Teleport Server with a
special subkind: SubKindOpenSSHEC2InstanceConnectEndpointNode
This is similar to the ListDatabases endpoint.
* review pt1
* fix const and add test
* use any instead of interface{}
* InstallScripts: pin teleport version using ServerVersion
When Automatic Upgrades are enabled and the current installation is an
enterprise build, it will install teleport using:
- stable/cloud repo channel (yum, apt)
- pin the version to the one present at:
https://updates.releases.teleport.dev/v1/stable/cloud/version
* improve comments
* Use `cloud/stable` when Automatic Upgrades is on.
Teleport provides scripts to install teleport agents/services.
Those scripts use YUM/DEB repositories when possible.
Each repo has multiple channels:
- stable/v11
- stable/v12
- cloud/stable
We want to ensure that if the cluster is running in the cloud and
automatic upgrades is on (auth service was started with
TELEPORT_AUTOMATIC_UPGRADES=yes teleport ...), then the installation
script must offer the `cloud/stable` channel.
This PR changes the following scripts:
- Discover Install Node
- Discover Install Database Service
- Install App script
- EC2 default-installer and EC2 default-agentless-installer
* add helm chart knobs to enable auto updater
* use let instead of const and remove default export
* add HA to helm chart
* always return .automatic_upgrades in web ping response
* rename cloud/stable to stable/cloud
* fix ts test