Skip to content

Commit

Permalink
SERVER-62302 Add support for RHEL9 x86
Browse files Browse the repository at this point in the history
  • Loading branch information
tward333 authored and Evergreen Agent committed Sep 22, 2022
1 parent eac5afb commit 17e3372
Show file tree
Hide file tree
Showing 9 changed files with 218 additions and 3 deletions.
6 changes: 6 additions & 0 deletions buildscripts/package_test/kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ platforms:
instance_type: m6g.medium
transport:
username: ec2-user
- name: rhel90-x86-64
driver:
image_id: ami-0c41531b8d18cc72b
user_data: rhel-user-data.sh
transport:
username: ec2-user
- name: suse11-x86-64
driver:
image_id: ami-7f2e6015
Expand Down
8 changes: 8 additions & 0 deletions buildscripts/package_test/recipes/install_mongodb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@
sleep 120
EOH
end
#rhel9 doesn't have Gconf2 without epel
if node['platform'] == 'redhat' and node['platform_version'] == '9.0'
execute 'install epel' do
command 'dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y'
live_stream true
cwd homedir
end
end
execute 'install mongod' do
command 'yum install -y `find . -name "*server*.rpm"`'
live_stream true
Expand Down
6 changes: 6 additions & 0 deletions buildscripts/package_test/rhel-user-data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /bin/bash
sed -i '/^PubkeyAcceptedAlgorithms/s/$/,ssh-rsa/' /etc/crypto-policies/back-ends/opensshserver.config
sed -i '/^HostKeyAlgorithms/s/$/,ssh-rsa/' /etc/crypto-policies/back-ends/opensshserver.config
update-crypto-policies --set LEGACY
systemctl restart sshd

12 changes: 11 additions & 1 deletion buildscripts/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,17 @@ def build_os(self, arch):
if re.search("(suse)", self.dname):
return ["suse11", "suse12", "suse15"]
elif re.search("(redhat|fedora|centos)", self.dname):
return ["rhel82", "rhel80", "rhel70", "rhel71", "rhel72", "rhel62", "rhel55", "rhel67"]
return [
"rhel90",
"rhel82",
"rhel80",
"rhel70",
"rhel71",
"rhel72",
"rhel62",
"rhel55",
"rhel67",
]
elif self.dname in ['amazon', 'amazon2']:
return [self.dname]
elif self.dname == 'ubuntu':
Expand Down
4 changes: 2 additions & 2 deletions buildscripts/packager_enterprise.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def repodir(self, arch, build_os, spec): # noqa: D406,D407,D412,D413
def build_os(self, arch):
"""Return the build os label in the binary package to download.
The labels "rhel57", "rhel62", "rhel67", "rhel70", "rhel80" are for redhat,
The labels "rhel57", "rhel62", "rhel67", "rhel70", "rhel80", "rhel90" are for redhat,
the others are delegated to the super class.
"""
if arch == "ppc64le":
Expand Down Expand Up @@ -147,7 +147,7 @@ def build_os(self, arch):
return []

if re.search("(redhat|fedora|centos)", self.dname):
return ["rhel80", "rhel70", "rhel62", "rhel57"]
return ["rhel90", "rhel80", "rhel70", "rhel62", "rhel57"]
return super(EnterpriseDistro, self).build_os(arch)


Expand Down
38 changes: 38 additions & 0 deletions etc/evergreen_yml_components/definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ variables:
- enterprise-rhel-80-64-bit-suggested
- enterprise-rhel-82-arm64
- enterprise-rhel-83-s390x
- enterprise-rhel-90-64-bit
- enterprise-suse12-64
- enterprise-suse15-64
- enterprise-ubuntu1804-64
Expand Down Expand Up @@ -332,6 +333,7 @@ variables:
- enterprise-rhel-80-64-bit-dynamic-required
- enterprise-rhel-70-64-bit
- enterprise-rhel-82-arm64
- enterprise-rhel-90-64-bit
- enterprise-amazon2-arm64
- enterprise-ubuntu1804-64
- enterprise-ubuntu2004-64
Expand All @@ -358,10 +360,12 @@ variables:
- ubi8
- rhel80
- rhel-82-arm64
- rhel90
- enterprise-rhel-80-64-bit
- enterprise-rhel-80-64-bit-suggested # For testing selinux.
- enterprise-rhel-82-arm64
- enterprise-rhel-83-s390x
- enterprise-rhel-90-64-bit
- suse12
- enterprise-suse12-64
- suse15
Expand Down Expand Up @@ -6603,8 +6607,42 @@ tasks:
- func: "run selinux tests"
vars:
distro: rhel80-selinux
- name: selinux_rhel9_org
tags: []
depends_on:
- name: archive_dist_test
- name: package
commands:
- command: manifest.load
- func: "git get project and add git tag"
- *f_expansions_write
- func: "set up venv"
- func: "fetch packages"
- func: "fetch binaries"
- func: "extract binaries"
- func: "run selinux tests"
vars:
distro: rhel90-selinux
test_list: jstests/selinux/*.js
- name: selinux_rhel9_enterprise
tags: []
depends_on:
- name: archive_dist_test
- name: package
commands:
- command: manifest.load
- func: "git get project and add git tag"
- *f_expansions_write
- func: "set up venv"
- func: "fetch packages"
- func: "fetch binaries"
- func: "extract binaries"
- func: "run selinux tests"
vars:
distro: rhel90-selinux
test_list: jstests/selinux/*.js src/mongo/db/modules/enterprise/jstests/selinux/*.js


- name: selinux_rhel7_org
tags: []
depends_on:
Expand Down
129 changes: 129 additions & 0 deletions etc/evergreen_yml_components/variants/misc_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,135 @@ buildvariants:
- rhel80-small
- name: generate_buildid_to_debug_symbols_mapping

- name: rhel90
display_name: RHEL 9.0
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
run_on:
- rhel90-build
expansions:
push_path: linux
push_bucket: downloads.mongodb.org
push_name: linux
push_arch: x86_64-rhel90
compile_flags: --ssl MONGO_DISTMOD=rhel90 -j$(grep -c ^processor /proc/cpuinfo) --variables-files=etc/scons/mongodbtoolchain_v3_gcc.vars
multiversion_platform: rhel90
multiversion_edition: targeted
has_packages: true
packager_script: packager.py
packager_arch: x86_64
packager_distro: rhel90
repo_edition: org
scons_cache_scope: shared
large_distro_name: rhel90-build
tasks:
- name: compile_test_and_package_serial_no_unittests_TG
distros:
- rhel90-build
- name: aggregation !.feature_flag_guarded
- name: .auth !.audit !.multiversion
- name: causally_consistent_jscore_txns_passthrough
- name: .misc_js
- name: .concurrency .common
distros:
- rhel90-build
- name: concurrency_replication_causal_consistency_gen
- name: disk_wiredtiger
- name: free_monitoring
- name: .jscore .common
- name: .jstestfuzz .common !.multiversion
- name: .logical_session_cache .one_sec
- name: replica_sets_gen
- name: .replica_sets .common
- name: .sharding .txns
- name: .sharding .common !.csrs !.multiversion
- name: .ssl
- name: .stitch
- name: test_packages
distros:
- ubuntu2004-package
- name: selinux_rhel9_org
- name: .publish
distros:
- rhel90-small
- name: generate_buildid_to_debug_symbols_mapping

- name: enterprise-rhel-90-64-bit
display_name: "Enterprise RHEL 9.0"
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
modules:
- enterprise
run_on:
- rhel90-small
expansions: &enterprise-rhel-90-64-bit-expansions
additional_package_targets: archive-mongocryptd archive-mongocryptd-debug archive-mh archive-mh-debug
push_path: linux
push_bucket: downloads.10gen.com
push_name: linux
push_arch: x86_64-enterprise-rhel90
compile_flags: --ssl MONGO_DISTMOD=rhel90 -j$(grep -c ^processor /proc/cpuinfo) --variables-files=etc/scons/mongodbtoolchain_v3_gcc.vars
crypt_task_compile_flags: SHLINKFLAGS_EXTRA="-Wl,-Bsymbolic -Wl,--no-gnu-unique" CCFLAGS="-fno-gnu-unique"
multiversion_platform: rhel90
multiversion_edition: enterprise
has_packages: true
packager_script: packager_enterprise.py
packager_arch: x86_64
packager_distro: rhel90
repo_edition: enterprise
scons_cache_scope: shared
tasks:
- name: compile_test_and_package_serial_no_unittests_TG
distros:
- rhel90-large
- name: compile_build_tools_next_TG
distros:
- rhel90-large
- name: .aggfuzzer !.feature_flag_guarded !.multiversion
- name: audit
- name: auth_audit_gen
- name: auth_gen
- name: causally_consistent_jscore_txns_passthrough
- name: config_fuzzer_concurrency
- name: config_fuzzer_simulate_crash_concurrency_replication
distros:
- rhel90-large
- name: config_fuzzer_concurrency_replication
distros:
- rhel90-large
- name: config_fuzzer_jsCore
- name: config_fuzzer_replica_sets_jscore_passthrough
distros:
- rhel90-large
- name: .encrypt !.sharding !.replica_sets !.aggregation !.jscore
- name: external_auth
- name: external_auth_aws
- name: .jscore .common !.decimal !.sharding
- name: jsCore_txns_large_txns_format
- name: .jstestfuzz .common
- name: libunwind_tests
- name: .logical_session_cache .one_sec
- name: .ocsp
- name: replica_sets_auth_gen
- name: replica_sets_jscore_passthrough
- name: .replica_sets .multi_oplog
- name: sasl
- name: search
- name: search_auth
- name: search_ssl
- name: sharding_auth_audit_gen
- name: sharding_auth_gen
- name: .stitch
- name: .crypt
- name: .publish_crypt
- name: unittest_shell_hang_analyzer_gen
- name: test_packages
distros:
- ubuntu2004-package
- name: selinux_rhel9_enterprise
- name: .publish
distros:
- rhel90-small
- name: generate_buildid_to_debug_symbols_mapping

- name: suse12
display_name: SUSE 12
cron: "0 4 * * *" # From the ${project_nightly_cron} parameter.
Expand Down
2 changes: 2 additions & 0 deletions etc/generate_subtasks_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ build_variant_large_distro_exceptions:
- enterprise-rhel-81-ppc64le
- enterprise-rhel-82-arm64
- enterprise-rhel-83-s390x
- enterprise-rhel-90-64-bit
- enterprise-suse12-64
- enterprise-suse12-s390x
- enterprise-suse15-64
Expand All @@ -38,6 +39,7 @@ build_variant_large_distro_exceptions:
- rhel70
- rhel80
- rhel-82-arm64
- rhel90
- suse12
- suse15
- ubi8
Expand Down
16 changes: 16 additions & 0 deletions etc/repo_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ repos:
repos:
- yum/redhat/8/mongodb-org
- yum/redhat/8Server/mongodb-org
- name: rhel90
type: rpm
edition: org
bucket: repo.mongodb.org
repos:
- yum/redhat/9/mongodb-org
- yum/redhat/9Server/mongodb-org


- name: amazon
type: rpm
Expand Down Expand Up @@ -339,6 +347,14 @@ repos:
- yum/redhat/8/mongodb-enterprise
- yum/redhat/8Server/mongodb-enterprise

- name: rhel90
type: rpm
edition: enterprise
bucket: repo.mongodb.com
repos:
- yum/redhat/9/mongodb-enterprise
- yum/redhat/9Server/mongodb-enterprise

- name: amazon
type: rpm
edition: enterprise
Expand Down

0 comments on commit 17e3372

Please sign in to comment.