- This is a blameless Post Mortem.
- We will not focus on the past events as they pertain to "could've", "should've", etc.
- All follow up action items will be assigned to a team/individual before the end of the meeting. If the item is not going to be top priority leaving the meeting, don't make it a follow up item.
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
class Chef | |
class Knife | |
module DataBagSecretOptions | |
include Mixlib::CLI | |
option :secret, | |
:short => "-s SECRET", | |
:long => "--secret ", | |
:description => "The secret key to use to encrypt data bag item values", | |
:proc => Proc.new { |s| Chef::Config[:knife][:secret] = 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
module Chef::JSONable | |
# Serialize this object as a hash | |
def to_json(*a) | |
Chef::JSONCompat.to_json(for_json, *a) | |
end | |
def for_json | |
raise "You must define `for_json` in your JSONable class" | |
# Alternatively, return self? | |
end |
# cookbook: example
# recipe: mysql
controls "mysql audit" do
control "mysql package" do
it "should be installed" do
expect(package("mysql")).to be_installed.with_version("5.6")
end
end
Two controls
blocks cannot be named the same. Doing so will raise a compilation error as seen with the following code:
# cookbook: example
# recipe: default
controls "mysql audit" do
control "mysql package" do
it "should be installed" do
expect(package("mysql")).to be_installed.with_version("5.6")
end
example:
it "should have mysql service" do
expect(service("mysql")).to be_enabled
expect(service("mysql")).to be_running
end
example_data:
Create the following folder structure in your cookbook:
test
└── integrationq
├── helpers
│ ├── serverspec
│ │ ├── shared_serverspec_tests
│ │ │ └── shared_tests2.rb
│ │ └── spec_helper.rb
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
[1] pry(#<Chef::Provisioning::AWSDriver::Driver>)> actual_elb.subnets | |
=> [<AWS::EC2::Subnet id:subnet-5bbda12f>, <AWS::EC2::Subnet id:subnet-eacb348f>, <AWS::EC2::Subnet id:subnet-fa1e21bc>] | |
[2] pry(#<Chef::Provisioning::AWSDriver::Driver>)> actual_elb.availability_zones.to_a | |
=> [<AWS::EC2::AvailabilityZone name:us-west-2a>, <AWS::EC2::AvailabilityZone name:us-west-2c>, <AWS::EC2::AvailabilityZone name:us-west-2b>] | |
[3] pry(#<Chef::Provisioning::AWSDriver::Driver>)> elb.client.detach_load_balancer_from_subnets(load_balancer_name: actual_elb.name, subnets: ['subnet-5bbda12f']) | |
=> {:subnets=>["subnet-fa1e21bc", "subnet-eacb348f"], :response_metadata=>{:request_id=>"1807c203-be20-11e4-b84f-7bbb914bda43"}} | |
[4] pry(#<Chef::Provisioning::AWSDriver::Driver>)> actual_elb = load_balancer_for(lb_spec) | |
=> <AWS::ELB::LoadBalancer name:tyler-test-lb> | |
[5] pry(#<Chef::Provisioning::AWSDriver::Driver>)> actual_elb.availability_zones.to_a | |
=> [<AWS::EC2::AvailabilityZone name:us-west-2a>, <AWS::EC2::AvailabilityZone name:us-wes |
recipe:
control_group "group" do
control "foo" do
it "should fail" do
expect(1).to eq(2)
end
end
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
Errno::ETIMEDOUT: machine[tyler_test_windows] (@recipe_files::/Users/tball/chef_repo/cookbooks/test-provisioning/recipes/windows.rb line 76) had an error: Errno::ETIMEDOUT: Operation timed out - connect(2) for "192.168.0.215" port 5986 | |
/Users/tball/github/chef-provisioning-aws/lib/chef/provisioning/aws_driver/driver.rb:1121:in `initialize' | |
/Users/tball/github/chef-provisioning-aws/lib/chef/provisioning/aws_driver/driver.rb:1121:in `new' | |
/Users/tball/github/chef-provisioning-aws/lib/chef/provisioning/aws_driver/driver.rb:1121:in `create_winrm_transport' | |
/Users/tball/github/chef-provisioning-aws/lib/chef/provisioning/aws_driver/driver.rb:981:in `transport_for' | |
/Users/tball/github/chef-provisioning-aws/lib/chef/provisioning/aws_driver/driver.rb:1317:in `wait_for_transport' | |
/Users/tball/github/chef-provisioning-aws/lib/chef/provisioning/aws_driver/driver.rb:701:in `ready_machine' | |
/Users/tball/github/chef-provisioning/lib/chef/provider/machine.rb:39:in `block in <class:Machine>' | |
(eval):2:in `block in action_ready' |
OlderNewer