Skip to content

Instantly share code, notes, and snippets.

View HAProxyCollector
interfaces:
cloudify.interfaces.monitoring:
start:
implementation: diamond.diamond_agent.tasks.add_collectors
inputs:
collectors_config:
HAProxyCollector:
config:
enabled: True
url: http://127.0.0.1:9000/haproxy_stats;csv
View http_in
http_in:
type: haproxy.nodes.Proxy
properties:
default_backend: servers
global_maxconn: 256
mode: http
port: 80
timeout_connect: 5000
timeout_client: 50000
timeout_server: 50000
View nodejs_host
nodejs_host:
type: nodecellar.nodes.MonitoredServer
instances:
deploy: 2 # or 3 or 7 etc
relationships:
- target: nodecellar_security_group
type: cloudify.openstack.server_connected_to_security_group
View example_setup
setup(
name='cloudify-plugin-example',
description='Writes a file',
packages=['cloudify_plugin'],
install_requires=[
"cloudify-plugins-common==3.1"
]
)
View write_to_file_example
def write_to_file(**kwargs):
with open('/tmp/cloudify-plugin', 'w') as f:
f.write('This simple example gives you '
'the power to do amazing things.')
View example_node_template
node_templates:
test_the_plugin:
type: cloudify.example.Example
interfaces:
cloudify.interfaces.lifecycle:
start:
implementation: example.cloudify_plugin.tasks.write_to_file
@EarthmanT
EarthmanT / example_declaration
Created Feb 7, 2015
Example Plugin Declaration
View example_declaration
plugins:
example:
executor: central_deployment_agent
source: https://github.com/EarthmanT/cloudify-plugin-example/archive/master.zip
View example_node_type
node_types:
cloudify.example.Example:
derived_from: cloudify.nodes.Root
interfaces:
cloudify.interfaces.lifecycle:
start:
implementation: example.cloudify_plugin.tasks.write_to_file