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
bash -c ' | |
ruby_version="1.9.3-p374" | |
chef_version="11.4.0-1" | |
# Comment line above, uncomment below, to default to knife 'chef' version | |
#chef_version="<%= %Q(#{knife_config[:bootstrap_version]}) %>" | |
<%= %Q(export http_proxy="#{knife_config[:bootstrap_proxy]}") if knife_config[:bootstrap_proxy] %> |
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
# cookbooks/mysql/recipes/client.rb | |
>> ['ruby1.9.1-full', 'ruby1.9.1-dev', 'rubygems', 'mysql-client', | |
>>'libmysqlclient-dev'].each do |pkg_name| | |
>> pkg = package pkg_name do | |
>> action :nothing | |
>> end | |
>> pkg.run_action(:install) | |
>> end | |
>> chef_gem 'mysql' |
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
sha256sum -b ./dbapp.war > ./dbapp.sha256 | |
gsutil cp ./dbapp.war ./dbapp.sha256 gs://stathy/${JOB_NAME}/${BUILD_NUMBER}/ | |
gsutil setacl public-read gs://stathy/${JOB_NAME}/${BUILD_NUMBER}/dbapp.war | |
gsutil setacl public-read gs://stathy/${JOB_NAME}/${BUILD_NUMBER}/dbapp.sha256 | |
cd ${WORKSPACE} | |
gcutil addinstance dbapp-db dbapp-app1 dbapp-lb \ | |
--project "opscode.com:stathy" --image "/projects/opscode.com:stathy/images/centos-latest" \ |
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/local/rvm/rubies/ruby-1.9.3-p362/bin/ruby | |
# | |
require 'ridley' | |
require 'pathname' | |
require 'openssl' | |
require 'digest' | |
require 'json' | |
class BootstrapError < StandardError; 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
#!/opt/opscode/embedded/bin/ruby | |
# | |
#!/opt/opscode/embedded/bin/ruby | |
# | |
require 'chef/environment' | |
require 'chef/knife' | |
require 'chef/knife/cookbook_upload' | |
require 'chef' |
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
include_recipe 'apt' | |
include_recipe 'nginx' | |
directory '/var/www/nginx-default' do | |
owner 'www-data' | |
group 'www-data' | |
mode '0755' | |
recursive true | |
action :create | |
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
expect(chef_run.node['bacon']['temperature']).to eq(150) |
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
powershell_script "Set ExecutionPolicy to Unrestricted" do | |
code %q(Set-ExecutionPolicy Unrestricted -force) | |
end | |
## CONVERT TO | |
powershell_execution_policy | |
restricted false | |
end | |
powershell_script "Set ExecutionPolicy to Restricted" do | |
code "Set-ExecutionPolicy Restricted -force" |
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
powershell_script "Setup Team0 Adapter" do | |
code <<-'EOH' | |
New-NetLbfoTeam -Name Team0 -TeamNicName TeamNIC0 -TeamMembers NIC0700,NIC1000 -TeamingMode LACP -LoadBalancingAlgorithm TransportPorts -Confirm:$False | |
'EOH' | |
end | |
powershell_script "Setup Team1 Adapter" do | |
code <<-'EOH' | |
New-NetLbfoTeam -Name Team1 -TeamNicName TeamNIC1 -TeamMembers NIC0300,NIC0301 -TeamingMode LACP -LoadBalancingAlgorithm TransportPorts -Confirm:$False | |
'EOH' |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
{ | |
:lb => { | |
:ip => '192.168.65.50', | |
:memory => 512, |