Allow the build node AMI to be overridden in config
This commit is contained in:
parent
a2cb30246d
commit
61695eb439
1 changed files with 6 additions and 3 deletions
|
@ -111,9 +111,12 @@ class EC2Executor(BuilderExecutor):
|
|||
@coroutine
|
||||
def start_builder(self, realm, token, build_uuid):
|
||||
region = self.executor_config['EC2_REGION']
|
||||
channel = self.executor_config.get('COREOS_CHANNEL', 'stable')
|
||||
get_ami_callable = partial(self._get_coreos_ami, region, channel)
|
||||
coreos_ami = yield From(self._loop.run_in_executor(None, get_ami_callable))
|
||||
coreos_ami = self.executor_config.get('COREOS_AMI', None)
|
||||
if coreos_ami is None:
|
||||
channel = self.executor_config.get('COREOS_CHANNEL', 'stable')
|
||||
get_ami_callable = partial(self._get_coreos_ami, region, channel)
|
||||
coreos_ami = yield From(self._loop.run_in_executor(None, get_ami_callable))
|
||||
|
||||
user_data = self.generate_cloud_config(realm, token, channel, self.manager_hostname)
|
||||
|
||||
logger.debug('Generated cloud config: %s', user_data)
|
||||
|
|
Reference in a new issue