in backend/bms_app/services/control_node.py [0:0]
def _generate_startup_script(cls, operation, gcs_config_dir, context):
"""Return GCE control node's startup script."""
script_context = {
'operation_id': operation.id,
'bucket_name': settings.GCS_BUCKET,
'gcs_config_dir': gcs_config_dir,
'operation_type': cls.OPERATION_TYPE,
'gcp_project_name': settings.GCP_PROJECT_NAME,
'pubsub_topic': settings.GCP_PUBSUB_TOPIC,
}
extra_script_context = cls._get_extra_startup_script_context(
operation,
gcs_config_dir,
context
)
script_context.update(extra_script_context)
raw_startup_script = render_template(
'runner.sh.j2',
**script_context
)
return raw_startup_script