[chef] Re: Re: Organizing cookbooks in a logical way


Chronological Thread 
  • From: Joseph Djomeda < >
  • To:
  • Subject: [chef] Re: Re: Organizing cookbooks in a logical way
  • Date: Wed, 05 Aug 2015 15:38:24 +0000

Hello All,

Thanks for providing responses. To be honest the role bit highlighted by Fabien gets me really nervous because I am very very new to this.

I would like to have some insight in use case expressed below

Now for a cluster of tomcat like say 10 nodes, I find it a bit difficult bootstraping them one of the other. Is there any bulk bootstraping (:D I am being lazy here) for :
a) nodes with same recipes
b) nodes with mixed recipes



I would also want to ask whether chef can handle incremental deployment of say java web app running in 10 nodes by taking them down 2 after the other just like how "serials" works in ansible.

Best Regards,


On Wed, Aug 5, 2015 at 2:17 PM Nico Kadel-Garcia < "> > wrote:
Write roles, I think.
Hello Gurus,

I have an issue which seems to be a blocker for me in my progress with Chef to effectively move to production. The issue is that I started Ansible before Chef therefore my only reference tends to be based on Ansible.

It looks more natural to me writing a playbook with different host names while having those host names in some inventory file. So looks easy to provision lots of nodes to me. That concept of role in chef is not so clear to me .

For example I can write some roles in Ansible with options which are boolean variable to switch between using apache as simple html hosting, for php virtual host , for reverse proxy using http or ajp etc.So everything is pretty much is maintained at the playbook level which gets checked in VCS. I am not too sure how to achieve that in chef. I am not trying to say one is better than the either, I am just saying I would like to know how to organize my own cookbooks .


As devops almost every week, depending on requirement, I use either nginx or apache to deploy:

wordpress site
joomla site
java reverse proxy using (ajp for apache or http for nginx)

These are all on ubuntu linux which needs some hardening for production (By the way I need a book to achieve this, any link would be greatly appreaciated ;) ). So for web project A I will need building block like

- recipe[linux_security]
- recipe[nginx | apache2]
- recipe[wordpress | joomla]

So the real question is if this is a project A, so I should create a cookbook A which will use the the listed cookbooks above. Now project B is for client B and will need the same stack should this differentiation be at attributes level or cookbook level?

What is the recommended way to use attributes with chef-server? especially while bootstraping.

How to use the role in practice? For example where to map that nodes a.servers.com b.servers.com, c.servers.com are all linux, web server/nginx ?


Thanks for reading this.

Best Regards,



--
Joseph Kodjo-Kuma Djomeda
check out my pains at : www.mycodingpains.com
We become what we think about ourselves........
--
Joseph Kodjo-Kuma Djomeda
check out my pains at : www.mycodingpains.com
We become what we think about ourselves........



Archive powered by MHonArc 2.6.16.

§