This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| common_packages = %w(python-setuptools python-dev) | |
| case node['platform'] | |
| when "centos", "redhat", "amazon" | |
| (common_packages + ['gcc']).each do |pkg| | |
| package pkg do | |
| action :install | |
| end | |
| end | |
| when "debian", "ubuntu" | |
| (common_packages + ['build-essential']).each do |pkg| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Host * | |
| # Forward remote X11 connections to run a remote GUI app locally | |
| forwardx11 yes | |
| # Only offer up keys defined with IdentityFile below, rather than all keys | |
| identitiesonly yes | |
| cipher arcfour | |
| compression yes | |
| # If using ssh-agent, forward that to remote jump host to avoid copying private keys | |
| forwardagent yes | |
| # Don't kill connetions too quickly |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sheet_number = if spreadsheet.worksheets.length == 1 | |
| 0 | |
| else | |
| sheet_number = spreadsheet.worksheets.length - 1 | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| filter = unless @filters.empty? | |
| "AND (" + @filters.map { |x| %Q(pb.ProductCode LIKE '%#{x}%') }.join(" OR ") + ")" | |
| end || '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| filter = '' | |
| unless @filters.empty? | |
| filter = "AND (" + filters.map { |filter| %Q(pb.ProductCode LIKE '%#{filter}%') }.join(" OR ") + ")" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Use Zookeeper to add/remove from the cluster as required. | |
| require 'zk' | |
| zookeeper_node = search(:node, "role:zookeeper AND chef_environment:#{node.chef_environment}")[0] | |
| listen_ip = zookeeper_node[:ipaddress] | |
| zk = ZK.new("#{listen_ip}:2181") | |
| # Cluster members reported by Zookeeper. | |
| active_cluster_members = zk.children(node[:zk_watcher][:zk_node_path]).collect { |x| x.split(':')[0] } | |
| # Cluster members reported by the node. | |
| node_cluster_members = eval %x[rabbitmqctl cluster_status -q | grep running_nodes | grep -o "\[.*\]"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ╭─maxmanders@hedgehog ~ ‹ruby-1.9.3› | |
| ╰─$ 1=act | |
| ╭─maxmanders@hedgehog ~ ‹ruby-1.9.3› | |
| ╰─$ 2=ual | |
| ╭─maxmanders@hedgehog ~ ‹ruby-1.9.3› | |
| ╰─$ actualvariable=100 | |
| ╭─maxmanders@hedgehog ~ ‹ruby-1.9.3› | |
| ╰─$ echo ${actualvariable} | |
| 100 | |
| ╭─maxmanders@hedgehog ~ ‹ruby-1.9.3› |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Vagrant.configure("2") do |config| | |
| ip_address = "192.168.56.1" | |
| config.vm.box = "ubuntu-12.04.2-server-amd64" | |
| config.vm.hostname = "chef-server.local" | |
| config.ssh.timeout = 30 | |
| config.vm.provider :virtualbox do |vbox| | |
| vbox.customize [ "modifyvm", :id, "--memory", 1024 ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /usr/local/zenoss/common/libexec/check_http_by_hostname.py -H www.some_host_that_resolves.com -p 80 -t 60 -u / -f follow | |
| Exit status is 1 which I had expected to raise an event, with the stdout of the command being the event message | |
| zencommand run -d <device> -v10 | |
| ... | |
| 2013-02-14 11:44:36,515 DEBUG zen.zencommand: running '/usr/local/zenoss/common/libexec/check_http_by_hostname.py -H www.some_host_that_resolves.com -p 80 -t 60 -u / -f follow' | |
| 2013-02-14 11:44:36,515 DEBUG zen.zencommand: cmd line: '/bin/sh -c exec /usr/local/zenoss/common/libexec/check_http_by_hostname.py -H www.some_host_that_resolves.com -p 80 -t 60 -u / -f follow' | |
| 2013-02-14 11:44:36,540 DEBUG zen.zencommand: Process check_http_by_hostname.py -H www.some_host_that_resolves.com -p 80 -t 60 -u / -f follow started | |
| 2013-02-14 11:45:08,918 DEBUG zen.zencommand: Received exit code: 1 | |
| 2013-02-14 11:45:08,918 DEBUG zen.zencommand: Command: '/bin/sh -c exec /usr/local/zenoss/common/libexec/check_http_by_hostname.py -H www.some_host_that_resolves.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| factory_type_information = ( | |
| { | |
| 'immediate_view' : 'editHttpResolvingMonitorDataSource', | |
| 'actions' : | |
| ( | |
| { 'id' : 'edit', | |
| 'name' : 'Data Source', | |
| 'action' : 'editHttpResolvingMonitorDataSource', | |
| 'permissions' : ( Permissions.view, ), | |
| }, |