- From: Adam Jacob <
>
- To:
- Subject: [chef] Re: Re: Re: re-opening resources at run-time
- Date: Mon, 5 Mar 2012 11:23:09 -0800
- Authentication-results: mr.google.com; spf=pass (google.com: domain of
designates 10.52.34.4 as permitted sender)
r = resouces(:template, "jira")
r.whatever(new stuff)
Adam
On Sun, Mar 4, 2012 at 11:51 AM, Bryan Berry
<
>
wrote:
>
one option is to create a new lwrp tomcat_svc that would do something
>
similar
>
>
tomcat_svc "jira" do
>
subscribes :restart, (resources => [ template1, template2, templaten ]
>
action :start
>
end
>
>
this lwrp would require the original tomcat lwrp to keep a list of config
>
resources it creates. then the tomcat_svc interrogates the tomcat resource
>
for its config files and subscribes to them.
>
>
this blog post has thrown me for a loop and making me rethink everything
>
http://blog.nistu.de/2012/03/04/reusability-in-configuration-management-systems/
>
>
>
On Sun, Mar 4, 2012 at 6:27 PM, Bryan Berry
>
<
>
>
wrote:
>
>
>
> I can't because I have to have all of those templates in place before
>
> starting tomcat for the first time
>
>
>
>
>
> On Sun, Mar 4, 2012 at 6:24 PM, Brian Akins
>
> <
>
>
> wrote:
>
>>
>
>>
>
>> On Mar 4, 2012, at 6:29 AM, Bryan Berry wrote:
>
>>
>
>> >
>
>> >
>
>> > run_time "tomcat[jira]" do
>
>> >
>
>> >
>
>> > subscribes :restart, resources(templates => ['jdbc configuration',
>
>> > 'jira properties'] ), :immediately
>
>> >
>
>> >
>
>> > action :start
>
>> >
>
>> >
>
>> > end
>
>> >
>
>>
>
>> Can you just use notifies for those templates?
>
>>
>
>> Like:
>
>>
>
>>
>
>> file "jira properties" do path
>
>> "#{t.base}/webapps/jira/WEB-INF/classes/jira-application.properties"
>
>> content <<-EOS
>
>>
>
>> # generated by Chef, don't touch!
>
>>
>
>>
>
>> jira.home = /home/jira
>
>>
>
>>
>
>> EOS
>
>>
>
>> notifies :restart, "tomcat[jira]", :immediately
>
>>
>
>> owner jira_user
>
>>
>
>> end
>
>
>
>
>
--
Opscode, Inc.
Adam Jacob, Chief Customer Officer
T: (206) 619-7151 E:
Archive powered by MHonArc 2.6.16.