Advanced Cluster Options
Also available as:

Writing recipes

Refer to these guidelines when creating your recipes.

When using recipes, consider the following guidelines:

  • Cloudbreak supports running bash and python scripts as recipes. We recommend using scripts with Shebang character sequence, for example:
    #!/usr/bin/env sh
    #!/usr/bin/env bash
    #!/bin/sh -x
    #!/usr/bin/env python
  • The scripts are executed as root. The recipe output is written to /var/log/recipes on each node on which it was executed.
  • Recipe logs could be found at /var/log/recipes/${RECIPE_TYPE}/${RECIPE_NAME}.log
  • The scripts are executed on all nodes of the host groups that you select (such as “master”, “worker”, “compute”).
  • In order to be executed, your script must be in a network location which is accessible from the Cloudbreak and cluster instances VPC.
  • Make sure to follow Linux best practices when creating your scripts. For example, don’t forget to script “Yes” auto-answers where needed.
  • Do not execute yum update –y as it may update other components on the instances (such as salt) – which can create unintended or unstable behavior.

Example Python script

print("An example of a python script")
import sys

Example bash script for yum proxy settings

cat >> /etc/yum.conf