Description
Hi! I'm trying to use control to deploy some stuff to Amazon AWS.
It's basically working ok, but I'm running into some problems trying to use libraries inside of the control.clj file. Specifically, I'd like to be able to import amazonica and take some running servers out of rotation on the load balancer before I ssh to them and deploy the new code.
The problem seems to be that control runs with its own classpath and I'm not sure how to access my project's own namespaces and dependency tree from within it.
I was able to get part of the way there by using the lein plugin, and then following this suggestion to import stuff into the control.clj file:
https://groups.google.com/forum/#!topic/clojure/zaWyOHF7yxI
...but it's not working perfectly, and I wind up having to keep two copies of my dependency list around.
Do you have any suggestions about making this happen? My ideal state is that I'd have some simple deployment code in a library in my own project, and then in control.clj call something like
(require '[myproject.aws :as aws])
(deftask :remove-elb "Remove a thing from another thing" []
(aws/remove-from-elb "server-name")
(ssh "somewhere" "whatever")