The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Chef cookbook for easyapache builds

Discussion in 'EasyApache' started by bobloblaw, Jun 20, 2012.

  1. bobloblaw

    bobloblaw Registered

    Joined:
    Jun 20, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Hey all,

    I haven't come across any posts regarding people using Chef for configuration management, which I find a little surprising as infrastructure continues to grow. At this time we have about 29 cPanel servers. In order to manage these more efficiently we've implemented Chef (Chef | Opscode) for various tasks. One such task is to handle the easyapache builds via a Master .yaml file. For instance, in order to upgrade to the latest version of PHP, we update our .yaml file under version control on our Chef-server and push this out via Chef-client to all nodes.

    This is a community contribution, so feel free to submit requests for new features. Hopefully there is someone out there using Chef, or at least looking into it. The links for the project are below!

    https://github.com/derekschultz/easyapache
    Chef Cookbook: easyapache - Opscode Community

    [HR][/HR]
    Derek
    Linux Administrator
     
    #1 bobloblaw, Jun 20, 2012
    Last edited: Jun 20, 2012
  2. bobloblaw

    bobloblaw Registered

    Joined:
    Jun 20, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    In addition, I am looking into controlling /var/cpanel/cpanel.config to serve as a master template file for all servers in our environment. From an infrastructure view, all servers/nodes are required to have the same basic config. This is where Chef comes in for configuration management, allowing us to deploy this master template out to all servers, thereby taking away the tedious tasks of manually updating everything.

    The question being: suppose this master config file is in its current state, and a cPanel update comes around. What is the probability of this file being overwritten on the server (e.g. new options added)? In that case, we should see that the file has changed by doing a diff on the cPanel server and the Chef server. Well, we can then update the master config with what has been pushed out via the upgrade and continue on without issue.

    This also extends to various other configuration files:
    httpd.conf - we need to ensure certain attributes are set (TraceEnable, ServerTokens, FileETag)
    exim.conf - custom configurations
    pure-ftpd.conf - ensure anonymous FTP has not been re-enabled
    etc...

    It appears the cpanel.config is probably the safest to manage. It gets pushed out, and we issue a restart of cPanel services, right? What about other attributes in these conf files? Can they be successfully managed without WHM -> Tweak Settings, or Service Configuration for Apache and FTP?
    [HR][/HR]
    Derek
    Linux Administrator
     
    #2 bobloblaw, Jun 21, 2012
    Last edited: Jun 21, 2012

Share This Page