# DSL version, should appear in the main blueprint.yaml # and may appear in other imports. In such case, the versions must match tosca_definitions_version: cloudify_dsl_1_0 imports: - http://www.getcloudify.org/spec/cloudify/3.1/types.yaml node_types: haproxy.nodes.Proxy: derived_from: cloudify.nodes.ApplicationServer properties: port: description: The port for HAProxy to listen. type: integer default: 80 global_maxconn: description: Max number of connections at a time. type: integer default: 256 mode: description: > The protocol that will act as a proxy for. type: string default: http timeout_connect: description: > Set the maximum time to wait for a connection attempt to a server to succeed. type: integer default: 5000 timeout_client: description: Set the maximum inactivity time on the client side. type: integer default: 50000 timeout_server: description: Set the maximum inactivity time on the server side. type: integer default: 50000 default_backend: description: > The group name you choose for your backend targets. backend_app_port: description: > The port that your application listens on. (This is the port that you will open on your backend application servers.) type: integer default: 8000 backend_max_conn: description: > The backend max connectons. default: 32 interfaces: cloudify.interfaces.lifecycle: create: scripts/haproxy/install-ubuntu.sh configure: scripts/haproxy/configure.py start: scripts/haproxy/start-ubuntu.sh stop: scripts/haproxy/stop-ubuntu.sh relationships: haproxy_connected_to_vm: derived_from: cloudify.relationships.connected_to source_interfaces: cloudify.interfaces.relationship_lifecycle: preconfigure: implementation: scripts/haproxy/preconfigure.py inputs: backend_address: description: > The internal address of a virtual machine node that contains your application. This is a runtime property of the target node of this relationship. default: { get_attribute: [ TARGET, ip ] } port: description: > The port on your virtual machine that listens for connections to your application. default: { get_property: [ SOURCE, backend_app_port ] } maxconn: description: > That backend's maxconn value. Defined in the source node under backend_max_conn. default: { get_property: [ SOURCE, backend_max_conn ] }