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
@afiune
afiune / gist:4453f598d1ea354f3d692bbc1784138f
Created May 19, 2017 15:03
Git diff gem version 1.3 VS 1.4
diff --git a/Gemfile.lock b/Gemfile.lock
index 6b1d8a5..1302866 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -113,7 +113,7 @@ GIT
PATH
remote: .
specs:
- chef-dk (1.3.49)
+ chef-dk (1.4.1)
➜ sandbox chef -v
Chef Development Kit Version: 1.4.1
chef-client version: 12.19.36
delivery version: master (41b94ffb5efd33723cf72a89bf4d273c8151c9dc)
berks version: 5.6.4
kitchen version: 1.16.0
inspec version: 1.25.0
➜ sandbox chef generate cookbook foo
Generating cookbook foo
- Ensuring correct cookbook file content
@afiune
afiune / delivery-sugar-v1.3.2-failure-run.out
Last active May 4, 2017 19:21
Air-gapped bug in delivery-sugar
Starting job on builder 6c7625088544 at 2017-05-04T18:58:56+00:00.
Command: delivery job verify unit --server delivery --user builder --ent cd --org test --project test --for master --change-id 4b341e43-b446-42c3-bcba-46e464200a23 --branch _reviews/master/initialize-delivery-pipeline/3 --git-url ssh://builder@cd@delivery-git:8989/cd/test/test
Chef Delivery
Starting job for test verify unit
Creating workspace in /var/opt/delivery/workspace/delivery/cd/test/test/master/verify/unit
Cloning repository, and merging _reviews/master/initialize-delivery-pipeline/3 to master
Configuring the job
Running the job
Setting up the builder
[2017-05-04T19:00:27+00:00] WARN: Ohai::Config[:disabled_plugins] is set. Ohai::Config[:disabled_plugins] is deprecated and will be removed in future releases of ohai. Use ohai.disabled_plugins in your configuration file to configure :disabled_plugins for ohai.
@afiune
afiune / example-app.md
Last active May 3, 2017 19:08
Habitat Application

Catland App

In this example the Catland application is running in Development, Acceptance and Production. Therefore in Habitat world we see them as three different applications:

  1. catland.development
  2. catland.acceptance
  3. catland.production

Lets see how catland.production looks like.

@afiune
afiune / gist:64087c3e5bd360f6bc59730f69f5ab88
Created March 20, 2017 17:56
Initialize a non-cookbook project
➜ sandbox mkdir non-cookbook
➜ sandbox cd non-cookbook
➜ non-cookbook git init
Initialized empty Git repository in /Users/salimafiune/chef/delivery/organizations/sandbox/non-cookbook/.git/
➜ non-cookbook git:(master) touch README.md
➜ non-cookbook git:(master) ✗ git commit -a -m "Initial Commit"
[master (root-commit) 176236f] Initial Commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 README.md
➜ delivery delivery api post orgs -d '{"name":"delete"}'
{
"_links": {
"create-project": {
"href": "/api/v0/e/Chef/orgs/delete/projects"
},
"full": {
"href": "/api/v0/e/Chef/orgs/delete"
}
}

Ohai Chefs!

We have selected 1.1.16 as our ChefDK v1.1 release candidate which is scheduled for release on Monday December 19, 2016.

Release Highlights

New Inspec Test Location

To address bugs and confusion with the previous test/recipes location, all newly generated cookbooks and recipes will place their Inspec tests in test/smoke/default. This placement creates the association of the smoke Workflow phase and the default Kitchen suite where the tests are run.

Default Docker image in kitchen-dokken is now official Chef image

➜ tk-unix git:(master) cat .kitchen/logs/kitchen.log
I, [2016-12-02T13:54:44.947283 #22757] INFO -- Kitchen: -----> Starting Kitchen (v1.15.0-dev)
I, [2016-12-02T13:54:49.398221 #22757] INFO -- Kitchen: -----> Converging <default-centos-72>...
E, [2016-12-02T13:54:49.408409 #22757] ERROR -- Kitchen: ------Exception-------
E, [2016-12-02T13:54:49.408517 #22757] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2016-12-02T13:54:49.408563 #22757] ERROR -- Kitchen: Message: 1 actions failed.
>>>>>> Failed to complete #converge action: [undefined local variable or method `berkshelf_obj' for #<Kitchen::Provisioner::Chef::Berkshelf:0x007ff439adf248>] on default-centos-72
E, [2016-12-02T13:54:49.408582 #22757] ERROR -- Kitchen: ----------------------
E, [2016-12-02T13:54:49.408594 #22757] ERROR -- Kitchen: ------Backtrace-------
E, [2016-12-02T13:54:49.408666 #22757] ERROR -- Kitchen: /opt/chefdk/embedded/lib/ruby/gems/2.3.0/gems/test-kitchen-1.15.0.pre.dev/lib/kitchen/command.rb:187:in `report_errors'
@afiune
afiune / advantages-driver-cache-directory.md
Last active December 13, 2016 19:47
Test kitchen features

Hello Kitchen Users!!

Kitchen recently introduced driver caching mechanisms that can be used by provisioners to cache downloads and other files between provisions. For people who use the kitchen-vagrant driver to run Chef, we've introduced local caching of the chef-client packages. This change cuts as much as 3 minutes per VM from the typical Kitchen run!

In Kitchen version 1.14.0, Kitchen will automatically cache downloaded chef-client packages for use between provisions. By using the new cache directory, the kitchen-vagrant driver will automatically share those client packages to the guest VM, meaning that you no longer have to wait for the client to download on every guest provision.

@afiune
afiune / README.md
Last active February 21, 2018 19:36
Automate LDAP Bulking User Creation

LDAP Bulking User Creation Process

This is temporal automation to create multiple LDAP users in Chef Automate.

Prerequisites

The minimum prerequisites to be able to use this automation are: