Skip to content

Instantly share code, notes, and snippets.

View EarthmanT's full-sized avatar
🏠
Working from home

EarthmanT

🏠
Working from home
View GitHub Profile
@EarthmanT
EarthmanT / example_node_type
Created February 7, 2015 08:05
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
@EarthmanT
EarthmanT / example_declaration
Created February 7, 2015 08:06
Example Plugin Declaration
plugins:
example:
executor: central_deployment_agent
source: https://github.com/EarthmanT/cloudify-plugin-example/archive/master.zip
@EarthmanT
EarthmanT / example_node_template
Created February 7, 2015 08:07
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 / write_to_file_example
Created February 7, 2015 12:29
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.')
@EarthmanT
EarthmanT / example_setup
Created February 7, 2015 12:36
Example Setup
setup(
name='cloudify-plugin-example',
description='Writes a file',
packages=['cloudify_plugin'],
install_requires=[
"cloudify-plugins-common==3.1"
]
)
@EarthmanT
EarthmanT / nodejs_host
Created February 12, 2015 13:15
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
@EarthmanT
EarthmanT / http_in
Created February 12, 2015 13:20
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
@EarthmanT
EarthmanT / HAProxyCollector
Created February 12, 2015 13:22
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
@EarthmanT
EarthmanT / site.pp
Last active August 29, 2015 14:27
Nodecellar Site PP
class { '::mongodb::globals':
manage_package_repo => true,
}->
class { '::mongodb::server':
}->
class { '::mongodb::client':
}->
class { '::nodejs':
nodejs_dev_package_ensure => 'present',
@EarthmanT
EarthmanT / openstack_vm_with_docker.yaml
Created February 5, 2017 09:12
Create Openstack VM and Install Docker
node_templates:
docker:
type: cloudify.nodes.Root
interfaces:
cloudify.interfaces.lifecycle:
create:
implementation: scripts/docker/install.py
start:
implementation: scripts/docker/bootstrap.py