Node Recipes

When creating a cluster, you can optionally upload one or more node recipes. Node Recipes are scripts which will be executed on specific node(s) before or after the cluster installation. You can use recipes for tasks such as installing additional software or performing advanced cluster configuration.

Writing Node Recipes

When using recipes, consider the following:

Adding Node Recipes

To add node recipes:

  1. Place your scripts in a network location accessible from the cloud controller and cluster instances VPC.
  2. Define the recipe when creating a cluster using the cloud controller UI or CLI.
  3. For each recipe, you need to specify:

    • The URL pointing to the script
    • Whether to execute the script before ("pre-install") or after ("post-install") the Ambari cluster installation
    • On which node type to execute the script ("master", "worker", "compute")

You can also add recipes through the CLI. For more information, refer to the Node Recpies section in the CLI documentation.

Executing Node Recipes

The scripts will be executed as root. The recipe output is written to /var/log/recipes on each node on which it was executed.