launch / shutdown a whole application

Hi,

we have a huge application consisting of several components (Apache, Tomcat, Weblogic, …Database)

To shutdown the system properly we want to follow a sequence starting at the “top” (Apache) down to the backend (Database)
For launching the system we do the reverse order - starting at the database and the UI (or interfaces) will be the last components launched.

For each component we have separate deployment playbooks with tags “stop” and “start”.

Do i have to create 2 playbooks for the launch/shutdown than like?

shutdown.yml

  • include “apache.yml”
  • include “tomcat.yml”
  • include “servers.yml”
  • include “databaseyml”

and anotherone like

  • include “databaseyml”
  • include “servers.yml”
  • include “tomcat.yml”
  • include “apache.yml”

Or is there any option to have only one playbook where I can toggle the order of the included playbooks?

Thanx for any ideas,

Torsten

I would not use multipurpose roles with modes here, because including something that requires a parameter to be in shutdown or startup mode is probably weird.

I’d probably keep it simple and have a seperate role for “shutdown” or if you really thought it needed to be split up “shutdown_foo” and “shutdown_bar”, etc.

Ok,

I agree with you.
Its than shutdown.yml and startup.yml playbooks with same includes but different order.

Regards, Torsten