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
# ------------------------------------------------------------------- | |
# Color | |
# ------------------------------------------------------------------- | |
# add colors to terminal (see man ls for details) | |
CLICOLOR=1 | |
# Order: | |
# 1. directory, 2. symbolic link, 3. socket, 4. pipe, 5. executable, 6. block special, 7. character special | |
# 8. executabel with setuid bit set, 9. executable with setgid bit set, 10. directory writable to others, with sticky bit | |
# 11. directory writable to others, without sticky bit | |
# |
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
$ speedtest_cli | |
Retrieving speedtest.net configuration... | |
Retrieving speedtest.net server list... | |
Testing from Kansas State University (129.130.48.12)... | |
Selecting best server based on latency... | |
Hosted by Wamego Telephone Company (Wamego, KS) [21.96 km]: 13.792 ms | |
Testing download speed........................................ | |
Download: 79.72 Mbits/s | |
Testing upload speed.................................................. | |
Upload: 29.65 Mbits/s |
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
homedirs = [] | |
run_context.resource_collection.each { |resource| | |
puts resource.cookbook_name | |
if resource.is_a(Chef::Resource::File) && resource.cookbook_name == 'myCookbook' | |
homedirs << resource | |
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
# determine if we are an alpha or production node | |
if node.chef_environment == "ome-alpha" | |
local_environment = "alpha" | |
else | |
local_environment = "prod" | |
end | |
# get the list of nodes... | |
sources = search(:node, "tags:#{node['memcached']['memcached_instance']} AND tags:#{local_environment}") |
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
knife bootstrap ome-vm33.campus.ksu.edu -N ome-vm33.campus.ksu.edu --ssh-user mhn --sudo --run-list "role[est_base], role[ome_base]" --bootstrap-proxy http://www-proxy.ksu.edu:3128 | |
Connecting to ome-vm33.campus.ksu.edu | |
ome-vm33.campus.ksu.edu knife sudo password: | |
Enter your password: | |
ome-vm33.campus.ksu.edu | |
ome-vm33.campus.ksu.edu Starting first Chef Client run... | |
ome-vm33.campus.ksu.edu [2014-11-13T09:05:45-06:00] WARN: | |
ome-vm33.campus.ksu.edu * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | |
ome-vm33.campus.ksu.edu SSL validation of HTTPS requests is disabled. HTTPS connections are still | |
ome-vm33.campus.ksu.edu encrypted, but chef is not able to detect forged replies or man in the middle |
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 UTF8 | |
set -g utf8 | |
set-window-option -g utf8 on | |
# make tmux display things in 256 colors | |
set -g default-terminal "screen-256color" | |
# set scrollback history to 10000 (10k) | |
set -g history-limit 10000 |
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
I have a cookbook that installs Tomcat7, sets up an `/etc/init.d` service to start, stop, or restart Tomcat, and provides a LWRP to deploy applications to the instance from our Artifactory setup. | |
It all works with one caveat: Tomcat gets restarted every time the chef-client daemon runs, or every 15 minutes in this case. | |
Here is the `default` recipe, which installs Tomcat and sets up the service: | |
# Create a tomcat user | |
user node['tomcat']['tomcat_user'] do | |
comment 'tomcat user' | |
system true |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.hostname = "ome-telecom-creditcard-berkshelf" | |
config.vm.box = "ome-devvm-ubuntu-12.04.4a" | |
config.vm.box_url = "https://tools.ome.ksu.edu/artifacts/devvm/ome-devvm-ubuntu-12.04.4a.box" |
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
mhn@ome-alpha-vm1:/etc$ sudo chef-client | |
Starting Chef Client, version 11.6.2 | |
resolving cookbooks for run list: ["est-ntp", "est-rsyslog", "est-chef-client", "est-ssh", "est-firewall", "est-mount", "estenv-ome", "est-user::required", "ome_wse_accounts", "est-cis-benchmark", "ome_dev_accounts", "ome_tomcat", "ome_tomcat::properties", "ome_nginx", "ome_telecom_creditcard"] | |
Synchronizing Cookbooks: | |
- ome_nginx | |
- ome_tools | |
- ome_tomcat | |
- ome_telecom_creditcard | |
- ohai | |
- yum |
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
± gem list ruby-2.1.1 | |
*** LOCAL GEMS *** | |
addressable (2.3.6) | |
berkshelf (3.1.1) | |
berkshelf-api-client (1.2.0) | |
bigdecimal (1.2.4) | |
buff-config (0.4.0) | |
buff-extensions (0.5.0) |