If it uses RabbitMQ, I'd very very strongly advise that you just use the puppetlabs-rabbitmq module to configure the rabbitmq portion.

-Jason

On 02/05/2014 02:27 PM, D C wrote:
The application does use rabbitmq which is the cause for my woes.

The chaining arrows will work to enforce the order, but it doesn't help with the onlyif portion...
Class['myapp::phase1'] only if [ ! -e /path/to/puppet.phase ]


The alternative which I was trying to avoid was to go and dig through every item in each of the classes. For some items i will have to add an only if. Others will be just fine by using the regular before and require. This should work but now I have to consider a bunch of test scenarios.


I'll take a look at that rabbit class to see what they did



Thanks,
Dan


On Wed, Feb 5, 2014 at 12:32 PM, Jason Antman <ja...@jasonantman.com <mailto:ja...@jasonantman.com>> wrote:

    On 02/05/2014 08:57 AM, dc12...@gmail.com
    <mailto:dc12...@gmail.com> wrote:
    > Thanks, I will take a look at that post.
    > I haven't been able to find the "proper" way to do some of these
    things.
    >
    > Initially I had this running as a single class,  working only with
    > requires, before, and notify.
    >
    >  This is where I ran into trouble,   maybe you know of an alternate
    > way to achieve this.
    >
    > During my initial setup,  I start with a simple package, file
    service
    > relationship.
    > Next i need to add some users into the service which was just added.
    > For this, the service needs to be running   (ensure => running).
    >
    > However,  after that initial installation is done.  I want the admin
    > to have the ability to stop the service, without worrying that
    puppet
    > is going to turn it back on.
    > So i got rid of ensure=>running,  and instead used an Exec[]
    > (refreshonly) to start my service.  The Package notifies the exec
    This is a common problem. It's been the problem with what I call "old
    world" thinking every time I've done a new Puppet deployment at a shop
    that isn't used to doing things in a sane, infrastructure-as-code way.
    Why do you want to stop a service that should be running? Either the
    service should be running, or it shouldn't.

    If there's an emergency, the admin should either (a) complete
    their work
    in < a puppet run interval, or (b) `puppet agent --disable` (which
    ideally also throws some monitoring alerts) and stop the service. The
    way I've generally approached this problem is by finding out under
    what
    conditions an admin would have to stop the service, and teaching
    puppet
    to handle them. That being said, I can't say I can think of many
    services I have that I actually *want* stopped, ever.
    >
    > Now to add users.
    > I cannot "require" the Exec, because that only happens if after the
    > RPM is installed
    >
    > I keep running into cases where if I fix A, then B  breaks.  If
    i fix
    > B, then C breaks.  if I fix C then A breaks again..
    > This is why I broke it into phases.
    So I'll admit that, especially with proprietary software, it can
    be very
    difficult to shoehorn broken installation processes into a sane
    framework (Puppet).

    On a side note, the process you're talking about is strikingly similar
    to how one goes about installing and setting up RabbitMQ (at least
    1.x)
    - install the RPM, start the service, but then to add users you
    need to
    have the admin plugin, and to make that active you need to restart the
    service. It's entirely possible to do though - you might benefit from
    some of the patterns used in
    https://github.com/puppetlabs/puppetlabs-rabbitmq
    >
    >
    >
    >
    > --
    > 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+unsubscr...@googlegroups.com
    <mailto:puppet-users%2bunsubscr...@googlegroups.com>.
    > To view this discussion on the web visit
    >
    
https://groups.google.com/d/msgid/puppet-users/896ed69c-06d9-424e-b218-a0c117233196%40googlegroups.com.
    > For more options, visit https://groups.google.com/groups/opt_out.


    --
    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+unsubscr...@googlegroups.com
    <mailto:puppet-users%2bunsubscr...@googlegroups.com>.
    To view this discussion on the web visit
    
https://groups.google.com/d/msgid/puppet-users/52F275CA.9090107%40jasonantman.com.
    For more options, visit https://groups.google.com/groups/opt_out.


--
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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CACErCdU95qbbftEHEEGLJaohEEQiPEceLukr4aBjuP-OvoGkDA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/52F383D2.2070801%40jasonantman.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to