The recipe is the plugin mechanism used for adding new functionalities to the OnApp cloud. Each recipe is a set of instructions that trigger events at certain stages during the execution of certain services/event in the cloud. Essentially, recipes allow inputting code into virtual servers, appliances or the Control Panel server. This enables administrators to use recipes for configuring the server or report on it, thus providing advanced customization options in a standard environment.
Recipes run over SSH, and all commands triggered can run on virtual servers, appliances or the Control Panel server.
SSH connection is not required for running recipes on VMware virtual servers.
OnApp CP does not update the status of the recipe if it takes longer than 1 hour to complete the transaction.
Recipes allow admins to perform the following operations:
- Perform post script installation.
- Use post provision installation scripts for third-party applications, agents, etc.
- Disk reclaiming.
- Update/modify virtual servers and Compute zones with script injection.
- Allow host to spin up custom virtual servers without requiring custom templates.
- Download, run and report audit tools.
Use of recipes brings cloud administrators more control over their cloud environment and allows them to self-maintain such tasks as custom template creation, etc.
You can use recipes for Unix (Linux and FreeBSD) and Windows virtual servers, smart servers, baremetal servers, virtual server templates, Compute zones and the control panel server. For details, refer to the relevant sections of the Admin guide:
- Template Recipes
- Virtual Server Recipes
- vCenter Virtual Server Recipes
- vCloud Virtual Server Recipes
- Smart Server Recipes
- Baremetal Server Recipes
- Container Server Recipes
- Compute Zone Recipes
- Control Panel Recipes
To be able to use recipes in the cloud, you must enable recipe permissions first.
The recipes run when the appropriate events are triggered on the compute resources, virtual servers or the CP server. Depending on the object where the event occurs, the recipe runs on compute resource/VS/CP and contains the variables for that object. When the recipe execution on compute resource is triggered by the event happening on a virtual server, then the recipe also contains the variables for the virtual server object. The same relates to the CP server.
Here is the list of variables that you can define in recipes:
Compute resource variables
IP_ADDRESS - Compute resource IP address
VIRTUALIZATION - Compute resource virtualization type; Xen, KVM or VMware
SERVER_TYPE - server type: virtual, smart or baremetal
Virtual Server variables
VM_IDENTIFIER - virtual server identifier
IP_ADDRESS - virtual server IP address
HOSTNAME - hostname of a virtual server
ROOT_PASSWORD - server root password
OPERATING_SYSTEM - virtual server operating system
OPERATING_SYSTEM_DISTRO - virtual server OS distribution
OPERATING_SYSTEM_ARCH - architecture of the operating system
OPERATING_SYSTEM_EDITION - edition of the OS
VM_USER_ID - ID of the virtual server user
VM_USER_FIRSTNAME - first name of the virtual server user
VM_USER_LASTNAME - last name of the virtual server user
VM_USER_EMAIL - email of the virtual server user
All recipes have access to these variables:
CP_ADDRESS - control panel server IP address
RESPONSE_FROM_PREVIOUS - response from the previous recipe step
Each user can set custom recipe variables for different appliances. For details, refer to the following sections: