Skip to content
This repository has been archived by the owner on Dec 21, 2018. It is now read-only.

ask_me_anything_london

nathenharvey edited this page Oct 21, 2014 · 1 revision

Ask Me Anything

Thursday, Strategy, 11am

  • Convener / Facilitator - Nathen Harvey
  • Note taker - John Fitzpatrick

Participants

  • StephenM
  • MandiW
  • Dan
  • AdamJ
  • Andy
  • NathenH
  • StephanD
  • JohnF
  • +Others

Summary of Discussions

Here

Ask me anything

  1. Is there a less lame way to specify an attribute rather than using [foo][bar]=something Checking for a method on a method on a method, and would find a nilClass chef-helpers gem would help, or Seth Vargo's chef sugar

  2. How do I get started w/ empty server & users in Chef Server 12 - there are no admin users in the org

There's a command in chef-server-ctl to allow you to add users chef-server-ctl user-create

knife user create will not work as its an api request that needs authenciated

  1. If using chefdk, whats diff between chef gem install. chef gem install will reset rvm settings (that correct??). chef gem install is safer, as it puts gems in your home directory, so don't need sudo

"chef gem install fails unless I sudo". If you use sudo chef gem install then gems in your home directory are owned by root!

  1. After reading blog post on policy files, will these replace berkshelf. Whats the future of berks? Its not going away! Its up to berkshelf what happens to it in future. They could port berks over policyfiles, but for now there will be both.

How do people manage dependencies without berkshelf? Either they have no dependencies, do it manually, or use librarian.

  1. Is it bad practice to use string interpolation in an attributes file? E.g. if using URL in attribute. If you use roles then its fine. Noah fixed this issue....

  2. Is it possible to get push jobs with chef server 11? It may not work on Chef Server 11, so need to move to 12.

  3. Can chef-client 11 work with chef-server12. Yes, we have backward compatibility.

Cookbooks compatibility is more of an issue. e.g. attribute semantics.

  1. Should we simplify attributes, even though it would break cookbooks - instead of square bracket syntax?

Could have array or dot notation. We make it look like a hash.

There are multiple ways to access attributes - thats confusing. Seems best practice is use [].

  1. Rollbacks. If you have older versions of templates, could you do like knife cookbook rollback (or reset) - should just copy new file into place. There's feature to do this?? Rollback?

  2. Is chef-solo going away? No, but it may become chef zero, so could get databags, roles, search, etc. chef solo is on analytics roadmap. chef-solo == chef-client -z. chef solo wont become chef zero - but other way around!!

  3. Whats best practice for deploying these applications using chef - e.g. use chef to orchestrate deployment, jboss, oracle etc applictions?

Model the system so each component is reponsibible for itself - e.g. jboss server itself makes sure its configured correctly. From a application developer you feel you lost control on timings, but its a good way to work with chef. So manage each server individually, and have tight feedback loops.

Model the server in chef, then use e.g. chef-metal, knife in a bash scripts etc to orchestrate - and have tight feedback loops.

  1. What is Adam's favourite colour. Orange! His daughter's favourite colour is rainbow!

  2. Is there another way to get a tarball onto a server instead of git, svn? Could use deploy resource - write a new svn provider, e.g. to pull in from S3.

Could use a symlink resource.

There's no way to rollback when you use deploy resource. Chef stopped using the deploy resource 6months ago. deploy resource has lots of options, and can be hard to understand.

  1. Chef is a pragmatic solution rather than application problem. Need a pragmatic framework, as chef doesn't know what your architecture looks like. If we're not pragmatic we look like we know more than you do. If all companies deploy the same way, then why is up to each company to decide how to do it. The pragmatic part of chef are the best parts.

  2. Is there a trick to specify minimum version of a package? You'd have to do that yourself - you'd need to inspect the yum cache. Is the current version older than what I have now? Use case: Want to have outside repo for syslog, and always use v7.x. Better to specify the exact version and manage the s/w repository yourself & use package resource.

Uses 'apptly'. When you do a package upgrades it restarts the service, so use package upgrades only if you manage the repository yourself!

  1. When I write a recipe, w/ package resource and package doesn't exist (error 100), I have to apt-get update, should I automatically do apt-get update in my recipe? Maybe if we get error 100, then the resource should automatically do apt-get update!

And should I replicate this for Centos and update yum repo too? No, yum does this automatically. Should apt-get update run automatically? No - too heavy.

  1. What is the best way to debug? chef-shell is good & gives break points. pry is better. breakpoint resource breaks just in chef-shell. Could use test kitchen & chefspec. For beginners, should not need to use pry unless ruby expert.

Debug log gives all the info you need to debug.

What will we do now? What needs to happen next?

Clone this wiki locally