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

support upgrade el7to8 on AlibabaCloud rhui #1088

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 98 additions & 2 deletions etc/leapp/files/repomap.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"datetime": "202306191741Z",
"version_format": "1.1.0",
"datetime": "202307241553Z",
"version_format": "1.2.0",
"mapping": [
{
"source_major_version": "7",
Expand Down Expand Up @@ -105,6 +105,12 @@
"target": [
"rhel8-rhui-google-compute-engine-leapp"
]
},
{
"source": "rhel7-rhui-custom-client-at-alibaba",
"target": [
"rhel8-rhui-custom-client-at-alibaba"
]
}
]
},
Expand Down Expand Up @@ -403,6 +409,14 @@
"channel": "ga",
"repo_type": "rpm",
"rhui": "google"
},
{
"major_version": "7",
"repoid": "rhui-rhel-7-server-rhui-rpms",
"arch": "x86_64",
"channel": "ga",
"repo_type": "rpm",
"rhui": "alibaba"
}
]
},
Expand Down Expand Up @@ -577,6 +591,14 @@
"channel": "ga",
"repo_type": "rpm",
"rhui": "google"
},
{
"major_version": "7",
"repoid": "rhui-rhel-7-server-rhui-optional-rpms",
"arch": "x86_64",
"channel": "ga",
"repo_type": "rpm",
"rhui": "alibaba"
}
]
},
Expand Down Expand Up @@ -784,6 +806,14 @@
"channel": "ga",
"repo_type": "rpm",
"rhui": "google"
},
{
"major_version": "7",
"repoid": "rhui-rhel-7-server-rhui-extras-rpms",
"arch": "x86_64",
"channel": "ga",
"repo_type": "rpm",
"rhui": "alibaba"
}
]
},
Expand Down Expand Up @@ -1244,6 +1274,19 @@
}
]
},
{
"pesid": "rhel7-rhui-custom-client-at-alibaba",
"entries": [
{
"major_version": "7",
"repoid": "rhui-custom-rhui_client_at_alibaba",
"arch": "x86_64",
"channel": "ga",
"repo_type": "rpm",
"rhui": "alibaba"
}
]
},
{
"pesid": "rhel8-BaseOS",
"entries": [
Expand Down Expand Up @@ -1461,6 +1504,14 @@
"channel": "ga",
"repo_type": "rpm",
"rhui": "google"
},
{
"major_version": "8",
"repoid": "rhui-rhel-8-for-x86_64-baseos-rhui-rpms",
"arch": "x86_64",
"channel": "ga",
"repo_type": "rpm",
"rhui": "alibaba"
}
]
},
Expand Down Expand Up @@ -1681,6 +1732,14 @@
"channel": "ga",
"repo_type": "rpm",
"rhui": "google"
},
{
"major_version": "8",
"repoid": "rhui-rhel-8-for-x86_64-appstream-rhui-rpms",
"arch": "x86_64",
"channel": "ga",
"repo_type": "rpm",
"rhui": "alibaba"
}
]
},
Expand Down Expand Up @@ -1810,6 +1869,14 @@
"channel": "ga",
"repo_type": "rpm",
"rhui": "google"
},
{
"major_version": "8",
"repoid": "rhui-codeready-builder-for-rhel-8-x86_64-rhui-rpms",
"arch": "x86_64",
"channel": "ga",
"repo_type": "rpm",
"rhui": "alibaba"
}
]
},
Expand Down Expand Up @@ -1939,6 +2006,14 @@
"channel": "ga",
"repo_type": "rpm",
"rhui": "google"
},
{
"major_version": "8",
"repoid": "rhui-rhel-8-for-x86_64-supplementary-rhui-rpms",
"arch": "x86_64",
"channel": "ga",
"repo_type": "rpm",
"rhui": "alibaba"
}
]
},
Expand Down Expand Up @@ -2350,6 +2425,14 @@
"channel": "ga",
"repo_type": "rpm",
"rhui": "google"
},
{
"major_version": "8",
"repoid": "rhui-rhel-8-for-x86_64-highavailability-rhui-rpms",
"arch": "x86_64",
"channel": "ga",
"repo_type": "rpm",
"rhui": "alibaba"
}
]
},
Expand Down Expand Up @@ -2573,6 +2656,19 @@
}
]
},
{
"pesid": "rhel8-rhui-custom-client-at-alibaba",
"entries": [
{
"major_version": "8",
"repoid": "rhui-custom-rhui_client_at_alibaba-rhel-8",
"arch": "x86_64",
"channel": "ga",
"repo_type": "rpm",
"rhui": "alibaba"
}
]
},
{
"pesid": "rhel9-BaseOS",
"entries": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, repo_map, cloud_provider='', default_channels=None):
self.cloud_provider = cloud_provider

# Cloud provider might have multiple variants, e.g, aws: (aws, aws-sap-es4) - normalize it
cloud_providers = ('aws', 'azure', 'google')
cloud_providers = ('aws', 'azure', 'google', 'alibaba')
for provider in cloud_providers:
if cloud_provider.startswith(provider):
self.cloud_provider = provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@ def has_katello_prefix(pkg):

upg_path = rhui.get_upg_path()
# AWS RHUI packages do not have to be whitelisted because they are signed by RedHat
whitelisted_cloud_flavours = ('azure', 'azure-eus', 'azure-sap-ha', 'azure-sap-apps', 'google', 'google-sap')
whitelisted_cloud_flavours = (
'azure',
'azure-eus',
'azure-sap-ha',
'azure-sap-apps',
'google',
'google-sap',
'alibaba'
)
whitelisted_cloud_pkgs = {
rhui.RHUI_CLOUD_MAP[upg_path].get(flavour, {}).get('src_pkg') for flavour in whitelisted_cloud_flavours
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


class RepoMapData(object):
VERSION_FORMAT = '1.1.0'
VERSION_FORMAT = '1.2.0'

def __init__(self):
self.repositories = []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"datetime": "202107141655Z",
"version_format": "1.1.0",
"provided_data_streams": [ "2.0" ],
"version_format": "1.2.0",
"mapping": [
{
"source_major_version": "7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, repo_map, cloud_provider='', default_channels=None):
self.cloud_provider = cloud_provider

# Cloud provider might have multiple variants, e.g, aws: (aws, aws-sap-es4) - normalize it
cloud_providers = ('aws', 'azure', 'google')
cloud_providers = ('aws', 'azure', 'google', 'alibaba')
for provider in cloud_providers:
if cloud_provider.startswith(provider):
self.cloud_provider = provider
Expand Down
11 changes: 11 additions & 0 deletions repos/system_upgrade/common/libraries/rhui.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,17 @@
('leapp-google-sap.repo', YUM_REPOS_PATH)
],
},
'alibaba': {
'src_pkg': 'client-rhel7',
'target_pkg': 'aliyun_rhui_rhel8',
'leapp_pkg': 'leapp-rhui-alibaba',
'leapp_pkg_repo': 'leapp-alibaba.repo',
'files_map': [
('content.crt', RHUI_PKI_PRODUCT_DIR),
('key.pem', RHUI_PKI_DIR),
('leapp-alibaba.repo', YUM_REPOS_PATH)
],
}
},
'8to9': {
'aws': {
Expand Down
2 changes: 1 addition & 1 deletion repos/system_upgrade/common/models/repositoriesmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class PESIDRepositoryEntry(Model):
purposes. The other channels indicate premium repositories.
"""

rhui = fields.StringEnum(['', 'aws', 'azure', 'google'])
rhui = fields.StringEnum(['', 'aws', 'azure', 'google', 'alibaba'])
"""
Specifies what cloud provider (RHUI) is the repository specific to.

Expand Down