Skip to content

Commit aa1eb0b

Browse files
committed
PHPC-1047: Add MongoDB 3.6 to test framework
1 parent 479b799 commit aa1eb0b

File tree

6 files changed

+84
-5
lines changed

6 files changed

+84
-5
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ URIs and resemble the following:
3737
"STANDALONE_X509": "mongodb:\/\/C=US,ST=New York,L=New York City,O=MongoDB,OU=KernelUser,CN=client@192.168.112.10:2300\/?authSource=$external&authMechanism=MONGODB-X509",
3838
"STANDALONE_PLAIN": "mongodb:\/\/root:toor@192.168.112.10:2400\/?authSource=admin",
3939
"REPLICASET": "mongodb:\/\/192.168.112.10:3000,192.168.112.10:3001,192.168.112.10:3002\/?replicaSet=REPLICASET",
40-
"REPLICASET_30": "mongodb:\/\/192.168.112.10:3100,192.168.112.10:3101,192.168.112.10:3102\/?replicaSet=REPLICASET_30"
40+
"REPLICASET_30": "mongodb:\/\/192.168.112.10:3100,192.168.112.10:3101,192.168.112.10:3102\/?replicaSet=REPLICASET_30",
41+
"REPLICASET_36": "mongodb:\/\/192.168.112.10:3200,192.168.112.10:3201,192.168.112.10:3202\/?replicaSet=REPLICASET_36"
4142
}
4243
```
4344

scripts/presets/replicaset-36.json

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"id": "REPLICASET_36",
3+
"name": "mongod",
4+
"members": [
5+
{
6+
"procParams": {
7+
"dbpath": "/tmp/REPLICASET/3200/",
8+
"ipv6": true,
9+
"logappend": true,
10+
"logpath": "/tmp/REPLICASET/3200/mongod.log",
11+
"journal": true,
12+
"noprealloc": true,
13+
"nssize": 1,
14+
"port": 3200,
15+
"smallfiles": true,
16+
"setParameter": {"enableTestCommands": 1}
17+
},
18+
"rsParams": {
19+
"priority": 99,
20+
"tags": {
21+
"ordinal": "one",
22+
"dc": "pa"
23+
}
24+
},
25+
"server_id": "RS-36-one"
26+
},
27+
{
28+
"procParams": {
29+
"dbpath": "/tmp/REPLICASET/3201/",
30+
"ipv6": true,
31+
"logappend": true,
32+
"logpath": "/tmp/REPLICASET/3201/mongod.log",
33+
"journal": true,
34+
"noprealloc": true,
35+
"nssize": 1,
36+
"port": 3201,
37+
"smallfiles": true,
38+
"setParameter": {"enableTestCommands": 1}
39+
},
40+
"rsParams": {
41+
"priority": 1.1,
42+
"tags": {
43+
"ordinal": "two",
44+
"dc": "nyc"
45+
}
46+
},
47+
"server_id": "RS-36-two"
48+
},
49+
{
50+
"procParams": {
51+
"dbpath": "/tmp/REPLICASET/3202/",
52+
"ipv6": true,
53+
"logappend": true,
54+
"logpath": "/tmp/REPLICASET/3202/mongod.log",
55+
"journal": true,
56+
"noprealloc": true,
57+
"nssize": 1,
58+
"port": 3202,
59+
"smallfiles": true,
60+
"setParameter": {"enableTestCommands": 1}
61+
},
62+
"rsParams": {
63+
"arbiterOnly": true
64+
65+
},
66+
"server_id": "RS-36-arbiter"
67+
}
68+
],
69+
"version": "36-release"
70+
}
71+

scripts/start-servers.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ function lap() {
2929
"replicasets" => [
3030
"scripts/presets/replicaset.json",
3131
"scripts/presets/replicaset-30.json",
32+
"scripts/presets/replicaset-36.json",
3233
],
3334
];
3435

scripts/ubuntu/mongo-orchestration-config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"releases": {
33
"32-release": "/home/vagrant/3.2.0/usr/bin",
44
"30-release": "/home/vagrant/3.0.3/usr/bin",
5-
"26-release": "/home/vagrant/2.6.9/usr/bin"
5+
"26-release": "/home/vagrant/2.6.9/usr/bin",
6+
"36-release": "/home/vagrant/3.6.0rc3/usr/bin"
67
}
78
}

scripts/ubuntu/mongo-orchestration.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,32 @@
22
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
33
# 3.2 key
44
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
5+
# testing key
6+
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 58712A2291FA4AD5
57
echo 'deb http://repo.mongodb.com/apt/ubuntu precise/mongodb-enterprise/3.2 multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-enterprise-3.2.list
68
echo 'deb http://repo.mongodb.com/apt/ubuntu precise/mongodb-enterprise/3.0 multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-enterprise-3.0.list
79
echo 'deb http://repo.mongodb.com/apt/ubuntu precise/mongodb-enterprise/2.6 multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-enterprise-2.6.list
10+
echo 'deb http://repo.mongodb.com/apt/ubuntu precise/mongodb-enterprise/testing multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-enterprise-testing.list
811
apt-get update
912

10-
apt-get install -y libsnmp15 libgsasl7
13+
apt-get install -y libsnmp15 libgsasl7 libcurl4-openssl-dev
1114

1215
sudo apt-get download mongodb-enterprise-server=3.2.0
1316
sudo apt-get download mongodb-enterprise-mongos=3.2.0
1417
sudo apt-get download mongodb-enterprise-server=3.0.3
1518
sudo apt-get download mongodb-enterprise-server=2.6.9
19+
sudo apt-get download mongodb-enterprise-server=3.6.0~rc3
1620
dpkg -x mongodb-enterprise-server_2.6.9_amd64.deb 2.6.9
1721
dpkg -x mongodb-enterprise-server_3.0.3_amd64.deb 3.0.3
1822
dpkg -x mongodb-enterprise-server_3.2.0_amd64.deb 3.2.0
1923
dpkg -x mongodb-enterprise-mongos_3.2.0_amd64.deb 3.2.0
20-
24+
dpkg -x mongodb-enterprise-server_3.6.0~rc3_amd64.deb 3.6.0rc3
2125

2226

2327
# Python stuff for mongo-orchestration
2428
apt-get install -y python python-dev python-pip
2529

26-
pip install --upgrade 'git+https://github.com/10gen/mongo-orchestration.git#egg=mongo_orchestration'
30+
pip install --index-url=https://pypi.python.org/simple/ --upgrade 'git+https://github.com/10gen/mongo-orchestration.git#egg=mongo_orchestration'
2731

2832
# Launch mongo-orchestration
2933
mongo-orchestration -f mongo-orchestration-config.json -b 192.168.112.10 --enable-majority-read-concern start

tests/utils/basic.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ $servers = array(
2121
"STANDALONE_PLAIN" => "",
2222
"REPLICASET" => "",
2323
"REPLICASET_30" => "",
24+
"REPLICASET_36" => "",
2425
);
2526
$servers = array_merge($servers, $config);
2627
def($servers);

0 commit comments

Comments
 (0)