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

Updating OS commands to manage image-builder user #7851

Closed

Conversation

jaradtke-aws
Copy link
Member

Issue #, if available:
The procedure for managing the image-builder user in the Operating Systems Management | Artifacts page contained unnecessary steps that modified the underlying OS. The goal is to add a user (image-builder) and configure the system to allow that user to run the image-builder process. That requires that the user can access /dev/kvm (which has permissions: crw-rw---- root:kvm) indicating that the user needs to either be the root user, or belong to the kvm group.
This PR was created for Issue #7846
#7846

Description of changes:
Removed any steps demonstrating how to modify the OS

-   sudo usermod -a -G kvm $USER
-   sudo chmod 666 /dev/kvm
-   sudo chown root:kvm /dev/kvm

Updated the step to create a user to have that step include the kvm group at that time

-   sudo adduser image-builder
+   sudo useradd -G kvm image-builder

If the user was created using the updated useradd command, then the usermod step is unnecessary. Therefore removed that step

-   sudo usermod -aG sudo image-builder

Testing (if applicable):
The following was run on an Ubuntu 22.04 and Red Hat Enterprise Linux8

$ sudo useradd -G kvm testuser
$ groups testuser
testuser : testuser kvm
$ egrep '^NAME|^VERSION' /etc/*release*
/etc/os-release:NAME="Red Hat Enterprise Linux"
/etc/os-release:VERSION="8.9 (Ootpa)"
/etc/os-release:VERSION_ID="8.9"
$ egrep '^NAME|^VERSION' /etc/*release*
/etc/os-release:NAME="Ubuntu"
/etc/os-release:VERSION_ID="22.04"
/etc/os-release:VERSION="22.04.4 LTS (Jammy Jellyfish)"
/etc/os-release:VERSION_CODENAME=jammy

Documentation added/planned (if applicable):

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign csplinter for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@eks-distro-bot eks-distro-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs Documentation documentation size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants