Automated installation scripts?

325 views
Skip to first unread message

Nathaniel Bibler

unread,
Jul 18, 2008, 11:12:57 AM7/18/08
to Phusion Passenger Discussions
I was curious if there were any automated (hands-free) installation
scripts available in the 2.0 package.

The general instructions appear to be:
1) Install from either gem or source, and
2) Run passenger-install-apache2-module.

That install script requires human interaction in a few locations (Hit
Enter to Continue), even if everything is going well. Is there a way
to disable those prompts? I scanned through the source and couldn't
find any useful, and by useful I think I really mean 'any at all,'
command-line flags. If there is not a way to disable the prompts,
then I'm curious as to if there is any other developer interest in a
hands-free, automated deployment script besides mine?

Nate

Igal Koshevoy

unread,
Jul 18, 2008, 11:43:36 AM7/18/08
to phusion-...@googlegroups.com
It'd be nice if Passenger accepted an option so that it could do an
automatic install, just like Ruby Enterprise Edition's --auto option.

I do hands-free installs of Passenger using AutomateIt and this recipe:

http://pastie.org/236528

The code that bypasses the prompts is:

yes | passenger-install-apache2-module

Not pretty, but works because the prompts don't require any actual input.

-igal

Hongli Lai

unread,
Jul 18, 2008, 11:52:32 AM7/18/08
to phusion-...@googlegroups.com

There are 2 ways to do this:
- Run 'rake apache2' in the Passenger source folder.
- Run 'yes | passenger-install-apache2-module' as Igal suggested.

Actually, the only thing passenger-install-apache2-module does is
checking whether you have all dependencies, running 'rake apache2' and
printing out some config snippets. It doesn't actually install anything,
despite what the name implies. 'rake apache2' is the official way to
non-interactively build the Apache 2 module, and will continue to be for
the foreseeable future.

The only reason why passenger-install-apache2-module asks for user input
is to let the user read what's on screen. It doesn't ask any questions.
So adding a non-interactive option to passenger-install-apache2-module
should be very easy. I'd gladly accept any patches for this.

Regards,
Hongli Lai
--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

Mitchell Hashimoto

unread,
Jul 21, 2008, 4:01:08 PM7/21/08
to Phusion Passenger Discussions
Hello Nathaniel,

I actually created a sprinkle package (http://github.com/mitchellh/
sprinkle/tree/master) to automatically install both phusion passenger
and ruby enterprise edition onto a debian-based linux box. It can very
easily be adapted to other flavors of linux but if you're interested I
have a screencast up actually outlining deploying a rails app and it
uses the automated scripts to set up the server. You can view the
screencast at my website:

http://mitchellhashimoto.com

It should be the most recent post made. If you have any questions I'd
be glad to help you out.

Mitchell Hashimoto
> E-mail: i...@phusion.nl
Reply all
Reply to author
Forward
0 new messages