Deploying code/applications (off topic)

Hi,
As I push for more people to use Ansible at my office, I'm wondering
do you compile code on each one of your servers or do you create RPMs
or other installation packages?

For instance when we bring up a datacenter now, I can run 95% of
configuration of our NoSQL database servers in less then 10 minutes,
before it was about 3 or 4 hours due to interruptions.

Now we are taking on the deployment of webservers. When we deploy a
new datacenter of webservers we deploy about 50 at a time.

For our webservers we compile:

PHP and a bunch of modules
GeoIP
lhttpd
and a few other packages.

How do you deal with this in your environment? Do you compile on each
machine, or do you create installation packages?

Thanks,
James

Personal beliefs -- nobody should be doing compilation on your
production machines.

This is not Ansible specific advice, it's just a recipe for trouble
IMHO and you have to sort out missing dependencies and lots of things.

Maintaining a local yum or apt mirror is a GREAT idea, and that way
you are also pinning down particular versions of software you use to
make repeated deployments predictable.

I'd also encourage folks to do testing in a stage environment first
that closely mirrors production.

I'd strongly encourage everyone to use distribution packaging and
learn to make RPMs and Deb files as appropriate if you need compiled
code.

If you are just deploying a Rails/Python/Perl/etc app using the git
module is not such a bad thing.

--Michael

I'd strongly encourage everyone to use distribution packaging and
learn to make RPMs and Deb files as appropriate if you need compiled
code.

Making RPMs is a pain (I don't know about Debs). If you really enjoy
writing .spec files and running rpmbuild, then that's fine. What I can
highly recommend if you don't is fpm [1] which makes it very easy to
create RPM and DEB packages (and other things).

        -JP

[1] https://github.com/jordansissel/fpm/wiki

Making RPMs is easy and fun ! :wink:

Making RPMs is easy and fun ! :wink:

Yessir, Mr. RPM, but not for me :wink:

        -JP

I know someone here built a famous rpm site even!

-- Michael

FPM takes a lot of the pain out of creating rpm and deb packages.

https://github.com/jordansissel/fpm

Sam

awesome… I have always hated building rpms so I just skip the B.S and compile from sources with shell scripts… but this makes for some quicker deployments. Thanks for the FPM headsup.

Thanks guys!
I total agree with this:

"Personal beliefs -- nobody should be doing compilation on your
production machines."

Also thanks for the FPM recommendation, I hadn't heard of it!

James