Bug 1034055 - implement c3.xlarge slave class for Linux64 test spot instances r=rail
--- a/cloudtools/aws/sanity.py
+++ b/cloudtools/aws/sanity.py
@@ -10,51 +10,53 @@ import calendar
import datetime
from cloudtools.aws import parse_aws_time
log = logging.getLogger(__name__)
BUILDAPI_URL_JSON = "http://buildapi.pvt.build.mozilla.org/buildapi/recent/{slave_name}?format=json"
BUILDAPI_URL = "http://buildapi.pvt.build.mozilla.org/buildapi/recent/{slave_name}"
-SLAVE_TAGS = ('try-linux64', 'tst-linux32', 'tst-linux64', 'bld-linux64')
+SLAVE_TAGS = ('try-linux64', 'tst-linux32', 'tst-linux64', 'tst-emulator64', 'bld-linux64')
KNOWN_TYPES = ('puppetmaster', 'buildbot-master', 'dev-linux64', 'infra',
'bld-linux64', 'try-linux64', 'tst-linux32', 'tst-linux64',
- 'tst-win64', 'dev', 'servo-linux64', 'packager', 'vcssync',
- "servo-puppet1", "signing")
+ 'tst-emulator64', 'tst-win64', 'dev', 'servo-linux64', 'packager',
+ 'vcssync', "servo-puppet1", "signing")
EXPECTED_MAX_UPTIME = {
"puppetmaster": "meh",
"servo-puppet1": "meh",
"buildbot-master": "meh",
"dev": "meh",
"infra": "meh",
"vcssync": "meh",
"dev-linux64": 8,
"bld-linux64": 24,
"try-linux64": 12,
"tst-linux32": 12,
"tst-linux64": 12,
+ "tst-emulator64": 12,
"servo-linux64": 8,
"default": 4
}
EXPECTED_MAX_DOWNTIME = {
"puppetmaster": 0,
"servo-puppet1": 0,
"buildbot-master": 0,
"dev": 0,
"infra": 0,
"vcssync": 0,
"dev-linux64": 72,
"bld-linux64": 72,
"try-linux64": 72,
"tst-linux32": 72,
"tst-linux64": 72,
+ "tst-emulator64": 72,
"servo-linux64": 72,
"packager": "meh",
"default": 24
}
def timedelta_to_time_string(timeout):
"""converts a time delta in seconds to Xd, Yh, Zm.
--- a/cloudtools/slavealloc.py
+++ b/cloudtools/slavealloc.py
@@ -67,18 +67,28 @@ def slave_moz_type(slave):
slave.get("trustlevel") == "try":
return "tst-linux32"
# tst-linux64
if slave.get("bitlength") == "64" and \
slave.get("environment") == "prod" and \
slave.get("distro") == "ubuntu64" and \
slave.get("purpose") == "tests" and \
+ slave.get("speed") == "m1.medium" and \
slave.get("trustlevel") == "try":
return "tst-linux64"
+
+ # tst-emulator64
+ if slave.get("bitlength") == "64" and \
+ slave.get("environment") == "prod" and \
+ slave.get("distro") == "ubuntu64" and \
+ slave.get("purpose") == "tests" and \
+ slave.get("speed") == "c3.xlarge" and \
+ slave.get("trustlevel") == "try":
+ return "tst-emulator64"
return None
def get_slaves_json(url, cache):
try:
mtime = os.stat(cache).st_mtime
now = time.time()
--- a/configs/instance2ami.json
+++ b/configs/instance2ami.json
@@ -13,10 +13,15 @@
"instance-config": "tst-linux32",
"ssh-key": "aws-releng",
"ssh-user": "ubuntu",
"regions": ["us-east-1", "us-west-2"]},
{"ami-config": "centos-6-x86_64-hvm-base",
"instance-config": "bld-linux64",
"ssh-key": "aws-releng",
"ssh-user": "ec2-user",
+ "regions": ["us-east-1", "us-west-2"]},
+ {"ami-config": "ubuntu-12.04-x86_64-desktop",
+ "instance-config": "tst-emulator64",
+ "ssh-key": "aws-releng",
+ "ssh-user": "ubuntu",
"regions": ["us-east-1", "us-west-2"]}
]
--- a/configs/watch_pending.cfg
+++ b/configs/watch_pending.cfg
@@ -35,16 +35,22 @@
"bid_price": 0.07}
],
"tst-linux32": [
{"instance_type": "m1.medium",
"ignored_azs": ["us-east-1b"],
"performance_constant": 1,
"bid_price": 0.07}
],
+ "tst-emulator64": [
+ {"instance_type": "c3.xlarge",
+ "ignored_azs": ["us-east-1b"],
+ "performance_constant": 1,
+ "bid_price": 0.18}
+ ],
"bld-linux64": [
{"instance_type": "c3.xlarge",
"ignored_azs": ["us-east-1b"],
"performance_constant": 1,
"bid_price": 0.18},
{"instance_type": "m3.xlarge",
"performance_constant": 1.1,
"ignored_azs": ["us-east-1b"],
@@ -92,35 +98,39 @@
"performance_constant": 2,
"bid_price": 0.18}
]
},
"limits": {
"global": {
"tst-linux64": 1300,
"tst-linux32": 999,
+ "tst-emulator64": 1300,
"bld-linux64": 600
},
"us-east-1": {
"tst-linux64": 1000,
"tst-linux32": 666,
+ "tst-emulator64": 1000,
"bld-linux64": 400,
"try-linux64": 200
},
"us-west-2": {
"tst-linux64": 1000,
"tst-linux32": 666,
+ "tst-emulator64": 1000,
"bld-linux64": 400,
"try-linux64": 200
}
}
},
"ondemand": {
"limits": {
"global": {
"tst-linux64": 5,
"tst-linux32": 5,
+ "tst-emulator64": 5,
"try-linux64": 5,
"bld-linux64": 5
}
}
}
}
--- a/scripts/get_spot_amis.py
+++ b/scripts/get_spot_amis.py
@@ -20,15 +20,15 @@ if __name__ == '__main__':
args = parser.parse_args()
regions = args.regions
moz_instance_types = args.moz_instance_types
if not args.regions:
regions = DEFAULT_REGIONS
if not moz_instance_types:
moz_instance_types = ["bld-linux64", "try-linux64", "tst-linux64",
- "tst-linux32"]
+ "tst-linux32", "tst-emulator64"]
for region in regions:
for moz_instance_type in moz_instance_types:
ami = get_ami(region=region, moz_instance_type=moz_instance_type)
print "%s, %s: %s (%s)" % (moz_instance_type, region, ami.id,
ami.tags.get("Name"))