Skip to content

docs: document the updater#24628

Merged
hugoShaka merged 13 commits intomasterfrom
hugo/document-teleport-agent-update
May 9, 2023
Merged

docs: document the updater#24628
hugoShaka merged 13 commits intomasterfrom
hugo/document-teleport-agent-update

Conversation

@hugoShaka
Copy link
Copy Markdown
Contributor

@hugoShaka hugoShaka commented Apr 14, 2023

Part of #23091

This commit adds the updater documentation covering:

  • its architecture
  • how to setup a self-hosted version server for on-prem users
  • how to enroll an agent into automatic updates
  • the cluster_maintenance_config resource reference

The PR currently restricts the automatic update scope to enterprise and cloud. Technically oss users could benefit from it but we don't have an oss package yet. Hopefully this should happen post 13.0 release.

@hugoShaka hugoShaka requested a review from fspmarshall April 14, 2023 21:08
Copy link
Copy Markdown
Contributor

@fspmarshall fspmarshall left a comment

Choose a reason for hiding this comment

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

nit: docs/pages/management/admin/setup-automatic-agent-update.mdx appears empty. Is this intended?

Comment thread docs/pages/architecture/automatic-agent-update.mdx Outdated
Comment thread docs/pages/management/operations/enroll-agent-into-automatic-updates.mdx Outdated
Comment thread docs/pages/management/operations/enroll-agent-into-automatic-updates.mdx Outdated
Comment thread docs/pages/management/operations/enroll-agent-into-automatic-updates.mdx Outdated
Comment thread docs/pages/management/operations/enroll-agent-into-automatic-updates.mdx Outdated
Comment thread docs/pages/management/operations/enroll-agent-into-automatic-updates.mdx Outdated
@hugoShaka hugoShaka force-pushed the hugo/document-teleport-agent-update branch from 917f5a7 to b805264 Compare April 28, 2023 14:12
@hugoShaka hugoShaka marked this pull request as ready for review April 28, 2023 14:49
@hugoShaka hugoShaka requested a review from fspmarshall April 28, 2023 14:49
This commit adds the updater documentation covering:
- its architecture
- how to setup a self-hosted version server for on-prem users
- how to enroll an agent into automatic updates
- the `cluster_maintenance_config` resource reference

The PR currently restricts the automatic update scope to enterprise and
cloud. Technically oss users could benefit from it but we don't have an
oss package yet. Hopefully this should happen post 13.0 release.
@alexfornuto alexfornuto self-assigned this Apr 28, 2023
Comment thread docs/pages/architecture/automatic-agent-update.mdx Outdated
Comment thread docs/pages/architecture/automatic-agent-update.mdx Outdated
Comment thread docs/pages/architecture/automatic-agent-update.mdx Outdated
Comment thread docs/pages/architecture/automatic-agent-update.mdx Outdated
Comment thread docs/pages/architecture/automatic-agent-update.mdx Outdated
Comment thread docs/pages/management/operations/self-hosted-automatic-agent-updates.mdx Outdated
Comment thread docs/pages/management/operations/enroll-agent-into-automatic-updates.mdx Outdated
Comment thread docs/pages/management/operations/enroll-agent-into-automatic-updates.mdx Outdated
Comment thread docs/pages/management/operations/enroll-agent-into-automatic-updates.mdx Outdated
hugoShaka and others added 3 commits May 1, 2023 09:08
Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>
@hugoShaka hugoShaka requested a review from alexfornuto May 1, 2023 14:11
Comment thread docs/pages/architecture/automatic-agent-update.mdx Outdated
Comment thread docs/pages/architecture/automatic-agent-update.mdx Outdated
Comment thread docs/pages/architecture/automatic-agent-update.mdx Outdated
Comment on lines +58 to +60
The best practice is to always align the agent version with the proxy and auth
ones. This ensures the agents benefit from all available features and bug
fixes for the given auth/proxy version.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In addition to using proper nouns for the services as above, what if the Proxy and Auth Services are not in alignment? Does one take precedence?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The rule is Auth >= Proxy >= agents. Ideally, all versions should be equal. During a version update, all three versions might differ. I added a link to our upgrade guide, which goes into greater detail.

their version server and choose their target version. They are responsible for
ensuring the targeted version is compatible with their current auth/proxy
versions. They must also monitor the agent's health and rollout status to
ensure every agent is healthy and running the correct version.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would you agree that a "Next steps" or "Learn more" section pointing to the other new pages under operations would make sense here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Automatic agent update is available starting from Teleport `13.0`.
</Details>

Starting with Teleport 13, agents running in systemd or Kubernetes environments
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I added in the architecture page first paragraph that we need both systemd and apt/yum. and I expanded the requirements section to mention

  • A Teleport agent, either:

    • started via systemd on a distribution using the apt or yum package managers

Nice. Now should this section be aligned to also mention apt/yum?

Comment thread docs/pages/management/operations/enroll-agent-into-automatic-updates.mdx Outdated
Automatic agent update is available starting from Teleport `13.0`.
</Details>

Starting with Teleport 13, agents running in systemd or Kubernetes environments
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we mention apt/yum here as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread docs/pages/management/operations/self-hosted-automatic-agent-updates.mdx Outdated
And mark the update as not critical:

```code
$ echo -n "no" > current/critical
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Almost missed this! Without another >, won't this overwrite?

❯ echo -n "line 1" > example
❯ echo -n "line 2" > example
❯ cat example
line 2
Suggested change
$ echo -n "no" > current/critical
$ echo -n "no" >> current/critical

And I'm not sure the best way to adjust to resolve, but using -n on both commands yields a single line, which I don't think is intended:

❯ echo -n "line 1" > example
❯ echo -n "line 2" >> example
❯ cat example
line 1line 2%

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Both commands are writing to different files (at least they're supposed to), the first one wites to current/version and the second one writes to current/critical. The file should have no newline at the end (updaters should be resilient but I'm more comfortable not testing the limits of the system). I think overwriting is the sane behaviour here as it allows the user to mistakenly run the command twice.

Comment thread docs/pages/management/operations/self-hosted-automatic-agent-updates.mdx Outdated
Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>
Install the `teleport-ent-updater` package (note: your teleport agent will be restarted during install):

```code
$ apt install teleport-ent-updater
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@marcoandredinis @hugoShaka Do we need to update our Discover install script and auto-discovery install script to use this package name when auto-upgrades env. var is set? IIRC we only change the repository channel right now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yup, I thought this was part of this ticket but it's not.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we include teleport-updater as a dependency of teleport apt/yum package?
(and teleport-ent-updater a dep of teleport-ent)

If we do so, then we would only need to tell users to configure and then systemctl enable --now the service.
I do understand that this is one more binary we add to the base installation but it seems we are going to allow all users to run the upgrader, so we should be ok with this being on user's machine.

I'll open the PR to install the package on our install scripts but please let me know what you think.

Copy link
Copy Markdown
Contributor Author

@hugoShaka hugoShaka May 2, 2023

Choose a reason for hiding this comment

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

I think we do it the other way: if you install teleport-ent-updater, you also get teleport-ent with the right systems unit and the correct env vars set so the maintenance schedule is exported. cc @fspmarshall for confirmation

We don't have a teleport-updater OSS package yet 😢 . Everything is OSS-friendly but the packaging didn't happen because we were short on time.

maintenance window has been updated
```

## Next steps
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I dont' see a section on troubleshooting. What if the automatic upgrade fails. What logs can you look at. how do you recover.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added a few lines on how to trigger an update check manually and check the logs

Comment thread docs/pages/management/operations/enroll-agent-into-automatic-updates.mdx Outdated
Comment thread docs/pages/management/operations/self-hosted-automatic-agent-updates.mdx Outdated
Comment thread docs/config.json Outdated
"slug": "/architecture/authorization/"
},
{
"title": "Automatic Agent Update",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This name seems out of place with the rest of the theme. I would name Update Management and move it lower in the list.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

renamed to Agent Update Management

Comment thread docs/pages/management/operations/self-hosted-automatic-agent-updates.mdx Outdated
The release channel must be hosted on a webserver with trusted TLS certificates
and reachable by all agents.

Public cloud buckets like Amazon S3 or Google Cloud Storage are good
Copy link
Copy Markdown
Contributor

@stevenGravy stevenGravy May 8, 2023

Choose a reason for hiding this comment

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

WE should provide examples of using S3 and Google Cloud storage. That can go in a subsequent release but since a number of folks are not famililar with that or setting up nginx good to ahve concrete examples. Also good if Teleport could provide this in some way.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When we'll come back to automatic updates we'll likely have those endpoints served by the proxies themselves.

Copy link
Copy Markdown
Contributor

@stevenGravy stevenGravy left a comment

Choose a reason for hiding this comment

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

Approved with comments.

hugoShaka and others added 3 commits May 8, 2023 15:25
Co-authored-by: Roman Tkachenko <roman@goteleport.com>
@hugoShaka hugoShaka enabled auto-merge May 9, 2023 14:11
@hugoShaka hugoShaka added this pull request to the merge queue May 9, 2023
Merged via the queue into master with commit 3c9a819 May 9, 2023
@hugoShaka hugoShaka deleted the hugo/document-teleport-agent-update branch May 9, 2023 14:56
@public-teleport-github-review-bot
Copy link
Copy Markdown

@hugoShaka See the table below for backport results.

Branch Result
branch/v13 Failed

hugoShaka added a commit that referenced this pull request May 9, 2023
* docs: document the updater

This commit adds the updater documentation covering:
- its architecture
- how to setup a self-hosted version server for on-prem users
- how to enroll an agent into automatic updates
- the `cluster_maintenance_config` resource reference

The PR currently restricts the automatic update scope to enterprise and
cloud. Technically oss users could benefit from it but we don't have an
oss package yet. Hopefully this should happen post 13.0 release.

* add new page to section index and sort

* Apply suggestions from code review

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>

* docs feedback pt.1

* docs feedback pt.2

* fix tabs and edit innards

* Apply suggestions from code review

Co-authored-by: Alex Fornuto <alex.fornuto@goteleport.com>

* docs feedback pt.3

* docs feedback pt.4

* Apply suggestions from code review

Co-authored-by: Roman Tkachenko <roman@goteleport.com>

* docs feedback pt.5

* mark as preview

---------

Co-authored-by: alexfornuto <alex.fornuto@goteleport.com>
Co-authored-by: Roman Tkachenko <roman@goteleport.com>
hugoShaka added a commit that referenced this pull request May 9, 2023
* docs: document the updater

This commit adds the updater documentation covering:
- its architecture
- how to setup a self-hosted version server for on-prem users
- how to enroll an agent into automatic updates
- the `cluster_maintenance_config` resource reference

The PR currently restricts the automatic update scope to enterprise and
cloud. Technically oss users could benefit from it but we don't have an
oss package yet. Hopefully this should happen post 13.0 release.

* add new page to section index and sort

* Apply suggestions from code review



* docs feedback pt.1

* docs feedback pt.2

* fix tabs and edit innards

* Apply suggestions from code review



* docs feedback pt.3

* docs feedback pt.4

* Apply suggestions from code review



* docs feedback pt.5

* mark as preview

---------

Co-authored-by: alexfornuto <alex.fornuto@goteleport.com>
Co-authored-by: Roman Tkachenko <roman@goteleport.com>
@r0mant r0mant mentioned this pull request Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants