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
def get_chef_zero_server_pid(port) | |
pid = "" | |
is_windows = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/) | |
if is_windows | |
process = [] | |
stdin, stdout = Open3.popen3("netstat -ao -p TCP -n") | |
stdout.each_line.select do |l| | |
if l.split[1] =~ /:#{port}/ |
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
C:\Users\Bryan\github\tk-windows>bundle exec kitchen test | |
-----> Starting Kitchen (v1.3.0) | |
-----> Cleaning up any prior instances of <default-windows2012r2-cloud> | |
-----> Destroying <default-windows2012r2-cloud>... | |
Finished destroying <default-windows2012r2-cloud> (0m0.00s). | |
-----> Testing <default-windows2012r2-cloud> | |
-----> Creating <default-windows2012r2-cloud>... | |
Bringing machine 'default' up with 'virtualbox' provider... | |
==> default: Importing base box 'windows2012r2_cloud'... | |
==> default: Matching MAC address for NAT networking... |
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
$Server = "VCENTER SERVER" | |
$datacenter = Get-Datacenter -Name "DATACENTER NAME" | |
$cluster = Get-Cluster -Name "CLUSTER NAME" -Location $datacenter | |
$TemplateName = "TEMPLATE NAME" | |
$Template = Get-Template -Name $TemplateName -Location $datacenter | |
$Datastore = Get-DatastoreCluster -Name "DATASTORE NAME" | |
$ResourcePool = Get-ResourcePool -Name "RESOURCE POOL NAME" -Location $cluster | |
$folder = "FOLDER NAME" | |
$vmname = "VM NAME" |
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
source "https://rubygems.org" | |
gem "berkshelf" | |
group :test do | |
gem "chefspec" | |
gem "foodcritic" | |
gem "rubocop" | |
gem "guard" | |
gem "guard-rspec" |
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
current_dir = File.dirname(__FILE__) | |
log_level :info | |
log_location STDOUT | |
node_name "<USERNAME>" | |
client_key "#{current_dir}/user.pem" | |
chef_server_url "https://api.opscode.com/organizations/<ORGANIZATION>" | |
cache_type 'BasicFile' | |
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" ) | |
cookbook_path ["#{current_dir}/../cookbooks"] |
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
knife spork bump sample-cookbook $BUMP_LEVEL | |
COOKBOOK_VERSION=v`sed -n "s/^ *version *[\'\"]\(.*\)[\'\"]/\1/p" cookbooks/$JOB_NAME/metadata.rb` | |
echo COOKBOOK_VERSION=$COOKBOOK_VERSION >> build.properties | |
cd cookbooks/$JOB_NAME | |
if [ -b "Berksfile.lock" ] | |
then | |
berks update sample-cookbook | |
else | |
berks install |
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
<?xml version='1.0' encoding='UTF-8'?> | |
<project> | |
<actions/> | |
<description></description> | |
<keepDependencies>false</keepDependencies> | |
<properties> | |
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="[email protected]"> | |
<projectUrl>https://github.com/txag1995/sample-cookbook/</projectUrl> | |
</com.coravy.hudson.plugins.github.GithubProjectProperty> | |
</properties> |
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
<?xml version='1.0' encoding='UTF-8'?> | |
<project> | |
<actions/> | |
<description></description> | |
<keepDependencies>false</keepDependencies> | |
<properties> | |
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="[email protected]"> | |
<projectUrl>https://github.com/txag1995/sample-cookbook/</projectUrl> | |
</com.coravy.hudson.plugins.github.GithubProjectProperty> | |
</properties> |
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
<?xml version='1.0' encoding='UTF-8'?> | |
<project> | |
<actions/> | |
<description></description> | |
<keepDependencies>false</keepDependencies> | |
<properties> | |
<com.coravy.hudson.plugins.github.GithubProjectProperty plugin="[email protected]"> | |
<projectUrl>https://github.com/txag1995/chef-repo/</projectUrl> | |
</com.coravy.hudson.plugins.github.GithubProjectProperty> | |
<hudson.model.ParametersDefinitionProperty> |
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
orgs = {} | |
jenkins_home = node['jenkins']['master']['home'] | |
chef_orgs.each do |org| | |
# Create a has with org info so we can create the chef-identity | |
# configuration file. | |
org_info = { | |
# 'name' => org['id'], | |
'key' => org['pem'], |
OlderNewer