Skip to content

Instantly share code, notes, and snippets.

View afiune's full-sized avatar
🏠
Working from home

Salim Afiune Maya afiune

🏠
Working from home
View GitHub Profile
#
# This Guardfile exemplified how to manage One Shared Task
# across one or multiple Groups. The advantage of this code is
# that the Shared Task will not be loaded more that one time
# and it will belongs to the default group (as default) or
# any other group you have declared.
#
# Owner: Salim Afiune @afiune <[email protected]>
# Created: 04/15/2014
#
@afiune
afiune / gist:5064249fc4327f6c07f4
Created June 18, 2014 13:44
Converge for opscode-customers/trainingcert
Using
* Chef-11.12.8
* ruby-2.1.2
salimafiune@afiunechef:~/github/trainingcert$ bundle install
Using rake 10.3.2
Using i18n 0.6.9
Using multi_json 1.10.1
Using activesupport 3.2.18
Using addressable 2.3.6
@afiune
afiune / Kitchen Driver: EC2 Windows support
Last active May 9, 2018 21:54
Making test-kitchen/kitchen-vagrant works with WindowsGuest using WinRM protocol [Progress]
salimafiune@afiunechef:~/github/tk-windows
$ kitchen list
Instance Driver Provisioner Last Action
default-windows-2008R2-SP1 Ec2Windows ChefZero Converged
salimafiune@afiunechef:~/github/tk-windows
$ kitchen destroy
-----> Starting Kitchen (v1.3.0)
-----> Destroying <default-windows-2008R2-SP1>...
EC2 instance <i-923c0ab9> destroyed.
Finished destroying <default-windows-2008R2-SP1> (0m2.43s).
@afiune
afiune / Multiplatform Converge [Unix-Windows] SSH-WinRM
Created July 29, 2014 03:14
Test-kitche with Transport Abstraction
salimafiune@afiunechef:~/github/tk-multiplatform
$ bundle exec kitchen list
Instance Driver Provisioner Transport Last Action
default-centos-65 Vagrant ChefZero ssh <Not Created>
default-windows7-empty Vagrant ChefZero winrm <Not Created>
default-windows2012r2-cloud Vagrant ChefZero winrm <Not Created>
salimafiune@afiunechef:~/github/tk-multiplatform
$ bundle exec kitchen converge
-----> Starting Kitchen (v1.3.0)
-----> Creating <default-centos-65>...
@afiune
afiune / Both drivers EC2 and Vagrant
Created August 8, 2014 17:42
[tk-multiplatform] - Test Transport Abstraction
salimafiune@afiuneChef:~/github/tk-multiplatform
$ bundle exec kitchen list
Instance Driver Provisioner Transport Last Action
default-windows-2008R2 Ec2 ChefZero winrm <Not Created>
default-ubuntu-1304 Ec2 ChefSolo ssh <Not Created>
default-windows-2012R2 Vagrant ChefSolo winrm <Not Created>
default-centos-65 Vagrant ChefZero ssh <Not Created>
salimafiune@afiuneChef:~/github/tk-multiplatform
$ bundle exec kitchen converge
-----> Starting Kitchen (v1.3.0)
@afiune
afiune / gist:5e49f53f20e203df9d82
Created August 27, 2014 18:30
Provider error on Group Resource
===============================================================================
Error executing action `create` on resource 'group[mqm]'
================================================================================
Chef::Exceptions::Group
-----------------------
you must override set_members in #<Chef::Provider::Group::Groupadd:0x0000000374c9c8>
Resource Declaration:
---------------------
FROM:
CLI RESPONSE:
An instance of Host
objectID=HOST.4208
name=D-2BLTFZ1-LVMH
hostID=4,208
capacityInKB=230,686,720
hostType=-1
salimafiune@afiunechef:~/chef/data_bag_testing
$ ruby parallel_insertions.rb
Data bag testing already exist. We will destroy it! (5 sec)
Data bag testing has 0 items.
Inserting ...
Waiting for 936 thread(s) to finish...
[2014-09-24T11:41:03-04:00] ERROR: Connection refused connecting to https://api.opscode.com/organizations/afiune/data/testing, retry 1/5
[2014-09-24T11:41:04-04:00] ERROR: Connection refused connecting to https://api.opscode.com/organizations/afiune/data/testing, retry 1/5
[2014-09-24T11:41:04-04:00] ERROR: Connection refused connecting to https://api.opscode.com/organizations/afiune/data/testing, retry 1/5
[2014-09-24T11:41:04-04:00] ERROR: Connection refused connecting to https://api.opscode.com/organizations/afiune/data/testing, retry 1/5
@afiune
afiune / Install Test-kitchen 1.4.0.md
Last active August 29, 2015 14:10
Test-kitchen Transport Abstraction

Install Test-kitchen Transport Abstraction

  1. Clone github repos:
$ git clone https://github.com/test-kitchen/test-kitchen.git
$ git clone https://github.com/test-kitchen/kitchen-vagrant.git
  1. Build & Install Test-Kitchen 1.4.0
$ cd test-kitchen/
@afiune
afiune / gist:5fbaf22385304489914c
Created February 19, 2015 20:12
Test-kitchen Tracer thread.join
This file has been truncated, but you can view the full file.
[12] kc(Kitchen::Config)> thread.join
#0:/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:38:Kernel:>: def require path
#0:/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:Kernel:-: RUBYGEMS_ACTIVATION_MONITOR.enter
#0:/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:41:Kernel:-: path = path.to_path if path.respond_to? :to_path
#0:/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:43:Kernel:-: spec = Gem.find_unresolved_default_spec(path)
#0:/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:1112:Gem:>: def find_unresolved_default_spec(path)
#0:/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:1113:Gem:-: Gem.suffixes.each do |suffix|
#0:/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:883:Gem:>: def self.suffixes
#0:/opt/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:891:Gem:-: ].compact.uniq
#0:/opt/chef