diff options
| author | mo khan <mo@mokhan.ca> | 2015-10-03 22:01:31 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-10-03 22:01:35 -0600 |
| commit | 4e606261e99f3d78331d9754633c4b924572aecf (patch) | |
| tree | a7bfbb8b811a066df799791d4c54c23f2f58d26c | |
| parent | 41874540c4f15abc628d322a778952fd50060170 (diff) | |
use kitchen-ec2 driver
| -rw-r--r-- | .kitchen.ci.yml | 14 | ||||
| -rw-r--r-- | .travis.yml | 11 | ||||
| -rw-r--r-- | Gemfile | 1 | ||||
| -rw-r--r-- | Gemfile.lock | 14 | ||||
| -rw-r--r-- | README.md | 28 | ||||
| -rw-r--r-- | spec/recipes/env_spec.rb | 6 |
6 files changed, 36 insertions, 38 deletions
diff --git a/.kitchen.ci.yml b/.kitchen.ci.yml new file mode 100644 index 0000000..dbfd877 --- /dev/null +++ b/.kitchen.ci.yml @@ -0,0 +1,14 @@ +--- +driver: + name: ec2 + aws_access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %> + aws_secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %> + aws_ssh_key_id: <%= ENV['AWS_KEYPAIR_NAME'] %> + security_group_ids: ["travis-ci"] + instance_type: t1.micro + +platforms: + - name: centos-6.4 + +transport: + ssh_key: <%= ENV['EC2_SSH_KEY_PATH'] %> diff --git a/.travis.yml b/.travis.yml index d3e53c5..7209d6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,13 @@ language: ruby cache: bundler -sudo: true +sudo: false rvm: - 2.2.3 install: - - sudo apt-get update -q - - sudo sh -c "echo 'deb http://download.virtualbox.org/virtualbox/debian '$(lsb_release -cs)' contrib non-free' > /etc/apt/sources.list.d/virtualbox.list" && wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add - && sudo apt-get update && sudo apt-get install virtualbox-5.0 - - sudo apt-get install linux-headers-2.6.32-042stab105.14 - - sudo VBoxManage --version - - sudo /etc/init.d/vboxdrv setup - - sudo wget -nv https://dl.bintray.com/mitchellh/vagrant/vagrant_1.7.4_x86_64.deb - - sudo dpkg -i vagrant_1.7.4_x86_64.deb - bundle install - bundle exec berks install +before_script: + - cp .kitchen.ci.yml .kitchen.local.yml script: - bundle exec rspec - kitchen test @@ -4,4 +4,5 @@ gem 'berkshelf' gem 'chefspec' gem 'test-kitchen' gem 'kitchen-vagrant' +gem 'kitchen-ec2' gem 'kitchen-sync' diff --git a/Gemfile.lock b/Gemfile.lock index c1d3fe3..33198a0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,6 +2,12 @@ GEM remote: https://rubygems.org/ specs: addressable (2.3.8) + aws-sdk (2.1.26) + aws-sdk-resources (= 2.1.26) + aws-sdk-core (2.1.26) + jmespath (~> 1.0) + aws-sdk-resources (2.1.26) + aws-sdk-core (= 2.1.26) berkshelf (3.3.0) addressable (~> 2.3.4) berkshelf-api-client (~> 1.2) @@ -79,6 +85,7 @@ GEM ffi (~> 1.9) diff-lcs (1.2.5) erubis (2.7.0) + excon (0.45.4) faraday (0.9.1) multipart-post (>= 1.2, < 3) fauxhai (2.3.0) @@ -92,7 +99,13 @@ GEM hitimes (1.2.2) httpclient (2.6.0.1) ipaddress (0.8.0) + jmespath (1.1.3) json (1.8.3) + kitchen-ec2 (0.10.0) + aws-sdk (~> 2) + excon + multi_json + test-kitchen (~> 1.4, >= 1.4.1) kitchen-sync (1.1.1) net-sftp test-kitchen (>= 1.0.0) @@ -224,6 +237,7 @@ PLATFORMS DEPENDENCIES berkshelf chefspec + kitchen-ec2 kitchen-sync kitchen-vagrant test-kitchen @@ -2,32 +2,12 @@ chef-talk Cookbook ================== -This cookbook creates provisions a server and preps it for deploying a -rails application to it. +This cookbook is a demo cookbook created for a talk given at YYC Ruby. -Requirements ------------- - -Works on my box. - -Attributes ----------- -View the attributes/default.rb - -Usage ------ -#### chef-talk::default -Just include `chef-talk` in your node's `run_list`: - -```json -{ - "name":"my_node", - "run_list": [ - "recipe[chef-talk]" - ] -} -``` +It provides examples of running chefspec, and test kitchen. It creates a +couple of custom lightweight resource provides, and demonstrates how to +manage cookbook dependencies. Contributing ------------ diff --git a/spec/recipes/env_spec.rb b/spec/recipes/env_spec.rb deleted file mode 100644 index 643a02f..0000000 --- a/spec/recipes/env_spec.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'spec_helper' - -describe "chef-talk::foreman" do - it 'lays down each environment variable' do - end -end |
