Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternatives to Chef/Fabric/Puppet for Simple LAMP Development?

I've finally committed to really learning the software design process correctly in order to advance my skills and grow my business. This means embracing version control (git), setting up a development-staging-production environment and keeping these environments as similarly configured as possible.

I'm getting really caught up with the last step, in picking a solution to automate and sync my server settings. I've looked into Chef, Puppet & Fabric, but for my purposes they all seem overly complex. I am:

  • Developing a small web app on a single server
  • Will be developing in a LAMP environment with intermediate PHP & UNIX skills
  • Won't be heavily modifying environmental variables (primarily php.ini, apache configs)

I would appreciate any recommendations on solutions that would be easier to implement than mastering the complex Chef environment or learning Python to use Fabric. I can do this if necessary, but am hoping there is a more basic / elegant solution given my very simplistic needs.

like image 721
youderian Avatar asked Jul 28 '11 08:07

youderian


People also ask

Why Ansible is better than Chef and Puppet?

When it comes to ease of setup and installation, Ansible dominates the other two tools, Chef and Puppet, as it has an 'agentless' architecture. Chef and Puppet follow master-agent or master-slave architecture.

What is the difference between Chef Puppet and Ansible?

Chef – Chef Server works only on Linux/Unix but Chef Client and Workstation can be on windows as well. Puppet – Puppet Master works only on Linux/Unix but Puppet Agent also works on windows. Ansible – Ansible supports windows machines as well but the Ansible server has to be on Linux/Unix machine.

What is better Chef or Puppet?

To use an analogy, using Puppet is like writing configuration files whereas using Chef is like programming the control of your nodes. If you or your team have more experience with system administration, you may prefer Puppet. On the other hand, if most of you are developers, Chef might be a better fit.

What is the difference between Chef and terraform?

Your servers may come from AWS, your DNS may come from CloudFlare, and your database may come from Heroku. Terraform will build all these resources across all these providers in parallel. Chef and Terraform are primarily classified as "Server Configuration and Automation" and "Infrastructure Build" tools respectively.


2 Answers

In the company I work for, where we have more or less the same needs, we just setup a couple of bash script.

Basically it sets up the git repo (local, and distant bare), install apache2 and PHP5 (and some php extensions), configure the apache's vhost, php.ini, install frameworks and bootstrap project if needed (for us it's symfony).

We have another script, that fire some EC2 instance, run the previously mentionned script, launch the test suite, and download the report of these scripts.

Chef & Puppet works well, but it's a little overkill, unless you have many projects that runs in the same time.

Edit :

If you want to run a script after commiting/pushing (like deploy to staging/pre-production server, launching your continuous integration build, etc), there's a way to do this using git call post-hook, see Deploy a project using Git push

like image 169
Clement Herreman Avatar answered Nov 15 '22 19:11

Clement Herreman


I'd strongly recommend having a look at Ansible for this purpose.

It is a full solution, which means it can handle configuration management, deployment and so forth. However, it is far easier to learn in my experience than Chef or Puppet as you can start by doing basic shell command execution and move on from there.

There's no need to learn a new language; all the configuration and specification you would be doing is done in YAML, which is just structured text.

Overall, Ansible will give you much of what Chef or Puppet will at your level and hopefully you will find it more straightforward to get started with.

like image 20
somewhatoff Avatar answered Nov 15 '22 18:11

somewhatoff