-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
roachprod: add public keys for all users to authorized_keys on AWS #35759
Merged
+88
−5
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dt
approved these changes
Mar 14, 2019
pkg/cmd/roachprod/vm/gce/utils.go
Outdated
if colonIdx == -1 { | ||
return nil, fmt.Errorf("malformed public key line %q", string(line)) | ||
} | ||
// Skip users named "root" or "ubuntu" which don't correspond to humands |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
humands
ajwerner
force-pushed
the
ajwerner/ssh-keys-on-aws
branch
from
March 14, 2019 21:00
50edd63
to
67f2278
Compare
Currently only the creating user has their key installed on AWS vms which is unfortunate for debugging. On GCE we configure our VMs to have user accounts for all users in the current project. On AWS we just have a single user named `ubuntu`. Mostly because it was the simplest approach, this PR detects whether we're creating an AWS cluster and if so, retreives the list of public keys from gcloud and installs them into the authorized_keys file for the ubuntu user. Release note: None
ajwerner
force-pushed
the
ajwerner/ssh-keys-on-aws
branch
from
March 14, 2019 22:44
67f2278
to
a49ae6f
Compare
bors r+ |
craig bot
pushed a commit
that referenced
this pull request
Mar 15, 2019
35759: roachprod: add public keys for all users to authorized_keys on AWS r=ajwerner a=ajwerner Currently only the creating user has their key installed on AWS vms which is unfortunate for debugging. On GCE we configure our VMs to have user accounts for all users in the current project. On AWS we just have a single user named `ubuntu`. Mostly because it was the simplest approach, this PR detects whether we're creating an AWS cluster and if so, retreives the list of public keys from gcloud and installs them into the authorized_keys file for the ubuntu user. Release note: None Co-authored-by: Andrew Werner <[email protected]>
Build succeeded |
ajwerner
added a commit
to ajwerner/cockroach
that referenced
this pull request
May 10, 2019
Previously in cockroachdb#35759 logic was added to read public keys from the gce project metadata and distribute them into the authorized_keys file of the shared user (ubuntu) on AWS. cockroachdb#37077 primarily served to distribute known_hosts files to the shared user (ubuntu) on both AWS and GCE as well as the creating user on GCE. That change also included logic to write the authorized_keys file to the shared user on GCE (as opposed to just AWS) in anticipation of switching roachprod to use the shared user across cloud providers. This change extends the previous change by also distributing all public keys to the authorized_keys file for the cluster creating user on GCE. Release note: None
ajwerner
added a commit
that referenced
this pull request
Jun 4, 2019
Previously in #35759 logic was added to read public keys from the gce project metadata and distribute them into the authorized_keys file of the shared user (ubuntu) on AWS. #37077 primarily served to distribute known_hosts files to the shared user (ubuntu) on both AWS and GCE as well as the creating user on GCE. That change also included logic to write the authorized_keys file to the shared user on GCE (as opposed to just AWS) in anticipation of switching roachprod to use the shared user across cloud providers. This change extends the previous change by also distributing all public keys to the authorized_keys file for the cluster creating user on GCE. Release note: None
craig bot
pushed a commit
that referenced
this pull request
Jun 4, 2019
37438: roachprod: distribute authorized_keys to creating user on gce r=ajwerner a=ajwerner Previously in #35759 logic was added to read public keys from the gce project metadata and distribute them into the authorized_keys file of the shared user (ubuntu) on AWS. #37077 primarily served to distribute known_hosts files to the shared user (ubuntu) on both AWS and GCE as well as the creating user on GCE. That change also included logic to write the authorized_keys file to the shared user on GCE (as opposed to just AWS) in anticipation of switching roachprod to use the shared user across cloud providers. This change extends the previous change by also distributing all public keys to the authorized_keys file for the cluster creating user on GCE. Release note: None Co-authored-by: Andrew Werner <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently only the creating user has their key installed on AWS vms which is
unfortunate for debugging. On GCE we configure our VMs to have user accounts
for all users in the current project. On AWS we just have a single user named
ubuntu
. Mostly because it was the simplest approach, this PR detects whetherwe're creating an AWS cluster and if so, retreives the list of public keys from
gcloud and installs them into the authorized_keys file for the ubuntu user.
Release note: None