Skip to content

Instantly share code, notes, and snippets.

@prachikhadke
Last active November 17, 2017 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prachikhadke/ba715b8f111e9fd7911ad82e4b19627b to your computer and use it in GitHub Desktop.
Save prachikhadke/ba715b8f111e9fd7911ad82e4b19627b to your computer and use it in GitHub Desktop.
test kitchen logs
op-chef pskhadke$ kitchen test
-----> Starting Kitchen (v1.19.0)
-----> Cleaning up any prior instances of <default-centos-74>
-----> Destroying <default-centos-74>...
Finished destroying <default-centos-74> (0m0.00s).
-----> Testing <default-centos-74>
-----> Creating <default-centos-74>...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/centos-7.4'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/centos-7.4' is up to date...
==> default: Setting the name of the VM: default-centos-74_default_1510951288655_81999
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2200 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 5.1.30
default: VirtualBox Version: 5.2
==> default: Setting hostname...
==> default: Mounting shared folders...
default: /tmp/omnibus/cache => /Users/pskhadke/.kitchen/cache
==> default: Machine not provisioned because `--no-provision` is specified.
[SSH] Established
Vagrant instance <default-centos-74> created.
Finished creating <default-centos-74> (0m29.72s).
-----> Converging <default-centos-74>...
Preparing files for transfer
Preparing dna.json
Preparing cookbooks from project directory
Removing non-cookbook files before transfer
Preparing validation.pem
Preparing client.rb
-----> Installing Chef Omnibus (install only if missing)
Downloading https://omnitruck.chef.io/install.sh to file /tmp/install.sh
Trying wget...
Download complete.
el 7 x86_64
Getting information for chef stable for el...
downloading https://omnitruck.chef.io/stable/chef/metadata?v=&p=el&pv=7&m=x86_64
to file /tmp/install.sh.2973/metadata.txt
trying wget...
sha1 037a61a5d9c89d9b71d4c4f6256f45ed422a73ee
sha256 18826690ac2c7e5f16a21d898ed77be7d78fd2d84bc2a71b4506ee480876bc4b
url https://packages.chef.io/files/stable/chef/13.6.4/el/7/chef-13.6.4-1.el7.x86_64.rpm
version 13.6.4
downloaded metadata file looks valid...
/tmp/omnibus/cache/chef-13.6.4-1.el7.x86_64.rpm exists
Comparing checksum with sha256sum...
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
You are installing an omnibus package without a version pin. If you are installing
on production servers via an automated process this is DANGEROUS and you will
be upgraded without warning on new releases, even to new major releases.
Letting the version float is only appropriate in desktop, test, development or
CI/CD environments.
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
Installing chef
installing with rpm...
warning: /tmp/omnibus/cache/chef-13.6.4-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:chef-13.6.4-1.el7 ################################# [100%]
Thank you for installing Chef!
Transferring files to <default-centos-74>
[2017-11-17T20:41:59+00:00] INFO: Started chef-zero at chefzero://localhost:1 with repository at /tmp/kitchen, /tmp/kitchen
One version per cookbook
[2017-11-17T20:41:59+00:00] INFO: Started chef-zero at chefzero://localhost:1 with repository at /tmp/kitchen, /tmp/kitchen
One version per cookbook
[2017-11-17T20:41:59+00:00] INFO: Forking chef instance to converge...
[2017-11-17T20:41:59+00:00] INFO: Forking chef instance to converge...
Starting Chef Client, version 13.6.4
[2017-11-17T20:41:59+00:00] INFO: *** Chef 13.6.4 ***
[2017-11-17T20:41:59+00:00] INFO: *** Chef 13.6.4 ***
[2017-11-17T20:41:59+00:00] INFO: Platform: x86_64-linux
[2017-11-17T20:41:59+00:00] INFO: Platform: x86_64-linux
[2017-11-17T20:41:59+00:00] INFO: Chef-client pid: 3098
[2017-11-17T20:41:59+00:00] INFO: Chef-client pid: 3098
[2017-11-17T20:41:59+00:00] INFO: The plugin path /etc/chef/ohai/plugins does not exist. Skipping...
[2017-11-17T20:41:59+00:00] INFO: The plugin path /etc/chef/ohai/plugins does not exist. Skipping...
Creating a new client identity for default-centos-74 using the validator key.
[2017-11-17T20:42:00+00:00] INFO: Client key /tmp/kitchen/client.pem is not present - registering
[2017-11-17T20:42:00+00:00] INFO: Client key /tmp/kitchen/client.pem is not present - registering
[2017-11-17T20:42:01+00:00] INFO: Setting the run_list to ["recipe[op-base::deploy]"] from CLI options
[2017-11-17T20:42:01+00:00] INFO: Setting the run_list to ["recipe[op-base::deploy]"] from CLI options
[2017-11-17T20:42:01+00:00] INFO: Run List is [recipe[op-base::deploy]]
[2017-11-17T20:42:01+00:00] INFO: Run List is [recipe[op-base::deploy]]
[2017-11-17T20:42:01+00:00] INFO: Run List expands to [op-base::deploy]
[2017-11-17T20:42:01+00:00] INFO: Run List expands to [op-base::deploy]
[2017-11-17T20:42:01+00:00] INFO: Starting Chef Run for default-centos-74
[2017-11-17T20:42:01+00:00] INFO: Starting Chef Run for default-centos-74
[2017-11-17T20:42:01+00:00] INFO: Running start handlers
[2017-11-17T20:42:01+00:00] INFO: Running start handlers
[2017-11-17T20:42:01+00:00] INFO: Start handlers complete.
[2017-11-17T20:42:01+00:00] INFO: Start handlers complete.
resolving cookbooks for run list: ["op-base::deploy"]
[2017-11-17T20:42:01+00:00] INFO: Loading cookbooks [op-base@1.0.0]
[2017-11-17T20:42:01+00:00] INFO: Loading cookbooks [op-base@1.0.0]
Synchronizing Cookbooks:
[2017-11-17T20:42:01+00:00] INFO: Storing updated cookbooks/op-base/recipes/default.rb in the cache.
[2017-11-17T20:42:01+00:00] INFO: Storing updated cookbooks/op-base/recipes/default.rb in the cache.
[2017-11-17T20:42:01+00:00] INFO: Storing updated cookbooks/op-base/recipes/deploy.rb in the cache.
[2017-11-17T20:42:01+00:00] INFO: Storing updated cookbooks/op-base/recipes/deploy.rb in the cache.
[2017-11-17T20:42:01+00:00] INFO: Storing updated cookbooks/op-base/files/config in the cache.
[2017-11-17T20:42:01+00:00] INFO: Storing updated cookbooks/op-base/files/config in the cache.
[2017-11-17T20:42:01+00:00] INFO: Storing updated cookbooks/op-base/metadata.rb in the cache.
[2017-11-17T20:42:01+00:00] INFO: Storing updated cookbooks/op-base/metadata.rb in the cache.
- op-base (1.0.0)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 5 resources
Recipe: op-base::default
* execute[run yum update] action run[2017-11-17T20:42:01+00:00] INFO: Processing execute[run yum update] action run (op-base::default line 10)
[2017-11-17T20:42:01+00:00] INFO: Processing execute[run yum update] action run (op-base::default line 10)
[execute] Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirror.tzulo.com
* extras: mirror.lug.udel.edu
* updates: mirrors.tripadvisor.com
Resolving Dependencies
--> Running transaction check
---> Package wget.x86_64 0:1.14-15.el7 will be updated
---> Package wget.x86_64 0:1.14-15.el7_4.1 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
wget x86_64 1.14-15.el7_4.1 updates 547 k
Transaction Summary
================================================================================
Upgrade 1 Package
Total download size: 547 k
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Updating : wget-1.14-15.el7_4.1.x86_64 1/2
Cleanup : wget-1.14-15.el7.x86_64 2/2
Verifying : wget-1.14-15.el7_4.1.x86_64 1/2
Verifying : wget-1.14-15.el7.x86_64 2/2
Updated:
wget.x86_64 0:1.14-15.el7_4.1
Complete!
[2017-11-17T20:42:11+00:00] INFO: execute[run yum update] ran successfully
[2017-11-17T20:42:11+00:00] INFO: execute[run yum update] ran successfully
- execute yum -y update
* execute[install epel] action run[2017-11-17T20:42:11+00:00] INFO: Processing execute[install epel] action run (op-base::default line 16)
[2017-11-17T20:42:11+00:00] INFO: Processing execute[install epel] action run (op-base::default line 16)
[execute] Retrieving https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Preparing... ########################################
Updating / installing...
epel-release-7-11 ########################################
warning: /var/tmp/rpm-tmp.K2e3Hl: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.tzulo.com
* epel: mirror.seas.harvard.edu
* extras: mirror.lug.udel.edu
* updates: mirrors.tripadvisor.com
[2017-11-17T20:42:17+00:00] INFO: execute[install epel] ran successfully
[2017-11-17T20:42:17+00:00] INFO: execute[install epel] ran successfully
- execute rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum check-update || true
* yum_package[bind-utils, lsof, wget, ntp, ntpdate] action install[2017-11-17T20:42:17+00:00] INFO: Processing yum_package[bind-utils, lsof, wget, ntp, ntpdate] action install (op-base::default line 23)
[2017-11-17T20:42:17+00:00] INFO: Processing yum_package[bind-utils, lsof, wget, ntp, ntpdate] action install (op-base::default line 23)
[2017-11-17T20:42:20+00:00] INFO: yum_package[bind-utils, lsof, wget, ntp, ntpdate] installing bind-utils-9.9.4-51.el7.x86_64 from updates repository lsof-4.87-4.el7.x86_64 from base repository ntp-4.2.6p5-25.el7.centos.2.x86_64 from base repository ntpdate-4.2.6p5-25.el7.centos.2.x86_64 from base repository
[2017-11-17T20:42:20+00:00] INFO: yum_package[bind-utils, lsof, wget, ntp, ntpdate] installing bind-utils-9.9.4-51.el7.x86_64 from updates repository lsof-4.87-4.el7.x86_64 from base repository ntp-4.2.6p5-25.el7.centos.2.x86_64 from base repository ntpdate-4.2.6p5-25.el7.centos.2.x86_64 from base repository
[2017-11-17T20:42:24+00:00] INFO: yum_package[bind-utils, lsof, wget, ntp, ntpdate] installed ["bind-utils", "lsof", nil, "ntp", "ntpdate"] at ["9.9.4-51.el7", "4.87-4.el7", nil, "4.2.6p5-25.el7.centos.2", "4.2.6p5-25.el7.centos.2"]
[2017-11-17T20:42:24+00:00] INFO: yum_package[bind-utils, lsof, wget, ntp, ntpdate] installed ["bind-utils", "lsof", nil, "ntp", "ntpdate"] at ["9.9.4-51.el7", "4.87-4.el7", nil, "4.2.6p5-25.el7.centos.2", "4.2.6p5-25.el7.centos.2"]
- install version 9.9.4-51.el7 of package bind-utils
- install version 4.87-4.el7 of package lsof
- install version 4.2.6p5-25.el7.centos.2 of package ntp
- install version 4.2.6p5-25.el7.centos.2 of package ntpdate
Recipe: op-base::deploy
* execute[run yum update] action run[2017-11-17T20:42:24+00:00] INFO: Processing execute[run yum update] action run (op-base::deploy line 13)
[2017-11-17T20:42:24+00:00] INFO: Processing execute[run yum update] action run (op-base::deploy line 13)
[execute] Created symlink from /etc/systemd/system/multi-user.target.wants/ntpd.service to /usr/lib/systemd/system/ntpd.service.
[2017-11-17T20:42:24+00:00] INFO: execute[run yum update] ran successfully
[2017-11-17T20:42:24+00:00] INFO: execute[run yum update] ran successfully
- execute systemctl enable ntpd && systemctl start ntpd
* cookbook_file[/etc/selinux/config] action create[2017-11-17T20:42:24+00:00] INFO: Processing cookbook_file[/etc/selinux/config] action create (op-base::deploy line 19)
[2017-11-17T20:42:24+00:00] INFO: Processing cookbook_file[/etc/selinux/config] action create (op-base::deploy line 19)
[2017-11-17T20:42:24+00:00] INFO: cookbook_file[/etc/selinux/config] backed up to /tmp/kitchen/backup/etc/selinux/config.chef-20171117204224.128272
[2017-11-17T20:42:24+00:00] INFO: cookbook_file[/etc/selinux/config] backed up to /tmp/kitchen/backup/etc/selinux/config.chef-20171117204224.128272
[2017-11-17T20:42:24+00:00] INFO: cookbook_file[/etc/selinux/config] updated file contents /etc/selinux/config
[2017-11-17T20:42:24+00:00] INFO: cookbook_file[/etc/selinux/config] updated file contents /etc/selinux/config
- update content in file /etc/selinux/config from 80c61e to dd8750
--- /etc/selinux/config 2017-10-26 15:06:41.280801000 +0000
+++ /etc/selinux/.chef-config20171117-3098-dtosni 2017-11-17 20:42:24.124965554 +0000
@@ -1,15 +1,12 @@
-
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
-SELINUX=permissive
+SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
-# minimum - Modification of targeted policy. Only selected processes are protected.
+# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
-
-
- restore selinux security context
[2017-11-17T20:42:24+00:00] INFO: Chef Run complete in 23.061982678 seconds
[2017-11-17T20:42:24+00:00] INFO: Chef Run complete in 23.061982678 seconds
Running handlers:
[2017-11-17T20:42:24+00:00] INFO: Running report handlers
[2017-11-17T20:42:24+00:00] INFO: Running report handlers
Running handlers complete
[2017-11-17T20:42:24+00:00] INFO: Report handlers complete
[2017-11-17T20:42:24+00:00] INFO: Report handlers complete
Chef Client finished, 5/5 resources updated in 24 seconds
Finished converging <default-centos-74> (0m33.27s).
-----> Setting up <default-centos-74>...
Finished setting up <default-centos-74> (0m0.00s).
-----> Verifying <default-centos-74>...
Preparing files for transfer
Transferring files to <default-centos-74>
Finished verifying <default-centos-74> (0m0.00s).
-----> Destroying <default-centos-74>...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
Vagrant instance <default-centos-74> destroyed.
Finished destroying <default-centos-74> (0m3.58s).
Finished testing <default-centos-74> (1m6.58s).
-----> Kitchen is finished. (1m6.70s)
op-chef pskhadke$ kitchen test
-----> Starting Kitchen (v1.19.0)
-----> Cleaning up any prior instances of <default-centos-74>
-----> Destroying <default-centos-74>...
Finished destroying <default-centos-74> (0m0.00s).
-----> Testing <default-centos-74>
-----> Creating <default-centos-74>...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'bento/centos-7.4'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/centos-7.4' is up to date...
==> default: Setting the name of the VM: default-centos-74_default_1510953705645_759
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2200 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 5.1.30
default: VirtualBox Version: 5.2
==> default: Setting hostname...
==> default: Mounting shared folders...
default: /tmp/omnibus/cache => /Users/pskhadke/.kitchen/cache
==> default: Machine not provisioned because `--no-provision` is specified.
[SSH] Established
Vagrant instance <default-centos-74> created.
Finished creating <default-centos-74> (0m30.62s).
-----> Converging <default-centos-74>...
Preparing files for transfer
Preparing dna.json
Preparing cookbooks from project directory
Removing non-cookbook files before transfer
Preparing solo.rb
-----> Installing Chef Omnibus (install only if missing)
Downloading https://omnitruck.chef.io/install.sh to file /tmp/install.sh
Trying wget...
Download complete.
el 7 x86_64
Getting information for chef stable for el...
downloading https://omnitruck.chef.io/stable/chef/metadata?v=&p=el&pv=7&m=x86_64
to file /tmp/install.sh.2971/metadata.txt
trying wget...
sha1 037a61a5d9c89d9b71d4c4f6256f45ed422a73ee
sha256 18826690ac2c7e5f16a21d898ed77be7d78fd2d84bc2a71b4506ee480876bc4b
url https://packages.chef.io/files/stable/chef/13.6.4/el/7/chef-13.6.4-1.el7.x86_64.rpm
version 13.6.4
downloaded metadata file looks valid...
/tmp/omnibus/cache/chef-13.6.4-1.el7.x86_64.rpm exists
Comparing checksum with sha256sum...
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
You are installing an omnibus package without a version pin. If you are installing
on production servers via an automated process this is DANGEROUS and you will
be upgraded without warning on new releases, even to new major releases.
Letting the version float is only appropriate in desktop, test, development or
CI/CD environments.
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
Installing chef
installing with rpm...
warning: /tmp/omnibus/cache/chef-13.6.4-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:chef-13.6.4-1.el7 ################################# [100%]
Thank you for installing Chef!
Transferring files to <default-centos-74>
Starting Chef Client, version 13.6.4
Creating a new client identity for default-centos-74 using the validator key.
resolving cookbooks for run list: ["op-base::deploy"]
Synchronizing Cookbooks:
- op-base (1.0.0)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 5 resources
Recipe: op-base::default
* execute[run yum update] action run
- execute yum -y update
* execute[install epel] action run
- execute rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum check-update || true
* yum_package[bind-utils, lsof, wget, ntp, ntpdate] action install
- install version 9.9.4-51.el7 of package bind-utils
- install version 4.87-4.el7 of package lsof
- install version 4.2.6p5-25.el7.centos.2 of package ntp
- install version 4.2.6p5-25.el7.centos.2 of package ntpdate
Recipe: op-base::deploy
* execute[run yum update] action run
- execute systemctl enable ntpd && systemctl start ntpd
* cookbook_file[/etc/selinux/config] action create
- update content in file /etc/selinux/config from 80c61e to dd8750
--- /etc/selinux/config 2017-10-26 15:06:41.280801000 +0000
+++ /etc/selinux/.chef-config20171117-3089-16jogh5 2017-11-17 21:22:49.697954000 +0000
@@ -1,15 +1,12 @@
-
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
-SELINUX=permissive
+SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
-# minimum - Modification of targeted policy. Only selected processes are protected.
+# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
-
-
- restore selinux security context
Running handlers:
Running handlers complete
Chef Client finished, 5/5 resources updated in 32 seconds
Finished converging <default-centos-74> (0m41.46s).
-----> Setting up <default-centos-74>...
Finished setting up <default-centos-74> (0m0.00s).
-----> Verifying <default-centos-74>...
Loaded tests from {:path=>".Users.pskhadke.WORK.TWC.code.opdevops.op-chef.test.integration.default"}
Profile: tests from {:path=>"/Users/pskhadke/WORK/TWC/code/opdevops/op-chef/test/integration/default"} (tests from {:path=>".Users.pskhadke.WORK.TWC.code.opdevops.op-chef.test.integration.default"})
Version: (not specified)
Target: ssh://vagrant@127.0.0.1:2200
System Package
✔ lsof should be installed
Test Summary: 1 successful, 0 failures, 0 skipped
Finished verifying <default-centos-74> (0m1.13s).
-----> Destroying <default-centos-74>...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
Vagrant instance <default-centos-74> destroyed.
Finished destroying <default-centos-74> (0m3.33s).
Finished testing <default-centos-74> (1m16.54s).
-----> Kitchen is finished. (1m17.30s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment