This file contains 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/bin/env ruby | |
LOG_FILE = 'access.log' | |
csv_data = 'method,uri\n' | |
File.open(LOG_FILE, 'r') do |f| | |
counter = 1 | |
f.each_line do |line| | |
csv_data += "#{line.slice(line.index('"')+1..-1).split('"')[0].split[0]},#{line.slice(line.index('"')+1..-1).split('"')[0].split[1]}\n" |
This file contains 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/bin/env ruby | |
# ASSUMES YOU'VE ALREADY USED single_org_setup.rb to create your nodes | |
# which will have saved the nodes key files to your machine and make API auth go | |
require 'fauxhai' | |
require 'mixlib/cli' | |
require 'mixlib/config' | |
require 'chef/rest' | |
require 'chef/node' |
This file contains 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
# This config file is manually-generated by tfitch | |
# please modify manually if the IaaS setup changes | |
DAEMON="/apps/mongodb/bin/mongod" | |
NAME="mongod" | |
DAEMON_OPTS="" | |
DAEMON_OPTS="$DAEMON_OPTS --port 27017" | |
DAEMON_OPTS="$DAEMON_OPTS --dbpath /apps/data/mongodb" | |
DAEMON_OPTS="$DAEMON_OPTS --logpath /apps/log/mongodb/mongod.log" |
This file contains 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
#!/bin/bash | |
# mongod - Startup script for mongod | |
# chkconfig: 35 85 15 | |
# description: Mongo is a scalable, document-oriented database. | |
# processname: mongod | |
# config: /apps/mongodb/conf/awc-mongodb.conf | |
# pidfile: /apps/mongodb/mongo.pid |
This file contains 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
# attributes for the iis_pool | |
default['config']['setting']['runtime_version'] = '12' | |
default['config']['setting']['thirty_two_bit'] = false | |
default['config']['setting']['max_proc'] = 4 |
This file contains 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
# if nothing was dynamic | |
iis_pool 'MyAppPool' do | |
runtime_version '12' | |
max_proc 4 | |
thirty_two_bit false | |
action :config | |
end |
This file contains 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
# attributes for the iis_pool | |
default['config']['setting']['runtime_version'] = '12' | |
default['config']['setting']['thirty_two_bit'] = false | |
default['config']['setting']['max_proc'] = 4 |
This file contains 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
# outputs the same as hardcoded-recipe.rb but does *not* work | |
iis_pool 'MyAppPool' do | |
node['config']['setting'].each do |setting, value| | |
"#{setting}" "#{value}" | |
end | |
action :config | |
end |
This file contains 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
# same result as hardcoded-recipe.rb but now driven by Attributes | |
iis_pool 'MyAppPool' do | |
node['config']['setting'].each do |setting, value| | |
send(setting, value) | |
end | |
action :config | |
end |
This file contains 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
knife search node "role:mongo AND chef_environment:dev AND mongodb_replica_set:ReplSet1" |
OlderNewer