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

rework ansible-like loadtest helpers #48634

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fspmarshall
Copy link
Contributor

This PR reworks the ansible-like loadtest helpers to be a little easier to work with, and brings them a bit more inline with existing practices elsewhere without substantively changing what they do.

  • Switched tbot/machineid usage to use the more common pattern of being a general system service that outputs credentials to /opt/machine-id, bringing it more inline with what other tools/helpers/docs use.
  • Reworked scripts and config file generation so that now no files tracked by git need to be modified during usage.
  • Added improved logging to scripts, making it a bit easier to debug things when issues arise.

@fspmarshall fspmarshall force-pushed the fspmarshall/ansible-like-simplification branch from 18a1f5d to bb2d107 Compare November 7, 2024 21:30
@espadolini espadolini self-requested a review November 7, 2024 21:37
Copy link
Contributor

@espadolini espadolini left a comment

Choose a reason for hiding this comment

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

Is /var/lib/teleport/bot a standard location? If we're willing to put things in /var, why use /opt for some of the outputs?

Comment on lines +31 to +33
onboarding:
join_method: token
token: ${BOT_TOKEN:?}
Copy link
Contributor

Choose a reason for hiding this comment

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

If we're planning on using AWS, why isn't this IAM?

Comment on lines +30 to +34
echo "installing dumb-init..." >&2

sudo wget -q -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64

sudo chmod +x /usr/local/bin/dumb-init
Copy link
Contributor

Choose a reason for hiding this comment

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

dumb-init is just a package on ubuntu - is it not installable in amazon linux?


cd state

echo "installing teleport..." >&2
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just use the repository or at least the distro packages to install Teleport? We are installing from a real tarball anyway, we should also have the packages.

Comment on lines +38 to +46
path: /opt/machine-id
storage:
type: directory
path: /var/lib/teleport/bot
services:
- type: ssh-multiplexer
destination:
type: directory
path: /opt/machine-id
Copy link
Contributor

Choose a reason for hiding this comment

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

We should not be using the same directory for competing outputs, this is very much not supported and will probably break as soon as the wrong ssh_config ends up being used.

Comment on lines +40 to +41
type: directory
path: /var/lib/teleport/bot
Copy link
Contributor

Choose a reason for hiding this comment

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

With IAM we don't need a storage directory at all, which is sort of a recommended-ish stateless setup AFAIK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants