unable to execute an installation (create instance) command - vfabric tcserver

41 views
Skip to first unread message

Sam Rajagopal

unread,
Jan 17, 2014, 9:01:08 PM1/17/14
to puppet...@googlegroups.com, sura...@gmail.com
I have the exec resource defined as follows, to be able to install tcserver using a command line, inside of my init.pp. For some reason, it is not able to execute the install command, when I run puppet agent -t on the agent

 exec { "tomcat-conf":
                path => '/opt/vmware/vfabric-tc-server-standard:/bin:/usr/bin:/sbin:/usr/sbin',
                cwd => "/opt/vmware/vfabric-tc-server-standard",
                command => " '. /etc/profile.d/vimo_envs.sh' /opt/vmware/vfabric-tc-server-standard/tcruntime-instance.sh create --instance-directory=/opt/apps/stage/tcserver/mshix-stg --java-home=/opt/apps/stage/Java/jdk1.6.0_45 tcserver_app",
                timeout => 0,
                logoutput => 'true',
                subscribe => File["/etc/profile.d/vimo_envs.sh"],
                refreshonly => true,

}

JAVA_HOME=/opt/apps/stage/Java/jdk1.6.0_45 is provided by /etc/profile.d/vimo_envs.sh, and required at the time of creating tc server instance.

When I invoke puppet agent, it is able to create an empty directory /opt/apps/stage/tcserver/mshix-stg. But nothing else. 
There are no sub-directories containing the conf/ bin/ . I don't get a complete configuration

I can run the tcruntime-instance.sh from command line successfully but not from within puppet.
Any suggestions ? thanks

jcbollinger

unread,
Jan 21, 2014, 10:15:50 AM1/21/14
to puppet...@googlegroups.com

First, it looks like you want

  provider => 'shell'

in your command.  Second, it looks like you want a semicolon in the command, after '. /etc/profile.d/vimo_envs.sh'.  Third, having switched to the "shell" provider you will probably need to remove the internal single quotes.

As it is now, I think your environment setup script is being run as the command, with the real command passed to it as an argument.


John

jcbollinger

unread,
Jan 21, 2014, 10:17:26 AM1/21/14
to puppet...@googlegroups.com


On Tuesday, January 21, 2014 9:15:50 AM UTC-6, jcbollinger wrote:
First, it looks like you want

  provider => 'shell'

in your command.


Sloppy.  I meant you want to add that to the parameters of your Exec.  Sorry for any confusion.


John

Reply all
Reply to author
Forward
0 new messages