enforce db creation on separate db node with module for app deployment

asked 2016-01-17 08:36:54 -0500

teleivo gravatar image

Dear community!

I wrote module https://github.com/teleivo/puppet-dcm... to deploy a java/jboss application. This application comes only as tarball with a db creation script. Until now I have deployed the application and database on the same node. Now I want to split it up into a db and app node.

I realized that the mysql define which I use in my module to create the db:

  mysql::db { $dcm4chee::db_name:
    user     => $dcm4chee::db_owner,
    password => $dcm4chee::db_owner_password,
    host     => $dcm4chee::db_host,
    grant    => ['ALL'],
    sql      => "${dcm4chee::sql_path}/create.mysql",
    require  => File[$dcm4chee::home_path],

has to be applied on the db node. My question is, how can I solve this in my module?

I am using roles and profiles with a puppet control repository but no puppet master/no puppetdb.

Would virtual resources be of any help https://docs.puppetlabs.com/guides/vi... ?

Thanks in advance for any pointers :)

edit retag flag offensive close merge delete