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

Project Initialization

This document will show you how to initialize projects in Chef Automate, it includes simple examples as well as complex that will teach you how to customize your own initialization process within your organization.

Prerequisites

Automate CLI Setup

This file has been truncated, but you can view the full file.
➜ opsworks-bootstrap git:(master) kitchen converge single-node-centos
-----> Starting Kitchen (v1.10.2)
-----> Converging <single-node-centos>...
Preparing files for transfer
Preparing dna.json
Resolving cookbook dependencies with Berkshelf 4.3.5...
Removing non-cookbook files before transfer
Preparing data_bags
Preparing validation.pem
Preparing client.rb
➜ sandbox chef generate cookbook foo
Generating cookbook foo
- Ensuring correct cookbook file content
- Committing cookbook files to git
- Ensuring delivery configuration
- Ensuring correct delivery build cookbook content
- Adding delivery configuration to feature branch
- Adding build cookbook to feature branch
- Merging delivery content feature branch to master
Generating build cookbook skeleton
DEBUG:delivery::project: Cookbook generator cached path: "/Users/salimafiune/.delivery/cache/generator-cookbooks"
DEBUG:delivery::project: found project root dir: "/Users/salimafiune/chef/delivery/corp/organizations/sandbox/dk-test"
Tried to fork a process, and failed
Failed to execute chef generate:
STDOUT: Recipe: code_generator::build_cookbook
* generator_desc[Ensuring delivery configuration] action write
- Ensuring delivery configuration
* directory[/Users/salimafiune/chef/delivery/corp/organizations/sandbox/dk-test/.delivery] action create (up to date)
➜ delivery-cluster git:(master) ✗ export CHEF_ENV=aws
➜ delivery-cluster git:(master) ✗ rake setup:cluster
Verifying ChefDK version
Running ChefDK version 0.16.1
Configuring the provisioner node
[2016-06-23T16:11:08-04:00] WARN: chef_gem[chef-provisioning-ssh] chef_gem compile_time installation is deprecated at recipes/provisioner.rb:25:in `block in run_chef_recipe'
➜ delivery-cli git:(habitat) chef verify --unit
Running verification for component 'berkshelf'
Running verification for component 'test-kitchen'
Running verification for component 'tk-policyfile-provisioner'
Running verification for component 'chef-client'
Running verification for component 'chef-dk'
Running verification for component 'chef-provisioning'
Running verification for component 'chefspec'
Running verification for component 'generated-cookbooks-pass-chefspec'
Running verification for component 'rubocop'
@afiune
afiune / delivery-init-features.md
Last active May 13, 2016 17:10
SPOOL-140 Mini project for delivery-cli init command

Delivery-cli

Find below the list of features released in the new version of the delivery-cli (0.0.15)

Feature: Verify the CLI token

Starting from version0.0.15 the delivery-cli will verify the token expiration for every single API request to the Delivery Server. That means that if your token has expired, you will be prompted to renew it.

If you would like to know if your token has expired you can use the option --verify:

I, [2016-04-27T12:05:36.523705 #15301] INFO -- : Reducing lockfile
D, [2016-04-27T12:05:36.523798 #15301] DEBUG -- : Current lockfile:
D, [2016-04-27T12:05:36.523867 #15301] DEBUG -- :
D, [2016-04-27T12:05:36.523952 #15301] DEBUG -- : DEPENDENCIES
D, [2016-04-27T12:05:36.524013 #15301] DEBUG -- :
D, [2016-04-27T12:05:36.524069 #15301] DEBUG -- : GRAPH
D, [2016-04-27T12:05:36.524126 #15301] DEBUG -- :
D, [2016-04-27T12:05:36.524182 #15301] DEBUG -- : Unlocking dependencies no longer in the Berksfile
D, [2016-04-27T12:05:36.524257 #15301] DEBUG -- : Removing transitive dependencies
D, [2016-04-27T12:05:36.524344 #15301] DEBUG -- : Checking artifactory-pro (>= 0.0.0)

# Build delivery-cli on Windows This document describes the process to build a delivery-cli package on windows systems. We will be using Test-Kitchen so you can build it on any system because we will be spinning up the windows machines that will build the package.

NOTE: This document should be removed when our Delivery pipeline builds this packages automatically.

Here are the steps:

Clone delivery-cli repository

Delivery-cli Feature: Automatic version bump

Today we released the delivery-cli version 20160317163950 that includes a new feature to allow customers to automatically bump the version of the metadata of the cookbooks that are submitted to review in Delivery.

There are two methods to use this functionality:

Passing -a, --auto-bump flags

You can pass the flag -a or --auto-bump to the delivery review command:

➜  coffee git:(black) delivery review --auto-bump
Chef Delivery