SERVER-32437 add Amazon Linux 2 platform support

This commit is contained in:
Zakhar Kleyman 2018-03-29 10:38:33 -04:00
parent f8a41664f6
commit cbf3e5344f
No known key found for this signature in database
GPG Key ID: 2519D7DB755D9585
6 changed files with 210 additions and 15 deletions

View File

@ -29,6 +29,11 @@ platforms:
image_id: ami-c481fad3
transport:
username: ec2-user
- name: amazon2
driver:
image_id: ami-428aa838
transport:
username: ec2-user
- name: debian71
driver:
image_id: ami-4b124a22

View File

@ -15,27 +15,46 @@ describe command("#{service} mongod start") do
its('exit_status') { should eq 0 }
end
describe service('mongod') do
it { should be_running }
# Inspec treats all amazon linux as upstart, we explicitly make it use
# systemd_service https://github.com/chef/inspec/issues/2639
if (os[:name] == 'amazon' and os[:release] == '2.0')
describe systemd_service('mongod') do
it { should be_running }
end
else
describe service('mongod') do
it { should be_running }
end
end
describe command("#{service} mongod stop") do
its('exit_status') { should eq 0 }
end
describe service('mongod') do
it { should_not be_running }
if (os[:name] == 'amazon' and os[:release] == '2.0')
describe systemd_service('mongod') do
it { should_not be_running }
end
else
describe service('mongod') do
it { should_not be_running }
end
end
describe command("#{service} mongod restart") do
its('exit_status') { should eq 0 }
end
describe service('mongod') do
it { should be_running }
if (os[:name] == 'amazon' and os[:release] == '2.0')
describe systemd_service('mongod') do
it { should be_running }
end
else
describe service('mongod') do
it { should be_running }
end
end
if os[:arch] == 'x86_64' and
(os[:name] == 'ubuntu' and
(os[:release][0...5] == '14.04' or os[:release][0...5] == '16.04')) or

View File

@ -45,7 +45,7 @@ import urlparse
ARCH_CHOICES = ["x86_64", "ppc64le", "s390x", "arm64"]
# Made up names for the flavors of distribution we package for.
DISTROS = ["suse", "debian", "redhat", "ubuntu", "amazon"]
DISTROS = ["suse", "debian", "redhat", "ubuntu", "amazon", "amazon2"]
class EnterpriseSpec(packager.Spec):

View File

@ -41,7 +41,7 @@ import time
ARCH_CHOICES = ["x86_64", "arm64"]
# Made up names for the flavors of distribution we package for.
DISTROS = ["suse", "debian", "redhat", "ubuntu", "amazon"]
DISTROS = ["suse", "debian", "redhat", "ubuntu", "amazon", "amazon2"]
class Spec(object):
@ -257,6 +257,8 @@ class Distro(object):
return re.sub(r'^rhel(\d).*$', r'\1', build_os)
if self.n == 'amazon':
return "2013.03"
elif self.n == 'amazon2':
return "2017.12"
elif self.n == 'ubuntu':
if build_os == 'ubuntu1204':
return "precise"
@ -297,8 +299,8 @@ class Distro(object):
return ["suse11", "suse12"]
elif re.search("(redhat|fedora|centos)", self.n):
return ["rhel70", "rhel71", "rhel72", "rhel62", "rhel55"]
elif self.n == 'amazon':
return ["amazon"]
elif self.n in ['amazon', 'amazon2']:
return [self.n]
elif self.n == 'ubuntu':
return [
"ubuntu1204",
@ -316,6 +318,8 @@ class Distro(object):
if self.n == 'amazon':
return 'amzn1'
elif self.n == 'amazon2':
return 'amzn2'
else:
return re.sub(r'^rh(el\d).*$', r'\1', build_os)

View File

@ -1404,9 +1404,11 @@ functions:
for i in {1..3}
do
if ! kitchen verify "${packager_distro}"; then
# kitchen commands use regex so 'kitchen verify amazon' matches both amazon and amazon2
# that's why we pass $ at the end of "${packager_distro}"
if ! kitchen verify "${packager_distro}"\$; then
verified="false"
kitchen destroy "${packager_distro}" || true
kitchen destroy "${packager_distro}"\$ || true
sleep 30
else
verified="true"
@ -1414,7 +1416,7 @@ functions:
fi
done
kitchen destroy "${packager_distro}" || true
kitchen destroy "${packager_distro}"\$ || true
test "$verified" = "true"
"fetch test_lifecycle.yml":
@ -6062,6 +6064,171 @@ buildvariants:
- ubuntu1604-packer
- name: push
- name: enterprise-amazon2
display_name: "Enterprise Amazon Linux 2"
modules:
- enterprise
run_on:
- amazon2-test
batchtime: 1440 # 1 day
expansions:
test_flags: >-
--excludeWithAnyTags=requires_mmapv1
--excludeWithAnyTags=SERVER-34286
tooltags: "-tags 'ssl sasl'"
push_path: linux
push_bucket: downloads.10gen.com
push_name: linux
push_arch: x86_64-enterprise-amazon2
compile_flags: --ssl MONGO_DISTMOD=amazon2 --release -j$(grep -c ^processor /proc/cpuinfo) --variables-files=etc/scons/mongodbtoolchain_gcc.vars
num_jobs_available: $(grep -c ^processor /proc/cpuinfo)
has_packages: true
packager_script: packager-enterprise.py
packager_arch: x86_64
packager_distro: amazon2
repo_edition: enterprise
scons_cache_scope: shared
build_mongoreplay: true
tasks:
- name: compile
distros:
- amazon2-build
- name: compile_all
distros:
- amazon2-build
- name: aggregation_auth
- name: aggregation
- name: audit
- name: auth
- name: auth_audit
- name: dbtest
- name: ese
- name: failpoints_auth
- name: jsCore
- name: jsCore_ese
- name: jsCore_auth
- name: jsCore_decimal
- name: jsCore_txns
- name: aggregation_fuzzer
- name: jstestfuzz
- name: jstestfuzz_concurrent
- name: jstestfuzz_concurrent_replication
- name: jstestfuzz_concurrent_sharded
- name: jstestfuzz_replication
- name: jstestfuzz_sharded
- name: noPassthrough
- name: noPassthroughWithMongod
- name: bulk_gle_passthrough
- name: replica_sets_auth
- name: replica_sets_ese
- name: powercycle
- name: sasl
- name: sharding_auth
- name: sharding_auth_audit
- name: sharding_ese
- name: slow1
- name: serial_run
- name: sharded_collections_jscore_passthrough
- name: sharding_jscore_passthrough
- name: sharding_jscore_op_query_passthrough
- name: sharding_jscore_passthrough_wire_ops
- name: snmp
- name: ssl
- name: sslSpecial
- name: package
distros:
- ubuntu1604-packer
- name: push
- name: amazon2
display_name: SSL Amazon Linux 2
run_on:
- amazon2-test
batchtime: 1440 # 1 day
expansions:
test_flags: >-
--excludeWithAnyTags=requires_mmapv1
--excludeWithAnyTags=SERVER-34286
tooltags: "-tags 'ssl'"
push_path: linux
push_bucket: downloads.mongodb.org
push_name: linux
push_arch: x86_64-amazon2
compile_flags: --ssl MONGO_DISTMOD=amazon2 -j$(grep -c ^processor /proc/cpuinfo) --release --variables-files=etc/scons/mongodbtoolchain_gcc.vars
multiversion_platform: amazon
multiversion_edition: targeted
num_jobs_available: $(grep -c ^processor /proc/cpuinfo)
has_packages: true
packager_script: packager.py
packager_arch: x86_64
packager_distro: amazon2
repo_edition: org
scons_cache_scope: shared
shared_scons_pruning: true
build_mongoreplay: true
tasks:
- name: compile
distros:
- amazon2-build
- name: compile_all
distros:
- amazon2-build
- name: aggregation
- name: aggregation_auth
- name: auth
- name: dbtest
- name: disk_wiredtiger
- name: failpoints
- name: failpoints_auth
- name: gle_auth
- name: gle_auth_write_cmd
- name: gle_auth_basics_passthrough
- name: gle_auth_basics_passthrough_write_cmd
- name: sharding_gle_auth_basics_passthrough
- name: sharding_gle_auth_basics_passthrough_write_cmd
- name: jsCore
- name: jsCore_auth
- name: jsCore_compatibility
- name: jsCore_decimal
- name: jsCore_txns
- name: aggregation_fuzzer
- name: jstestfuzz
- name: jstestfuzz_concurrent
- name: jstestfuzz_concurrent_replication
- name: jstestfuzz_concurrent_sharded
- name: jstestfuzz_replication
- name: jstestfuzz_sharded
- name: mongosTest
- name: multiversion
- name: noPassthrough
- name: noPassthroughWithMongod
- name: bulk_gle_passthrough
- name: parallel
- name: parallel_compatibility
- name: concurrency
- name: concurrency_replication
- name: concurrency_sharded
- name: concurrency_simultaneous
- name: replica_sets
- name: replica_sets_auth
- name: replica_sets_jscore_passthrough
- name: sharding
- name: sharding_auth
- name: sharding_last_stable_mongos_and_mixed_shards
- name: slow1
- name: serial_run
- name: sharded_collections_jscore_passthrough
- name: sharding_jscore_passthrough
- name: sharding_jscore_op_query_passthrough
- name: sharding_jscore_passthrough_wire_ops
- name: ssl
- name: sslSpecial
- name: tool
- name: package
distros:
- ubuntu1604-packer
- name: push
###########################################
# Windows buildvariants #
###########################################

View File

@ -1,7 +1,7 @@
/**
* Confirms inclusion of query, command object and planSummary in currentOp() for CRUD operations.
* This test should not be run in the parallel suite as it sets fail points.
* @tags: [requires_replication, requires_sharding]
* @tags: [requires_replication, requires_sharding, SERVER-34286]
*/
(function() {
"use strict";