Hi All,
I’m new to this list and to ansible as well, so I’d like to apologize beforehand if the question is malformed or if it should be asked in another place.
Any help is greatly appreciated.
We use the following architecture for our in-house built java web applications:
-
Tomcat a on Ubuntu server 1
/
Varnish Cache (http) - > HAProxy
^
Nginx (https) - > Tomcat a on Ubuntu server 2
There are over a hundred .war applications distributed over about a dozen tomcat instance listening on different ports. The war applications are updated frequently. (They are built on another server with Jenkins/Maven). There are development, staging, and production environments.
I want to use ansible to perform the following tasks (after some basic stuff like adding users, setting up ntp, dns, etc):
- add repos to ubuntu, install nginx, varnish, haproxy, tomcat instances
- add .war applications to tomcat (we actually extract them into directories)
- create each tomcat server.xml with its definitions for port, logging, etc, and application resource requirements (datasources, mostly)
- configure varnish to forward requests to appropriate haproxy frontend based on application context name
- define haproxy frontends and backends
- deploy newer versions of application .war files without service interruption (stop tomcat a on server 1, extract war file, start tomcat a on server 1, stop tomcat on server 2…)
- update software components (nginx, varnish, haproxy, tomcat instances)
We also have deployed other open source software on top of tomcat that usually have different requirements, for instance, Nuxeo (nuxeo.com), Liferay (liferay.com), and DSpace (dspace.org). So, a reusable tomcat role would be great.
We are also responsible for a Plone CMS installation (plone.org) that follows the same basic architecture, but zope application servers are deployed using buildout.
My intention is to layout our ansible directory like this: