Skip to content

Sunlight Recipe Manager

The Sunlight Recipe Manager is a free tool provided to Sunlight users to enable automation of resource configuration and on-demand application deployment onto the Sunlight platform. It is designed enable Sunlight users a platform to fully automate the end-to-end deployment of application environments utilising the best performance offered by a Sunlight platform. Each recipe provides the following logical functions:

  1. Configures the execution environment including CPU cores, storage datastores and network objects in an optimal setup required for the application
  2. Configures the infrastructure environment to host the application including appropriate sized VMs across available cluster resources
  3. Configures the application environment to install the appropriate application software, configure it as required and start the application if appropriate.

The Sunlight Recipe Manager tool is leveraging the Ansible framework to manage the deployment of applications. The Ansible playbooks are the customised logic that facilitates a series of operations to be executed on the Sunlight platform to configure and deploy applications.

Usage of Recipe Manager

The process to deploy an application on the Sunlight platform using the recipe manager goes as follows:

Step 1 - Deploy a SIM (Sunlight Infrastructure Manager) on AWS.

Step 2 - Add an on-premise cluster to the SIM or create an AWS cluster from the SIM.

Step 3 - Deploy the Recipe Manager on the SIM following the guide on Usage of Recipe Manager.

Note

The recipes available on the recipe manager will be regularly updated to support more application deployment scenarios. You can update to the latest recipes by running “git pull” in the recipe manager directory.

Recipe Manager CLI

Go to the directory where the recipe manager was downloaded. Run the recipe manager:

# recipeManager.py --help
usage: recipeManager.py [-h] [-ls {cluster,recipe,deployment,recipe-hub}]
                        [-d [recipe-id] [cluster-id]] [-t [tag]]
                        [-l [limit-host]] [-u recipe [recipe-hub-name]
                        [recipe-hub-branch]] [-c [cluster-id]] [-v]

Sunlight Recipe Manager

optional arguments:
  -h, --help            show this help message and exit
  -ls {cluster,recipe,deployment,recipe-hub}, --list {cluster,recipe,deployment,recipe-hub}
                        show a list of Sunlight clusters/recipes/deployments/recipe-hubs managed by the SIM
  -d [recipe-id] [cluster-id], --deploy [recipe-id] [cluster-id]
                        execute the recipe against the designated cluster
  -t [tag], --tag [tag]
                        Optional - specify a tag for a deployment
  -l [limit-host], --limit [limit-host]
                        Optional - limit to the given host for a deployment
  -u recipe [recipe-hub-name] [recipe-hub-branch], --update recipe [recipe-hub-name] [recipe-hub-branch]
                        update the recipes from a specific branch of a given recipe hub
  -c [cluster-id], --cleanup [cluster-id]
                        remove all the VMs and configurations on this Sunlight cluster to restore to a fresh environment for deploying other recipes.
  -v, --verbose         show the details in the foreground while the deployment is running

The recipe manager has the following parameters available.

Short Full Description of the parameter
-h --help show this help message and exit
-ls --list {cluster,recipe,deployment} show a list of Sunlight clusters/recipes/deployments managed by the SIM.
-d --deploy [recipe-id] [cluster-id] execute the recipe against the designated cluster.
-u --update update the recipes from a specific branch of a given recipe hub.
-c --cleanup remove all the VMs and configurations on this Sunlight cluster to restore to a fresh environment for deploying other recipes.
-v --verbose show the details in the foreground while the deployment is running.

Step 1 - List available clusters added to this SIM

[email protected]:~/platform_scripts/recipe_manager# ./recipeManager.py --list cluster
The following clusters are managed by this SIM:
------------
Cluster ID: SL-7539850186079518
      Name: Altos-R385
      State: Online
 ------------
 Cluster ID: SL-5862251411051901
       Name: Dev cluster
      State: Offline
 ------------
 Cluster ID: SL-6025686704595228
       Name: CBG demo111
      State: Online
 ------------

Step 2 - List available recipes

[email protected]:~/platform_scripts/recipe_manager# ./recipeManager.py --list recipe
The following recipes are available on this SIM:
------------
Recipe ID: benchmark-tools
    Description: Deploy benchmark tools including fio and vdbench
------------
Recipe ID: cloudera
    Description: Deploy CDP Private Cloud Base
------------
Recipe ID: fio-workload
    Description: Deploy Fio-based workload to drive maximum IOPs
------------

Step 3 - Deploy recipe

[email protected]:~/platform_scripts/recipe_manager# ./recipeManager.py --deploy fio SL-6025686704595228
Recipe: Deploy Fio-based max iops demo workload
Generating the inventory for cluster SL-6025686704595228
The cluster is being deployed in the background.

Step 4 - Show deployment status

[email protected]:~/platform_scripts/recipe_manager# ./recipeManager.py --list deployment
The following deployments are managed by this SIM:
--------------
Deployment ID: a50c0dc5-c86a-4fbb-80c0-bb1d69280362
      Cluster: SL-6025686704595228
       Recipe: fio
       Status: deploying
--------------

Step 5 - Cleanup and reset cluster to factory default

[email protected]:~/platform_scripts/recipe_manager# ./recipeManager.py --cleanup SL-6025686704595228
The following deployments are managed by this SIM:
--------------
Deployment ID: 94538a6d-6305-4acc-afdf-9132ebc51096
      Cluster: SL-6025686704595228
       Recipe: fio
       Status: Deleting
--------------

More Information

  • https://bitbucket.org/sunlightio/recipe_manager
  • https://bitbucket.org/sunlightio/sunlight-recipe-hub
  • https://performance.sunlight.io/