Improve RHEL image build docs
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 328
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 9
Description
**What would you like to be added**:
Bug fixes and improvements for building images (especially RHEL OVAs) on RHEL 8 VMs. (some may not show up on a default RHEL 8 OS installation but will be present on a minimal installation after it's hardened with information security automation)
- Better sequencing in the [instructions for creating the role & user](https://anywhere.eks.amazonaws.com/docs/osmgmt/artifacts/#permissions) (step 1, step 2, etc)
- Create library permissions aren't set up on the `image-builder` role in vSphere- need to move library creation near role creation in docs from [image build section](https://anywhere.eks.amazonaws.com/docs/osmgmt/artifacts/#build-vsphere-ova-node-images) (or add a note) so it's performed with govc admin creds, not the limited image-builder user/role. (or, add library creation to the image-builder role)
- in step 2 in [image build section](https://anywhere.eks.amazonaws.com/docs/osmgmt/artifacts/#build-vsphere-ova-node-images), sudo group assumed to be `sudo`. On [RHEL 8](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html/security_guide/s2-wstation-privileges-limitroot), it's `wheel` by default. Create separate set of bash for RHEL to avoid confusion. (similar to step 3)
- `govc` needs some environment vars to function as part of `image-builder`, and they don't seem to be configured in the instructions in the docs. we had to create a `.env` file that exports vars for `govc` like `GOVC_URL` and source it before running the `image-builder` command in step 8.
- in step 3, `yq` is installed in `/usr/local/bin` with read/execute only by root (0700) when root's umask is set restrictively. Add a command to `sudo chmod 755 /usr/local/bin/yq` after the wget to allow other users (like `image-builder`) to execute.
- in step 3, add a missing `image-builder` dependency `bc`: `sudo yum install -y bc`
- in step 4, `image-builder` is installed in `/usr/local/bin` with read/execute only by root (0700) when root's umask is set restrictively. Add a command to `sudo chmod 755 /usr/local/bin/yq` after the wget to allow other users (like `image-builder`) to execute.
- Add link to [import OVA docs](https://anywhere.eks.amazonaws.com/docs/getting-started/vsphere/customize/vsphere-ovas/) to end of OVA image build section to allow users to jump directly to the next step in the process after the image is built successfully.
**Why is this needed**:
Docs currently have a few missing commands or make assumptions about system config that are not universally true. This adds friction to the EKS-A node image build process for RHEL 8 OVAs on a RHEL 8 build VM.
Contributor guide
Research direction
Start with the permissions and build-vsphere-ova-node-images sections linked in the issue, then compare their RHEL 8 prerequisites and command sequence. Verify the documented role permissions, govc environment variables, yq and image-builder access, bc dependency, and OVA import link against a hardened RHEL 8 VM. Done means the RHEL-specific instructions are complete and usable from image build through OVA import.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, shell
- Domain
- documentation, infrastructure
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100