The power of juju, and its model driven approach to deployments is undoubtedly the relationships. Being able to specify what services you depend on and what you provide to other services is extremely powerful.
To get all of those benefits you need to write your app as a charm. With the new layering approach (http://blog.dasroot.net/2015-charming-2-point-oh.html) this has got even easier. There will be more posts about that coming soon.
But I’ve always pondered the following:
Is there a useful shortcut around writing a charm that would let you deploy your app in < 5 minutes
My idea was the remote-deployer charm (https://jujucharms.com/u/mattyw/remote-deployer/trusty/2)
It doesn’t replace writing your own charm, indeed the cases in which it’s useful are limited. (you must have a publicly available file path that you want to deploy from) The intention is to facilitate playing with juju in less time than the typical tea break.
The idea goes:
- Deploy the charm
- Give it something to do
1 2 |
|
The something to do is just pointing it at some remote file tree (like a github url). It downloads this file tree and looks for a file called remote-deployer. It runs this as the ubuntu user. The example above installs the clojure build tool lein and creates a hello world web app (https://github.com/mattyw/compojure-app-bootstrap)
1 2 3 4 5 6 7 8 |
|
Juju fans will notice that the normal hook tools are available to you in this file.
If you’d like to suggest or help make improvements the project is here: https://github.com/mattyw/remote-deployer-charm
Take a look at in action: