Skip to content

Instantly share code, notes, and snippets.

View swade1987's full-sized avatar

Steve Wade swade1987

View GitHub Profile
{
"variables": {
"version": "{{env `VERSION`}}",
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}",
"atlas_username": "",
"atlas_token": "",
"name": "aws-windows-base",
"region": "us-west-2",
"vpc_id": "vpc-6aa9440e",
Stevens-MacBook-Pro:skeleton-cookbook stevenwade$ rake
Running RuboCop...
/Users/stevenwade/.rubocop.yml - AllCops/Excludes was renamed to AllCops/Exclude
Inspecting 10 files
..........
10 files inspected, no offenses detected
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -I/Library/Ruby/Gems/2.0.0/gems/rspec-support-3.4.1/lib:/Library/Ruby/Gems/2.0.0/gems/rspec-core-3.4.3/lib /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.4.3/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
/Library/Ruby/Gems/2.0.0/gems/chefspec-4.5.0/lib/chefspec/berkshelf.rb:4:in `rescue in <top (required)>': I could not load the 'Berkshelf' gem! You must have the gem installed (ChefSpec::Error::GemLoadError)
on your local system before you can use the berkshelf plugin.
Stevens-MacBook-Pro:skeleton-cookbook stevenwade$ bundle exec rake test
>>>>> Kitchen gem not loaded, omitting tasks
Running RuboCop...
/Users/stevenwade/.rubocop.yml - AllCops/Excludes was renamed to AllCops/Exclude
Inspecting 10 files
.....W....
Offenses:
recipes/default.rb:21:10: W: Lint/SpaceBeforeFirstArg: Put space between the method name and the first argument.
@swade1987
swade1987 / main.tf
Created February 24, 2016 11:30
bamboo server terraform
resource "aws_instance" "bamboo" {
instance_type = "t2.medium"
ami = "${lookup(var.aws_amis, var.aws_region)}"
key_name = "${var.key_name}"
subnet_id = "${module.base.default_subnet_id}"
vpc_security_group_ids = ["${module.base.default_security_group_id}", "${module.base.external_connections_security_group_id}"]
tags {
Name = "bamboo"
}
c:\
GIT
.chef
cookbook-A
cookbook-B
cookbook-C
@swade1987
swade1987 / gist:16c39e1588d193a9dcee
Created February 24, 2016 20:30
vagrant berks issue with ChefDK 12.7.2
Stevens-MacBook-Pro:bamboo-agent-cookbook stevenwade$ vagrant plugin install vagrant-berkshelf
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
Installed the plugin 'vagrant-berkshelf (4.1.0)'!
Post install message from the 'vagrant-berkshelf' plugin:
The Vagrant Berkshelf plugin requires Berkshelf from the Chef Development Kit.
You can download the latest version of the Chef Development Kit from:
https://downloads.chef.io/chef-dk/
@swade1987
swade1987 / gist:03196cd5d00245cb438d
Created February 26, 2016 13:04
chef provisioning
aws_instance.cd-demo-web-01: Provisioning with 'chef'...
aws_instance.cd-demo-web-01 (chef): Connecting to remote host via WinRM...
aws_instance.cd-demo-web-01 (chef): Host: 52.10.28.33
aws_instance.cd-demo-web-01 (chef): Port: 5985
aws_instance.cd-demo-web-01 (chef): User: steven
aws_instance.cd-demo-web-01 (chef): Password: true
aws_instance.cd-demo-web-01 (chef): HTTPS: false
aws_instance.cd-demo-web-01 (chef): Insecure: false
aws_instance.cd-demo-web-01 (chef): CACert: false
aws_instance.cd-demo-web-01 (chef): Connecting to remote host via WinRM...
aws_instance.cd-demo-web-01 (chef): Downloading Chef Client...
aws_instance.cd-demo-web-01 (chef): Installing Chef Client...
aws_instance.cd-demo-web-01 (chef): Creating configuration files...
aws_instance.cd-demo-web-01 (chef): Starting initial Chef-Client run...
aws_instance.cd-demo-web-01 (chef): [2016-02-26T16:29:00+00:00] INFO: *** Chef 12.7.2 ***
aws_instance.cd-demo-web-01 (chef): [2016-02-26T16:29:00+00:00] INFO: Chef-client pid: 2576
aws_instance.cd-demo-web-01 (chef): [2016-02-26T16:29:58+00:00] INFO: Client key C:\chef\client.pem is not present - registering
aws_instance.cd-demo-web-01 (chef): [2016-02-26T16:29:58+00:00] INFO: HTTP Request Returned 401 Unauthorized: error
aws_instance.cd-demo-web-01 (chef):
aws_instance.cd-demo-web-01 (chef): ================================================================================
Stevens-MacBook-Pro:core-cookbook stevenwade$ rspec
F
Failures:
1) core::default should include the chocolatey recipe by default
Failure/Error: let (:chef_run) { ChefSpec::ChefRunner.new.converge('core::default') }
NameError:
uninitialized constant ChefSpec::ChefRunner
require 'spec_helper'
describe 'bamboo-agent::install' do
let(:chef_run) { ChefSpec::SoloRunner.new(platform: 'windows', version: '2012').converge(described_recipe) }
it 'includes the `chocolatey` recipe' do
expect(chef_run).to include_recipe('chocolatey::default')
end