Skip to content

Instantly share code, notes, and snippets.

@yoramw
yoramw / .bash_profile
Created March 16, 2020 19:04 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@workflow
def install_selective(nodes, install_dependencies, subset_name, **kwargs):
install_dependencies = str_to_bool(install_dependencies)
node_list = nodes.split(',')
install_nodes = set()
for instance in ctx.node_instances:
if instance.node_id in node_list:
install_nodes.add(instance)
if install_dependencies:
collect_dependencies(instance, install_nodes)
workflows:
install_selective:
mapping: selective.workflow_selective.workflow.install_selective
parameters:
nodes:
description: Nodes
install_dependencies:
description: dependencies
default: true
subset_name:
Credential section:
keystone:
username: admin
password: password
tenant_name: password
@yoramw
yoramw / apacheLB-service.groovy
Created July 10, 2013 12:49
Apache Loadbalancer custom commands.
customCommands ([
"addNode" : "apacheLB_addNode.groovy",
"removeNode" : "apacheLB_removeNode.groovy",
"load" : "apacheLB-load.groovy"
])
@yoramw
yoramw / openstack-cloud.groovy
Created August 29, 2012 07:37
Cloud Driver Templates
MASTER : template{
imageId "414"
machineMemoryMB 1600
hardwareId "103"
remoteDirectory "/root/gs-files"
localDirectory "tools/cli/plugins/esc/openstack/upload"
keyFile "key.pem"
options ([
"openstack.securityGroup" : "myGroup",
@yoramw
yoramw / master-service.groovy
Created August 29, 2012 07:21
JMX Monitors
monitors {
def nameNodeJmxBeans = [
"Total Files": ["Hadoop:name=FSNamesystemMetrics,service=NameNode", "FilesTotal"],
"Total Blocks": ["Hadoop:name=FSNamesystemMetrics,service=NameNode", "BlocksTotal"],
"Capacity Used (GB)": ["Hadoop:name=FSNamesystemMetrics,service=NameNode", "CapacityUsedGB"],
"Blocks with corrupt replicas": ["Hadoop:name=FSNamesystemMetrics,service=NameNode", "CorruptBlocks"],
"Storage capacity utilization": ["Hadoop:name=NameNodeInfo,service=NameNode", "PercentUsed"],
"Number of active metrics sources": ["Hadoop:name=MetricsSystem,service=NameNode,sub=Stats", "num_sources"],
"Number of active metrics sinks": ["Hadoop:name=MetricsSystem,service=NameNode,sub=Stats", "num_sinks"],