LOG.info("Configuring template for {}", name);
statementBuilder.name(name);
ensureUserExistsAndAuthorizeSudo(statementBuilder, clusterSpec.getClusterUser(),
clusterSpec.getPublicKey(), clusterSpec.getPrivateKey());
Statement bootstrap = statementBuilder.build(clusterSpec);
if (LOG.isDebugEnabled()) {
LOG.debug("Running script {}:\n{}", name, bootstrap.render(OsFamily.UNIX));
}
TemplateBuilder templateBuilder = computeService.templateBuilder().from(
instanceTemplate.getTemplate() != null ? instanceTemplate.getTemplate() :
clusterSpec.getTemplate());