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
| # Update, upgrade and install development tools: | |
| apt-get update | |
| apt-get -y upgrade | |
| apt-get -y install build-essential git-core curl libssl-dev \ | |
| libreadline5 libreadline5-dev \ | |
| zlib1g zlib1g-dev \ | |
| libmysqlclient-dev \ | |
| libcurl4-openssl-dev \ | |
| libxslt-dev libxml2-dev |
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 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 |
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
| bash -c ' | |
| echo <%= @config[:chef_node_name] %> > /tmp/chef_node_name | |
| cat /tmp/chef_node_name | cut -d. -f1 > /tmp/proper_hostname | |
| cat /tmp/chef_node_name | cut -d. -f2 | tr -d "\n" > /tmp/proper_dnsdomainname | |
| echo -n "." >> /tmp/proper_dnsdomainname | |
| cat /tmp/chef_node_name | cut -d. -f3 >> /tmp/proper_dnsdomainname | |
| IPV4ADDR=`ip addr | grep eth0 | grep "inet " | cut -d " " -f 6 | cut -d \/ -f 1` |