Anatomy of a Recipe
This topic provides an overview of the recipe framework, terminology, and syntax.
- Cloudify is designed to onboard and manage applications
- An application is a set of services
- An application recipe describes the application name, the services it requires and their interdependencies
- A service is a cluster of service instances that make-up an application tier (e.g. a web container, a database, or a cluster of Tomcats service instances)
It is important to distinguish between a service and a service instance. A service can be defined as a cluster which is composed of at least one service instance. Every service instance resides on one host (typically this would be a VM), whereas a service is the aggregation of all service instances and as such can span multiple machines.
- Each service is installed, managed, and monitored by a service recipe
- A service recipe describes the following information:
- General: The service name, service type, number of service instances, and the service icon filename
- Compute: Hardware and software requirements
- Lifecycle events: Maps events to handling scripts or closures and, as such, is the most important part of the service recipe
- Custom commands: Maps custom events to handling scripts that can be invoked as commands using the Cloudify shell
- Probes: For monitoring service configuration, performance, and availability
- UI layout: Describes the layout to use for displaying the collected metrics in the Cloudify web management console
In future releases, Cloudify will also support “provided services”. These services are not provisioned by Cloudify and are only monitored for availability.
Application recipes are the execution plans for installing, starting, orchestrating, and monitoring your application stack without changing the application’s code or architecture. Cloudify uses the following recipes types:
|Application||An application recipe is comprised of the application descriptor file and the recipes for the services it requires.|
|Service||Each service recipe is comprised of the service descriptor file, handler scripts, optional monitoring plugins, an optional service icon file, and an optional recipe parameter file.|
To deploy an application you need a single application recipe that uses one or more service recipes to provision the services it requires. All the files that comprise the application recipe must be located in the application’s recipe folder.
The following diagram depicts the application’s recipe folder structure.