How can i pass runtime parameters while installing .bin file in puppet?

408 views
Skip to first unread message

lalit jangra

unread,
Jan 7, 2013, 1:40:44 AM1/7/13
to puppet...@googlegroups.com
Hi,

I have alfresco .bin installer file for linux distribution which i want to automate using puppet. While installing alfresco on linux ,usually i need to provide a number of parameters such as java_home, db home, alfresco home or tomcat port etc.

Now i want to install same .bin installer using puppet but not getting how can i provide same runtime argument in puppet installation. Can anybody help?

Regards.

Garrett Honeycutt

unread,
Jan 7, 2013, 1:54:40 AM1/7/13
to puppet...@googlegroups.com
Check out the type reference for the exec resource[1]. Does this example
help?

exec { 'alfresco_installer':
command => "/tmp/alfresco_installer.bin $alfresco_args",
environment => ['JAVA_HOME=/opt/java','TOMCAT_PORT=8080'],
creates => '/usr/bin/alfresco',
}

These type of installers are no fun. You might want to side step this
issue by turning alfresco into a package with FPM[2] and then use the
package{} resource.

[1] - http://docs.puppetlabs.com/references/stable/type.html#exec
[2] - https://github.com/jordansissel/fpm/

Cheers,
-g

--
Garrett Honeycutt

206.414.8658
http://puppetlabs.com

lalit jangra

unread,
Jan 7, 2013, 3:31:22 AM1/7/13
to puppet...@googlegroups.com
Thanks a lot Garrett,

When i am installing alfresco using ./alfresco-installaer.bin, i am being asked about a number of options on command line such as below:
1. Do you want to install java?[y/n]
2.Do you want to install postgres?[y/n]
3... so on.

I want to provide all these kinds of inputs using puppet. Is it possible?

Regards.

jcbollinger

unread,
Jan 7, 2013, 9:11:33 AM1/7/13
to puppet...@googlegroups.com


You should consider packaging up the software for your hosts' native package management system(s), and managing it that way.

You should also look at the installer docs (or try "alfresco_installer.bin --help") to see whether it accepts any options to replace / suppress the interactive queries.

If you have no alternative to making Puppet issue responses to the queries, then you'll need to rely on I/O redirection.  Either pipe the responses into the installer, or write a response file on the client and redirect the installer's standard input to be from that file.  Make sure you're using the "sh" provider for the Exec in this case.


John

Keiran Sweet

unread,
Jan 7, 2013, 9:39:52 AM1/7/13
to puppet...@googlegroups.com
Hi,
Another vote from me for packaging this software, Puppet likes packages and deals with them well.

John mentioned FPM, If you haven't checked it out, I can't recommend it enough.
I manage quite a few packages internally in my role, and FPM has shaved huge amounts of time off generating them.

Really a great tool.

K
Reply all
Reply to author
Forward
0 new messages