I am exploring the possibility to deploy our applications infrastructure using Juju.
My application are built using the Play Framework and run on the Java Virtual Machine. I envision the following setup:
- Proxy server for SSL offloading (maybe redundant if that is not too hard)
- Primary node running application and JVM
- Secondary node (hot spare) running application and JVM
The proxy server should only use the secondary node if the primary node is down. There should be only a single application node receiving requests. Scaling horizontally is something we do not need and it complicates business logic.
The above setup seems fairly doable. It becomes (in my mind) more complicated when I think about the continuous deployment part.
My applications are built with a private Jenkins machine and result in a zip file containing the application (as a runnable bash script) with all of it's dependencies.
The following steps should be taken to deploy it:
- Send the zip to a server
- Deploy a new proxy, primary and secondary node with the application
- Switch to the new proxy
I want to create a charm for this, but I am not sure how to proceed.
Is it possible to deploy a charm bundle from within a charm? If so, how?
Note that any advice is welcome. I do not need concrete implementations, just pointers and general directions.