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

MGMT-3353 RHCOS per version #869

Merged

Conversation

YuviGold
Copy link
Contributor

@YuviGold YuviGold commented Jan 4, 2021

Enhancing the OPENSHIFT_VERSIONS hashmap to hold rhcos image,
display name and support level.
i.e.

{
	"4.6": {
		"display_name": "4.6.8",
		"release_image": "quay.io/openshift-release-dev/ocp-release:4.6.8-x86_64",
		"rhcos_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-4.6.8-x86_64-live.x86_64.iso",
		"support_level": "production"
	},
	"4.7": {
		"display_name": "4.7-pre-release",
		"release_image": "quay.io/openshift-release-dev/ocp-release@sha256:2419f9cd3ea9bd114764855653012e305ade2527210d332bfdd6dbdae538bd66",
		"rhcos_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-4.6.8-x86_64-live.x86_64.iso",
		"support_level": "beta"
	}
}

Updating everywhere in the code to use RHCOS image matching the cluster OCP version.
Including - DownloadBootFiles and CreateISOAndUploadToS3 operations.

The name of the baseIso is received from new function s3wrapper.GetBaseIsoObject.
For k8s it would be rhcos-<ocp_version>.iso and for onprem it will be for now livecd.iso until updating onprem livecd volume to support a directory of livecds.

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: YuviGold

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

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. api-review Categorizes an issue or PR as actively needing an API review. labels Jan 4, 2021
@YuviGold YuviGold force-pushed the MGMT-3353-multi-rhcos branch 3 times, most recently from ebd1ae3 to c7b532f Compare January 4, 2021 13:51
@YuviGold
Copy link
Contributor Author

YuviGold commented Jan 4, 2021

/cc @avishayt @filanov @ronniel1 @djzager

@YuviGold
Copy link
Contributor Author

YuviGold commented Jan 4, 2021

cmd/main.go Outdated
}), "Failed uploading boot files")
for version := range openshiftVersionsMap {
go func(version string) {
failOnError(baseISOUploadLeader.RunWithLeader(context.Background(), func() error {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice to have a leader per version and parallelize the uploads, but that's for another PR

cmd/main.go Outdated Show resolved Hide resolved
Comment on lines +58 to +60
DoAllBootFilesExist(ctx context.Context, isoObjectName string) (bool, error)
DownloadBootFile(ctx context.Context, isoObjectName, fileType string) (io.ReadCloser, string, int64, error)
GetS3BootFileURL(isoObjectName, fileType string) string
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it would be nicer to have openshiftVersion as the parameter instead of isoObjectName?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's much flexible to have the ISO received as a parameter, as been done for the rest of the boot functions.

Comment on lines 2 to 13
"4.6": {
"release_image": "quay.io/openshift-release-dev/ocp-release:4.6.8-x86_64"
"display_name": "4.6.8",
"release_image": "quay.io/openshift-release-dev/ocp-release:4.6.8-x86_64",
"rhcos_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-4.6.8-x86_64-live.x86_64.iso",
"support_level": "production"
},
"4.7": {
"release_image": "quay.io/openshift-release-dev/ocp-release@sha256:2419f9cd3ea9bd114764855653012e305ade2527210d332bfdd6dbdae538bd66"
"display_name": "4.7-pre-release",
"release_image": "quay.io/openshift-release-dev/ocp-release@sha256:2419f9cd3ea9bd114764855653012e305ade2527210d332bfdd6dbdae538bd66",
"rhcos_image": "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/4.6/4.6.8/rhcos-4.6.8-x86_64-live.x86_64.iso",
"support_level": "beta"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

@ErezAlster We are all set on metrics right? (We should always have the openshift version)

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, @oshercc took care for it :)

Enhancing the OPENSHIFT_VERSIONS hashmap to hold rhcos image,
display name and support level.

Updating everywhere in the code to use RHCOS image matching the cluster OCP version.
Including - DownloadBootFiles and CreateISOAndUploadToS3 operations.

The name of the baseIso is received from new function s3wrapper.GetBaseIsoObject.
For k8s it would be rhcos-<ocp_version>.iso and for onprem it will be
for now livecd.iso until updating onprem livecd volume to support a directory of livecds.
@avishayt
Copy link
Contributor

avishayt commented Jan 5, 2021

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 5, 2021
@openshift-merge-robot openshift-merge-robot merged commit bb4e14c into openshift:master Jan 5, 2021
osherdp pushed a commit to osherdp/assisted-service that referenced this pull request Jan 16, 2022
Enhancing the OPENSHIFT_VERSIONS hashmap to hold rhcos image,
display name and support level.

Updating everywhere in the code to use RHCOS image matching the cluster OCP version.
Including - DownloadBootFiles and CreateISOAndUploadToS3 operations.

The name of the baseIso is received from new function s3wrapper.GetBaseIsoObject.
For k8s it would be rhcos-<ocp_version>.iso and for onprem it will be
for now livecd.iso until updating onprem livecd volume to support a directory of livecds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-review Categorizes an issue or PR as actively needing an API review. approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants