- You installed
rbenvandruby-buildviahomebrew. - (Optional) You are listening to Ke$ha.
- Open a terminal.
curl https://gist.githubusercontent.com/prsimp/4567288/raw/upgrade_it.sh | sh- Drink some coffee or do something while Ruby compiles.
| user www-data; | |
| worker_processes 1; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| sendfile on; |
rbenv and ruby-build via homebrew.curl https://gist.githubusercontent.com/prsimp/4567288/raw/upgrade_it.sh | sh| $ wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.0.1.tar.gz | |
| $ wget http://gperftools.googlecode.com/files/gperftools-2.0.tar.gz | |
| $ tar zxvf libunwind-1.0.1.tar.gz && cd libunwind-1.0.1 | |
| $ CFLAGS=-fPIC ./configure | |
| $ make CFLAGS=-fPIC | |
| $ sudo make CFLAGS=-fPIC install | |
| $ cd .. | |
| $ tar zxvf gperftools-2.0.tar.gz |
In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:
Documentation
Accurate / up-to-date systems architecture diagram
Accurate / up-to-date network diagram
Out-of-hours support plan
Incident management plan
| class Object | |
| def cunt | |
| "I'm guessing you meant 'count'?" | |
| end | |
| end |
| ## Knife plugin to set node environment | |
| # See http://wiki.opscode.com/display/chef/Environments | |
| # | |
| ## Install | |
| # Place in .chef/plugins/knife/set_environment.rb | |
| # | |
| ## Usage | |
| # Nick-Stielaus-MacBook-Pro:chef-repo nstielau$ knife node set_environment mynode.net my_env | |
| # Looking for mynode.net | |
| # Setting environment to my_env |
These are field notes gathered during installation of website search facility for the ElasticSearch website.
You may re-use it to put a similar system in place.
The following assumes:
Start the demo by launching three EC2 instances then tell the audience that this will take about 3 minutes. Also explain that we not only starting the instances we are also bootstrapping it with the Chef client (Easy Peasy)...
./setupDemo.sh
Sample Script
| $ grep 'node\[:network\]\[:interfaces\].' \#chef.log | |
| 10:15 < mkent_> node[:network][:interfaces][:eth1][:addresses] | |
| 22:24 <+Damm> msf, just pulling in the node[:network][:interfaces] attributes | |
| 20:44 < randybias> node[:network][:interfaces][:eth0][:addresses] | |
| 09:13 < sinBot> so fujin if I wanted to use that in an erb template, it'd be <%= @node[:network][:interfaces]["en1"]["addresses"].select{address}.flatten.to_str %> ? | |
| 12:27 < cwj> if i have an ipv4 ip address set on eth0, will it always be in @node[:network][:interfaces][:eth0][1] ? | |
| 02:19 < pluesch0r> however, i don't seem to be able to access @node[:network][:interfaces]... from inside the attributes file. | |
| 19:52 <@jtimberman> or node[:network][:interfaces][:eth0][:addresses][0] | |
| 20:09 < seryl> well, it's searchable. I'm trying the @node[:network][:interfaces][:eth0][:addresses][0] route, but getting blanks right now, playing around with it in chef solo | |
| 20:29 < kallistec> pp node[:network][:interfaces].current_attribute |
| # Nginx cache busting rewriter, best used on assets that have long-lived expires. | |
| # | |
| # Rewrites like so: | |
| # blah.com/release_ab2ea212312.../file.css => blah.com/file.css | |
| # | |
| location ~ ^/release_(.*?)/ { | |
| rewrite ^/release_(.*?)/(.*)$ /$2 last; | |
| } |