Hi there,

I have a use case where we currently manage a  web server, and an app. Now 
this similar to deploying tomcat and a webapp or apache and a php app. Both 
the server and the app subscribe to the Package/File/Service pattern 
however I seem to have hit a problem managing the service (requiring the 
web server service to restart when the app config files changes). 

This is the structure of the mdule (to manage the server & app as a defined 
type):

.

 

├── app 

│   ├── config.pp 

│   ├── install.pp 

│   ├── manage_credentials.pp (defined type)

│   └── params.pp 

├── app.pp (defined type)

├── config.pp 

├── init.pp 

├── install.pp 

├── params.pp 

└── service.pp




I've setup the web server in a typical Package/File/Service style and 
perhaps its also worth noting that in the manifest/config.pp file I notify 
Class['web_server::service'] 
for each file change.




In the app.pp defined type I have the following:


define web_server::app(
  $package_name,
  $repo_name,
  $package_version,
  $credentials
) {

   include web_server

    class{'web_server::app::install':

      package_name     => $package_name,
      repo_name        => $repo_name,
      package_version  => $package_version,
    } ->

    class { 'web_server::app::config': 
      credentials => $credentials, 
    } 

    contain ::web_server::app::install
    contain ::web_server::app::config

}



Inside the server::app::config file i have a few  Class['web_server::service'] 
notify statements to restart the service on app file changes. However this 
is causing dependency cycle errors.



Any idea where I'm going wrong with this? How do you generally manage this 
type of scenario? I looked at the apache forge module and it seems to be 
littered with Class['apache::service'] notify statements within 
classes/subclasses - what am I missing here?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/fa696b73-ed40-49a7-9c0e-a586d55b6ada%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to