################################################################################## # The types defined here make use of features only available in the # 'cloudify_dsl_1_3' tosca definitions version ################################################################################## tosca_definitions_version: cloudify_dsl_1_3 ################################################################################## # Base type definitions ################################################################################## node_types: # base type for provided cloudify types cloudify.nodes.Root: interfaces: cloudify.interfaces.lifecycle: create: {} configure: {} start: {} stop: {} delete: {} cloudify.interfaces.validation: creation: {} deletion: {} cloudify.interfaces.monitoring: start: {} stop: {} # A host (physical / virtual or LXC) in a topology cloudify.nodes.Compute: derived_from: cloudify.nodes.Root properties: ip: default: '' os_family: description: | Property specifying what type of operating system family this compute node will run. default: linux agent_config: type: cloudify.datatypes.AgentConfig default: install_method: remote port: 22 # DEPRECATED install_agent: default: '' cloudify_agent: default: {} interfaces: cloudify.interfaces.cloudify_agent: ##################################################### # This operation will download the necessary files # for the agent and place them were needed. # --------------------------------------------------- # It will be executed on the manager and will connect # to the agent via fabric/winrm ##################################################### create: implementation: agent.cloudify_agent.installer.operations.create executor: central_deployment_agent ##################################################### # This operation will create all the necessary # configuration for the agent to be started. # --------------------------------------------------- # It will be executed on the manager and will connect # to the agent via fabric/winrm ##################################################### configure: implementation: agent.cloudify_agent.installer.operations.configure executor: central_deployment_agent ##################################################### # This operation will actually start the agent # process. # --------------------------------------------------- # It will be executed on the manager and will connect # to the agent via fabric/winrm ##################################################### start: implementation: agent.cloudify_agent.installer.operations.start executor: central_deployment_agent ##################################################### # This operation will stop the agent process. # --------------------------------------------------- # It will be executed on the manager and will connect # to the agent via fabric/winrm ##################################################### stop: implementation: agent.cloudify_agent.installer.operations.stop executor: central_deployment_agent ##################################################### # This operation will stop the agent process # without connecting to the remote host. # --------------------------------------------------- # It will be executed on the agent host via AMQP ##################################################### stop_amqp: implementation: agent.cloudify_agent.operations.stop executor: host_agent ##################################################### # This operation will delete agent resources. # --------------------------------------------------- # It will be executed on the manager and will connect # to the agent via fabric/winrm ##################################################### delete: implementation: agent.cloudify_agent.installer.operations.delete executor: central_deployment_agent ##################################################### # This operation will restart the agent process. # --------------------------------------------------- # It will be executed on the manager and will connect # to the agent via fabric/winrm ##################################################### restart: implementation: agent.cloudify_agent.installer.operations.restart executor: central_deployment_agent ##################################################### # This operation will restart the agent process # without connecting to the remote host. # the agent will have a new name after this # operation, but will of course listen to the same # queue. # --------------------------------------------------- # It will be executed on the agent host via AMQP ##################################################### restart_amqp: implementation: agent.cloudify_agent.operations.restart executor: host_agent ##################################################### # This operation will install additional plugins # on the agent environment. # --------------------------------------------------- # It will be executed directly on the agent via AMQP. # not requiring any new remote connection to be # established. ##################################################### install_plugins: implementation: agent.cloudify_agent.operations.install_plugins executor: host_agent ##################################################### # This operation will install new agent on specific # machine using existing agent. # --------------------------------------------------- # It will be executed on central deployment agent. # This agent will send installation request via AMQP # to an agent that was previously installed. # This request might be sent to other manager's # rabbitmq server. ##################################################### create_amqp: implementation: agent.cloudify_agent.operations.create_agent_amqp executor: central_deployment_agent inputs: install_agent_timeout: default: 300 ##################################################### # This operation attempts to communicate with an # agent that has already been installed. This # operation should not have side effects. # --------------------------------------------------- # It will be executed on the central deployment # agent. This request might be sent to a different # manager's RabbitMQ server ##################################################### validate_amqp: implementation: agent.cloudify_agent.operations.validate_agent_amqp executor: central_deployment_agent inputs: validate_agent_timeout: default: 20 cloudify.interfaces.host: # DEPRECATED get_state: {} cloudify.interfaces.monitoring_agent: install: {} start: {} stop: {} uninstall: {} # A Linux container with or without docker cloudify.nodes.Container: derived_from: cloudify.nodes.Compute # A tier in a topology cloudify.nodes.Tier: derived_from: cloudify.nodes.Root # A storage volume in a topology cloudify.nodes.Volume: derived_from: cloudify.nodes.Root # A file system a volume should be formatted to cloudify.nodes.FileSystem: derived_from: cloudify.nodes.Root properties: use_external_resource: description: > Enables the use of already formatted volumes. type: boolean default: false partition_type: description: > The partition type. 83 is a Linux Native Partition. type: integer default: 83 fs_type: description: > The type of the File System. Supported types are [ext2, ext3, ext4, fat, ntfs, swap] type: string fs_mount_path: description: > The path of the mount point. type: string interfaces: cloudify.interfaces.lifecycle: configure: implementation: script.script_runner.tasks.run inputs: script_path: default: https://raw.githubusercontent.com/cloudify-cosmo/cloudify-manager/4.0/resources/rest-service/cloudify/fs/mkfs.sh # A storage Container (Object Store segment) cloudify.nodes.ObjectStorage: derived_from: cloudify.nodes.Root # An isolated virtual layer 2 domain or a logical / virtual switch cloudify.nodes.Network: derived_from: cloudify.nodes.Root # An isolated virtual layer 3 subnet with IP range cloudify.nodes.Subnet: derived_from: cloudify.nodes.Root cloudify.nodes.Port: derived_from: cloudify.nodes.Root # A network router cloudify.nodes.Router: derived_from: cloudify.nodes.Root # A virtual Load Balancer cloudify.nodes.LoadBalancer: derived_from: cloudify.nodes.Root # A virtual floating IP cloudify.nodes.VirtualIP: derived_from: cloudify.nodes.Root # A security group cloudify.nodes.SecurityGroup: derived_from: cloudify.nodes.Root # A middleware component in a topology cloudify.nodes.SoftwareComponent: derived_from: cloudify.nodes.Root cloudify.nodes.DBMS: derived_from: cloudify.nodes.SoftwareComponent cloudify.nodes.Database: derived_from: cloudify.nodes.Root cloudify.nodes.WebServer: derived_from: cloudify.nodes.SoftwareComponent properties: port: default: 80 cloudify.nodes.ApplicationServer: derived_from: cloudify.nodes.SoftwareComponent cloudify.nodes.MessageBusServer: derived_from: cloudify.nodes.SoftwareComponent # An application artifact to deploy cloudify.nodes.ApplicationModule: derived_from: cloudify.nodes.Root # A type for a Cloudify Manager, to be used in manager blueprints cloudify.nodes.CloudifyManager: derived_from: cloudify.nodes.SoftwareComponent properties: cloudify: description: > Configuration for Cloudify Manager default: resources_prefix: '' cloudify_agent: min_workers: 2 max_workers: 5 remote_execution_port: 22 user: ubuntu workflows: task_retries: -1 # this means forever task_retry_interval: 30 policy_engine: start_timeout: 30 cloudify_packages: description: > Links to Cloudify packages to be installed on the manager ################################################################################## # Base relationship definitions ################################################################################## relationships: cloudify.relationships.depends_on: source_interfaces: cloudify.interfaces.relationship_lifecycle: preconfigure: {} postconfigure: {} establish: {} unlink: {} target_interfaces: cloudify.interfaces.relationship_lifecycle: preconfigure: {} postconfigure: {} establish: {} unlink: {} properties: connection_type: default: all_to_all cloudify.relationships.connected_to: derived_from: cloudify.relationships.depends_on cloudify.relationships.contained_in: derived_from: cloudify.relationships.depends_on cloudify.relationships.file_system_depends_on_volume: derived_from: cloudify.relationships.depends_on source_interfaces: cloudify.interfaces.relationship_lifecycle: preconfigure: implementation: script.script_runner.tasks.run inputs: script_path: default: https://raw.githubusercontent.com/cloudify-cosmo/cloudify-manager/4.0/resources/rest-service/cloudify/fs/fdisk.sh device_name: default: { get_attribute: [TARGET, device_name] } cloudify.relationships.file_system_contained_in_compute: derived_from: cloudify.relationships.contained_in source_interfaces: cloudify.interfaces.relationship_lifecycle: establish: implementation: script.script_runner.tasks.run inputs: script_path: default: https://raw.githubusercontent.com/cloudify-cosmo/cloudify-manager/4.0/resources/rest-service/cloudify/fs/mount.sh unlink: implementation: script.script_runner.tasks.run inputs: script_path: default: https://raw.githubusercontent.com/cloudify-cosmo/cloudify-manager/4.0/resources/rest-service/cloudify/fs/unmount.sh ################################################################################## # Workflows ################################################################################## workflows: install: default_workflows.cloudify.plugins.workflows.install update: mapping: default_workflows.cloudify.plugins.workflows.update parameters: update_id: default: '' skip_install: default: false skip_uninstall: default: false added_instance_ids: default: [] added_target_instances_ids: default: [] removed_instance_ids: default: [] remove_target_instance_ids: default: [] modified_entity_ids: default: [] extended_instance_ids: default: [] extend_target_instance_ids: default: [] reduced_instance_ids: default: [] reduce_target_instance_ids: default: [] ignore_failure: default: false type: boolean uninstall: mapping: default_workflows.cloudify.plugins.workflows.uninstall parameters: ignore_failure: default: false type: boolean execute_operation: mapping: default_workflows.cloudify.plugins.workflows.execute_operation parameters: operation: {} operation_kwargs: default: {} allow_kwargs_override: default: null run_by_dependency_order: default: false type_names: default: [] node_ids: default: [] node_instance_ids: default: [] heal: mapping: default_workflows.cloudify.plugins.workflows.auto_heal_reinstall_node_subgraph parameters: node_instance_id: description: Which node instance has failed diagnose_value: description: Diagnosed reason of failure default: Not provided ignore_failure: default: true type: boolean scale: mapping: default_workflows.cloudify.plugins.workflows.scale_entity parameters: scalable_entity_name: description: > Which node/group to scale. Note that the parameter specified should denote the node/group name and NOT the node/group instance id. delta: description: > How many node/group instances should be added/removed. A positive number denotes increase of instances. A negative number denotes decrease of instances. default: 1 type: integer scale_compute: description: > If a node name is passed as the `scalable_entity_name` parameter and that node is contained (transitively) within a compute node and this property is 'true', operate on the compute node instead of the specified node. default: false ignore_failure: default: false type: boolean install_new_agents: mapping: default_workflows.cloudify.plugins.workflows.install_new_agents parameters: install_agent_timeout: default: 300 node_ids: default: [] node_instance_ids: default: [] validate: default: True install: default: True install_script: default: '' ################################################################################## # Base data type definitions ################################################################################## data_types: cloudify.datatypes.AgentConfig: description: > Cloudify agent configuration schema. properties: install_method: description: | Specifies how (and if) the cloudify agent should be installed. Valid values are: * none - No agent will be installed on the host. * remote - An agent will be installed using SSH on linux hosts and WinRM on windows hosts. * init_script - An agent will be installed via a script that will run on the host when it gets created. This method is only supported for specific IaaS plugins. * provided - An agent is assumed to already be installed on the host image. That agent will be configured and started via a script that will run on the host when it gets created. This method is only supported for specific IaaS plugins. type: string required: true service_name: description: | Used to set the the cloudify agent service name. If not set, the default value for the service name is: - Linux: 'celery-' - Windows: '' where 'id' is the instance id of the compute node in which the agent is running. Note: the value in this field, takes precedence over the deprecated 'cloudify.nodes.Compute.cloudify_agent.name'. type: string required: false user: description: > For host agents, the agent will be installed for this user. type: string required: false key: description: > For host agents that are installed via SSH, this is the path to the private key that will be used to connect to the host. In most cases, this value will be derived automatically during bootstrap. type: string required: false password: description: > For host agents that are installed via SSH (on linux) and WinRM (on windows) this property can be used to connect to the host. For linux hosts, this property is optional in case the key property is properly configured (either explicitly or implicitly during bootstrap). For windows hosts that are installed via WinRM, this property is also optional and depends on whether the password runtime property has been set by the relevant IaaS plugin, prior to the agent installation. type: string required: false port: description: > For host agents that are installed via SSH (on linux) and WinRM (on windows), this is the port used to connect to the host. The default values are 22 for linux hosts and 5985 for windows hosts. type: integer required: false process_management: description: > Process management specific configuration. (type: dictionary) required: false min_workers: description: > Minimum number of agent workers. By default, the value will be 0. Note: For windows based agents, this property is ignored and min_workers is set to the value of max_workers. type: integer required: false max_workers: description: > Maximum number of agent workers. By default, the value will be 5. type: integer required: false disable_requiretty: description: > For linux based agents, disables the requiretty setting in the sudoers file. By default, this value will be true. type: boolean required: false env: description: > Optional environment variables that the agent will be started with. (type: dictionary) required: false extra: description: > Optional additional low level configuration details. (type: dictionary) required: false ################################################################################## # Base artifact definitions ################################################################################## plugins: agent: executor: central_deployment_agent install: false default_workflows: executor: central_deployment_agent install: false script: executor: host_agent install: false ################################################################################## # Policy types definitions ################################################################################## policy_types: cloudify.policies.types.host_failure: properties: &BASIC_AH_POLICY_PROPERTIES policy_operates_on_group: description: | If the policy should maintain its state for the whole group or each node instance individually. default: false is_node_started_before_workflow: description: Before triggering workflow, check if the node state is started default: true interval_between_workflows: description: | Trigger workflow only if the last workflow was triggered earlier than interval-between-workflows seconds ago. if < 0 workflows can run concurrently. default: 300 service: description: Service names whose events should be taken into consideration default: - service source: https://raw.githubusercontent.com/cloudify-cosmo/cloudify-manager/4.0/resources/rest-service/cloudify/policies/host_failure.clj cloudify.policies.types.threshold: properties: &THRESHOLD_BASED_POLICY_PROPERTIES <<: *BASIC_AH_POLICY_PROPERTIES service: description: The service name default: service threshold: description: The metric threshold value upper_bound: description: | boolean value for describing the semantics of the threshold. if 'true': metrics whose value is bigger than the threshold will cause the triggers to be processed. if 'false': metrics with values lower than the threshold will do so. default: true stability_time: description: How long a threshold must be breached before the triggers will be processed default: 0 source: https://raw.githubusercontent.com/cloudify-cosmo/cloudify-manager/4.0/resources/rest-service/cloudify/policies/threshold.clj cloudify.policies.types.ewma_stabilized: properties: <<: *THRESHOLD_BASED_POLICY_PROPERTIES ewma_timeless_r: description: | r is the ratio between successive events. The smaller it is, the smaller impact on the computed value the most recent event has. default: 0.5 source: https://raw.githubusercontent.com/cloudify-cosmo/cloudify-manager/4.0/resources/rest-service/cloudify/policies/ewma_stabilized.clj ################################################################################## # Policy triggers definitions ################################################################################## policy_triggers: cloudify.policies.triggers.execute_workflow: parameters: workflow: description: Workflow name to execute workflow_parameters: description: Workflow paramters default: {} force: description: | Should the workflow be executed even when another execution for the same workflow is currently in progress default: false allow_custom_parameters: description: | Should parameters not defined in the workflow parameters schema be accepted default: false socket_timeout: description: Socket timeout when making request to manager REST in ms default: 1000 conn_timeout: description: Connection timeout when making request to manager REST in ms default: 1000 source: https://raw.githubusercontent.com/cloudify-cosmo/cloudify-manager/4.0/resources/rest-service/cloudify/triggers/execute_workflow.clj