Hi , I am a new puppet user. As i am not used yet to ruby and puppet I''ve decided to use the puppi module to deploy web applications in my company. I ve created some specific define , scripts etc and I saw recently that it was possible to pass options in command line . seen from example42 site : "*puppi deploy myapp -i -o "version=1.1 source_url=** http://dev.example42.com/code/my_app*/<http://dev.example42.com/code/my_app/">": Deploys myapp in interactive mode and sets some custom options that override the standard Puppet params. Note that these parameters change according to the script you use (and the scripts must honour this override)." I think it would be a good idea to allow operators to launch custom puppi deploy commands on demand .. But .. But i didn''t succeed to override my project define parameters . Would it be possible for someone ( Alessandro for instance ;) ) to give me an example of a good use of theses parameters and what i have to modify to retrieve them ?? Another question : Is it possible to embeed puppi calls directly in a rb script ?? For example , rather than executing puppi via shell, i''d like to include my puppi define and call it like this ( sorry for the syntax, i am not ruby compliant for the moment :) , but you get the idea, I hope ) mypuppiwrapper.rb include puppi:project:war:myapp puppi:project:war:myapp deploy Hope you understand me ! Thank you a lot ! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Alessandro Franceschi
2013-Jul-02 11:11 UTC
[Puppet Users] Re: Puppi parameters in command line
Hi Il giorno mercoledì 26 giugno 2013 00:29:26 UTC+2, NewUser5 ha scritto:> > Hi , > I am a new puppet user. As i am not used yet to ruby and puppet I''ve > decided to use the puppi module to deploy web applications in my company. > I ve created some specific define , scripts etc and I saw recently that > it was possible to pass options in command line . > > seen from example42 site : > > "*puppi deploy myapp -i -o "version=1.1 source_url=** > http://dev.example42.com/code/my_app*/<http://dev.example42.com/code/my_app/">": > Deploys myapp in interactive mode and sets some custom options that > override the standard Puppet params. > Note that these parameters change according to the script you use (and the > scripts must honour this override)." > > I think it would be a good idea to allow operators to launch custom puppi > deploy commands on demand .. But .. > > > But i didn''t succeed to override my project define parameters . > > Would it be possible for someone ( Alessandro for instance ;) ) to give > me an example of a good use of theses parameters and what i have to modify > to retrieve them ?? >Can you post the content of your puppi define and the parameters you want to override? Override via the command line is strictly related to the puppi::project::* define you use and the parameter you want to override on the cli.> > Another question : > > Is it possible to embeed puppi calls directly in a rb script ?? For > example , rather than executing puppi via shell, i''d like to include my > puppi define and call it like this ( sorry for the syntax, i am not ruby > compliant for the moment :) , but you get the idea, I hope ) > > mypuppiwrapper.rb > include puppi:project:war:myapp > > puppi:project:war:myapp deploy > > > Hope you understand me ! >Uhm, you can easily wrap the puppi shell command you have to run on the CLI. But note that the examples you gave are somehow confusing as they refer to Puppet code you write in Puppet manifests, so I don''t see how you can wrap them in a ruby script. You can eventually make a script that executes a puppet apply of a Puppet class where you have the declaration of a puppi::project define and then, after the Puppet run that creates the puppi environment, you execute the puppi command on the system, based on that environment. But I''m not sure you were talking about something like this. al -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.