# Deploying code/applications (off topic)

**URL:** <https://forum.ansible.com/t/deploying-code-applications-off-topic/11940>\
**Category:** Ansible Project\
**Created:** [September 28, 2012, 8:29pm UTC](https://forum.ansible.com/t/deploying-code-applications-off-topic/11940 "2012-09-28T20:29:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![James8](https://avatars.discourse-cdn.com/v4/letter/j/ec9cab/32.png) [@James8](https://forum.ansible.com/u/James8)\
**Post date:** [September 28, 2012, 8:29pm UTC](https://forum.ansible.com/t/deploying-code-applications-off-topic/11940/1 "2012-09-28T20:29:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [September 28, 2012, 8:52pm UTC](https://forum.ansible.com/t/deploying-code-applications-off-topic/11940/2 "2012-09-28T20:52:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jpmens1](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jpmens1](https://forum.ansible.com/u/jpmens1)\
**Post date:** [September 28, 2012, 10:01pm UTC](https://forum.ansible.com/t/deploying-code-applications-off-topic/11940/3 "2012-09-28T22:01:31Z")

</div>

> 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).

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-JP

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

---

<div class="post-metadata">

**Author:** ![Dag\_Wieers](https://avatars.discourse-cdn.com/v4/letter/d/45deac/32.png) [@Dag\_Wieers](https://forum.ansible.com/u/Dag_Wieers)\
**Post date:** [September 28, 2012, 11:35pm UTC](https://forum.ansible.com/t/deploying-code-applications-off-topic/11940/4 "2012-09-28T23:35:28Z")

</div>

Making RPMs is easy and fun ! 😉

---

<div class="post-metadata">

**Author:** ![jpmens1](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jpmens1](https://forum.ansible.com/u/jpmens1)\
**Post date:** [September 28, 2012, 11:56pm UTC](https://forum.ansible.com/t/deploying-code-applications-off-topic/11940/5 "2012-09-28T23:56:57Z")

</div>

> Making RPMs is easy and fun ! 😉

Yessir, Mr. RPM, but not for me 😉

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-JP

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [September 29, 2012, 12:10am UTC](https://forum.ansible.com/t/deploying-code-applications-off-topic/11940/6 "2012-09-29T00:10:55Z")

</div>

I know someone here built a famous rpm site even!

-- Michael

---

<div class="post-metadata">

**Author:** ![Sam\_Freiberg](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Sam\_Freiberg](https://forum.ansible.com/u/Sam_Freiberg)\
**Post date:** [September 29, 2012, 1:06am UTC](https://forum.ansible.com/t/deploying-code-applications-off-topic/11940/7 "2012-09-29T01:06:49Z")

</div>

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

[https://github.com/jordansissel/fpm](https://github.com/jordansissel/fpm)

Sam

---

<div class="post-metadata">

**Author:** ![Stephen\_Major](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@Stephen\_Major](https://forum.ansible.com/u/Stephen_Major)\
**Post date:** [September 29, 2012, 1:43am UTC](https://forum.ansible.com/t/deploying-code-applications-off-topic/11940/8 "2012-09-29T01:43:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![James8](https://avatars.discourse-cdn.com/v4/letter/j/ec9cab/32.png) [@James8](https://forum.ansible.com/u/James8)\
**Post date:** [September 29, 2012, 3:00am UTC](https://forum.ansible.com/t/deploying-code-applications-off-topic/11940/9 "2012-09-29T03:00:31Z")

</div>

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
