Recipes

Although Cloudbreak lets you provision HDP clusters in the cloud based on custom Ambari blueprints, Cloudbreak provisioning options don't consider all possible use cases. For that reason, we introduced recipes.

A recipe is a script that runs on all nodes of a selected node group before or after the Ambari cluster installation. You can use recipes for tasks such as installing additional software or performing advanced cluster configuration. For example, you can use a recipe to put a JAR file on the Hadoop classpath.

When creating a cluster, you can optionally upload one or more "recipes" (custom scripts) and they will be executed on a specific host group at a specified time. Available recipe execution times are:

Writing Recipes

When using recipes, consider the following:

Sample Recipe for Yum Proxy Setting

#!/bin/bash
cat >> /etc/yum.conf <<ENDOF
proxy=http://10.0.0.133:3128
ENDOF

Add Recipes

To add a recipe, perform these steps.

Steps

  1. Place your script in a network location accessible from Cloudbreak and cluster instances virtual network.

  2. Select Blueprints from the navigation pane.

  3. Click on Create Blueprint.

  4. Provide the following:

    Parameter Value
    Name Enter a name for your recipe.
    Description (Optional) Enter a description for your recipe.
    Execution Type Select one of the following options:
    • pre-ambari-start: The script will be executed prior to Ambari server start.
    • post-ambari-start: The script will be executed after Ambari server start but prior to cluster installation.
    • post-cluster-install: The script will be executed after cluster deployment.
    • pre-termination: The script will be executed before cluster termination.
    Script

    Select one of:

    • Script: Paste the script.
    • File: Point to a file on your machine that contains the recipe.
    • URL: Specify the URL for your recipe.

  5. When creating a cluster, you can select previously added recipes in the Recipes section.

Delete Recipes

You can delete previously added items by selecting and item and using the delete option.