Jeff Blaine | 30 May 03:08 2015
Picon

Intermittent failures with server 12.0.8?

We run all of our chef clients every 60 minutes.

Throughout the day, we're seeing clients, both 11.18.0-1 and 12.3.0-1,
report intermittent 403 authorization errors against Chef Server 12.0.8.

Is anyone else seeing this?

Luis Cosmes | 29 May 22:23 2015

Equivalent to knife-ec2 --ssh-gateway in kitchen-ec2?

Hi guys,

I am trying to use test kitchen-ec2 to provision ec2 instances in a private subnetwork, which can only be accessed via ssh through a jump server.  It is possible to bootstrap servers in this subnetwork using knife ec2 ----ssh-gateway [jump_server]  Is there an equivalent in kitchen-ec2?  Looking at the documentation and a quick look at the code I couldn't find a similar option.

Thanks,

Luis


Are you creating an ERP FrankenCloud? Watch 2:11 video

Roland Moriz | 29 May 20:19 2015
Picon

FYI: How to build an OSX 10.10 box for test-kitchen

Hi,

If you need to build a OSX 10.10 box for test-kitchen and VirtualBox, here's a tutorial how I managed it to do:
https://gist.github.com/rmoriz/37b671afe53c984b2f85

regards
Roland

Attachment (smime.p7s): application/pkcs7-signature, 2808 bytes
Tiago Cruz | 29 May 15:11 2015
Picon

Chef 12 and AWS AutoScaling

Hello guys,

Just to know, how are you guys are dealing with Chef and AutoScaling?

I'm using hostname such as 'mordor' and I was trying to scale such as 'mordor1', and after 'mordor2' and etc, using the knife node create to 'reserve' this hostname while the machine is created.

It was working on Chef 11, but stopped now on Chef 12 :(
- https://github.com/chef/chef-server/issues/263

So, I would like to know how you guys are working with this -- best praticies and tips :)

Thanks!

--
-- Tiago Cruz
Roland Moriz | 29 May 12:03 2015
Picon

chef-provisioning / knife-zero

Hi everyone!

I'm currently maintaining a couple of small (<25 nodes) knife-solo[1] and knife-zero[2] setups. 

Typically the setups are too small to run a traditional chef-server setup, also the owners don't want to
rely on third party services (data protection, latency) - so hosted chef is not a solution. 

Recently I've re-evaluated the current state of chef-provisioning and it looks way better than a couple of
months ago. However I'm not sure how this is meant to replace the "knife-*" solutions out there: While
setting up a couple of machines with attributes/run-list is very nice using the Chef-Provisioning
Chef-DSL, my customers usually don't want to (re-)converge *all* nodes but run chef-client explicitly
on one (or more) nodes.

Example provisioning recipe: https://gist.github.com/rmoriz/f293ca1402591c5469ae

I can run "bundle exec chef-client -z provisioning/test.rb" and the instances will be provisioned,
bootstrapped and converged. awesome!
But how do I later use chef-zero to converge e.g. *only* the nginx node? When I re-run the recipe, all nodes
will be converged.

As far as I understand, I could add some attributes or even (ab)use local environment variables to execute
only specific resources of the chef-provisinioning cookbook, but I'm sure this is not the right way to do
it, right?

A "one node per recipe"-approach seems to be very non-DRY to me and breaks all the nice "10.times do |i| …
end" examples to create a bunch of identical nodes.

I'm missing something like knife-zero in the mix, unfortunately it currently use a different port for
knife-zero forwarding which currently makes it incompatible.

Any hints? Thanks :)

best regards
Roland

[1] https://github.com/matschaffer/knife-solo
[2] https://github.com/higanworks/knife-zero
Attachment (smime.p7s): application/pkcs7-signature, 2808 bytes
David Montgomery | 29 May 07:11 2015
Picon

Chef::Exceptions::RecipeNotFound

Wow.........and I mean wow!!!!!!!!!!!!!


 ================================================================================
  Recipe Compile Error
  ================================================================================
 
  Chef::Exceptions::RecipeNotFound
  --------------------------------
  could not find recipe redis_queue_monitor for cookbook codebase


my recipe is on the server!!!!!!!!!!!

/var/scale-chef/chef-repo/site-cookbooks/codebase# ls
redis_queue_monitor.rb 


So..,what is the deal with chef solo....the recipe is there and it cant be found?

What am I missing?
Jeff Blaine | 29 May 01:58 2015
Picon

Platform-independent path normalization in guards, etc.

What's a good pattern for platform-independent path normalization in
guards, execute commands, etc.

Are there libs for this by chance? I'm ignorant as I'm not a
cross-platform ruby developer and also trying to do it a "Chef way" vs.
a pure-ruby way if possible.

For example:

if platform?('windows')
  diffcmd = 'fc'
  catcmd = 'type'
else
  diffcmd = 'diff'
  catcmd = 'cat'
end

execute "Really, something that HAS TO be an execute" do
  not_if "#{diffcmd} some-file other-file"
  # This breaks on Windows due to '/'
  command "#{catcmd} #{Chef::Config[:file_cache_path]}/noodle >>
/chef/humor-me"
end

Thanks for ideas.

niristotle okram | 28 May 23:43 2015
Picon

chef-client version while bootstraping

hey guys, 

I think i am missing something but couldn't figure out what. I am trying to bootstrap a node with the chef-client version 11.18.12. But it keeps coming back with version 11.10.4. Below is the log.


2.1.1 <at> oss:my_project $ knife bootstrap ec2-x.x.x.x.us-west-2.compute.amazonaws.com -r chef-client::service -x ec2-user -E dev -N oss-test-boot-ver --secret-file '/home/chef/keys/somename_dev_databag_secret.key' --bootstrap-version 11.18.12 --sudo

Doing old-style registration with the validation key at /home/chef/.chef/oss-dev-validator.pem...

Delete your validation key in order to use your user credentials instead

Connecting to ec2-x.x.x.x.us-west-2.compute.amazonaws.com

ec2-x.x.x.x.us-west-2.compute.amazonaws.com Starting first Chef Client run...

ec2-x.x.x.x.us-west-2.compute.amazonaws.com Starting Chef Client, version 11.10.4

ec2-x.x.x.x.us-west-2.compute.amazonaws.com Creating a new client identity for oss-test-boot-ver using the validator key.

ec2-x.x.x.x.us-west-2.compute.amazonaws.com resolving cookbooks for run list: ["chef-client::service"] 










--
Regards
nirish okram
Wade Peacock | 28 May 19:40 2015

LWRP - attributes required

Hey All,

 

Is it possible in the resource file of a LWRP to have attributes required for certain action type.

 

Exampe:

 

actions    :foo, :bar

 

default_action :foo

 

attribute :name, :kind_of => String, :name_attribute => true

attribute :section, :kind_of => String, :required => true (only for :bar action)

attribute :item, :kind_of => String, :required => true (only for :foo action )

attribute :value, :kind_of => [String,Integer], :required => true

 

Is the :respond_to the right thing?

 

I tried with no success:  

attribute :section, :kind_of => String, :required => true, :respond_to foo?

 

 

 

Wade Peacock

Cloud System Eng - Senior System Engineer/Automation  |  Vision Critical  

direct +1.604.629.9358  mobile +1.604.363.8137  

web visioncritical.com  | <at> VisionCritical on Twitter  |  Visit Vision Critical on LinkedIn   

 

New York | London | Hong Kong | Vancouver | Paris | San Francisco | Sydney | Tokyo | Toronto | Cologne | Minneapolis | Chicago | Ottawa | Detroit

Click here to watch our clients share their Vision Critical successes: www.visioncritical.com/client-stories

 

Maxime Brugidou | 27 May 19:31 2015
Picon

TravisCI auto-deploy cookbook to supermarket

Hi chefs,

Not sure if people are aware of this, but you can use TravisCI to automatically deploy your cookbooks to Supermarket using:

https://github.com/travis-ci/dpl/tree/v1.7.11#chef-supermarket

We use it to deploy some of our cookbooks automatically after pushing a tag.

Cheers,
Maxime

Jing Li | 27 May 06:02 2015
Picon

Question about Hosted Chef

Hi There,

We are currently hosting our own Chef Server on AWS, it's awesome! 

As our servers growing, we are looking at to move to the hosted Chef solution. Since we store many credential information in our cook books such as SSL certificate, passwords and etc, we would like to learn more about the security mode for hosted Chef solution.

Can anyone please help us on it?

Thanks so much

--

Jing Li 
Senior .Net Developer, The Network for Learning Ltd

D: +64 9 222 0170 | W: 
A: Suite 306, Geyser Building, 100 Parnell Road, Parnell, Auckland 1052
P: PO Box 37118, Parnell, Auckland 1151






Gmane