[wip]feat: changes to support network restricted environments when creating RHEL OS bundles#1156
[wip]feat: changes to support network restricted environments when creating RHEL OS bundles#1156some-things wants to merge 11 commits intomesosphere:release-2.9from
Conversation
bundles/redhat8.6/bundle.sh.gotmpl
Outdated
| if [[ -f /etc/yum.repos.d/user-repos.repo ]]; then | ||
| USER_REPOS="$(awk -F '[][]' '/^\[.*\]/ {print $2}' /etc/yum.repos.d/user-repos.repo | paste -sd, -)" | ||
| if [[ -n "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then | ||
| ENABLED_REPOS="${ENABLED_REPOS},${USER_REPOS}" | ||
| elif [[ -z "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then | ||
| ENABLED_REPOS="${USER_REPOS}" | ||
| fi | ||
| fi |
There was a problem hiding this comment.
This requires users to define their rpm repos in repo-templates/user-repos.repo. We will need to document this workflow.
While KIB CLI automatically adds any repo files in repo-templates/ to /etc/yum.repos.d, we need to selectively enable/disable repos that already exist there (e.g., /etc/yum.repos.d/ubi.repo). We could only parse files other than the pre-existing ones, but maybe it is simpler to just have one file that users modify and we look for.
Open to any feedback.
bundles/redhat8.6/bundle.sh.gotmpl
Outdated
| if [[ -f /etc/yum.repos.d/user-repos.repo ]]; then | ||
| USER_REPOS="$(awk -F '[][]' '/^\[.*\]/ {print $2}' /etc/yum.repos.d/user-repos.repo | paste -sd, -)" | ||
| if [[ -n "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then | ||
| ENABLED_REPOS="${ENABLED_REPOS},${USER_REPOS}" | ||
| elif [[ -z "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then | ||
| ENABLED_REPOS="${USER_REPOS}" | ||
| fi | ||
| fi |
There was a problem hiding this comment.
I can think of another way of handling this. not a huge fan of usig awk this way
4e7471d to
8cb5c52
Compare
| rm packages.txt reqs.txt | ||
| curl https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm -o amazon-ssm-agent.rpm | ||
| createrepo -v . | ||
| chown -R 1000:1000 repodata/ |
|
I'm going to break this pr into smaller ones for release-2.9 regarding the satellite and skip subscription manager features open lets consider doing this in main first. |
What problem does this PR solve?:
Which issue(s) does this PR fix?:
Special notes for your reviewer:
I don't have permissions to push images to test a3512a5. Any help there would be greatly appreciated.
Does this PR introduce a user-facing change?: