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

Reconfigure cloud-init to use ec2-user instead of centos on Amazon Linux #541

Merged
merged 1 commit into from
Feb 1, 2019

Conversation

sfzylad
Copy link
Contributor

@sfzylad sfzylad commented Feb 1, 2019

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #536

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:


@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 1, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @sfzylad. Thanks for your PR.

I'm waiting for a kubernetes-sigs or kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 1, 2019
@sfzylad
Copy link
Contributor Author

sfzylad commented Feb 1, 2019

With this changes I was able to bake an AMI and login as ec2-user. User centos is no longer present.

@randomvariable
Copy link
Member

Does this get overwritten by package upgrades by any chance?

@randomvariable
Copy link
Member

i.e. is this marked properly as a config file in the RPM?

@sfzylad
Copy link
Contributor Author

sfzylad commented Feb 1, 2019

The file belongs to the RPM and is marked as a config file:

[root@ip-10-0-1-54 ~]# rpm -qf /etc/cloud/cloud.cfg
cloud-init-18.3+52.gc5f78957-1.el7.noarch
[root@ip-10-0-1-54 ~]# rpm -qc cloud-init-18.3+52.gc5f78957-1.el7.noarch |grep cloud.cfg
/etc/cloud/cloud.cfg

@randomvariable
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 1, 2019
@detiber
Copy link
Member

detiber commented Feb 1, 2019

/approve

@randomvariable or @chuckha want to give final lgtm?

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: detiber, sfzylad

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 1, 2019
# max_wait: 10 # (defaults to 120 seconds)

# The modules that run in the 'init' stage
cloud_init_modules:
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need all of these modules (and config_modules and final_modules)? Like salt-minion.

Copy link
Member

Choose a reason for hiding this comment

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

In this case I think this is fine, since this file is directly from the cloud-init package and tweaked for the correct default user.

@chuckha
Copy link
Contributor

chuckha commented Feb 1, 2019

/lgtm

In summary, this takes the standard config file out of the package that we were already installing and customizes it slightly so that it works on amazon-linux.

The file is marked as a config file so upgrades will not overwrite the customization.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 1, 2019
@k8s-ci-robot k8s-ci-robot merged commit 279b766 into kubernetes-sigs:master Feb 1, 2019
luthermonson pushed a commit to luthermonson/cluster-api-provider-aws that referenced this pull request Feb 28, 2023
PCP-124: Adding tags to AWS Network Interfaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ec2-user not used on Amazon Linux AMI
5 participants