killme2008 / killme2008/clojure-control

Possible to access my project's namespace from a control.clj file?

Open
#23 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Clojure
Stars
137
Forks
10
PR merge metrics
No merged PRs in 30d

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](https://github.com/mcohen01/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

``` clojure
(require '[myproject.aws :as aws])

(deftask :remove-elb "Remove a thing from another thing" []
(aws/remove-from-elb "server-name")
(ssh "somewhere" "whatever")
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how control loads control.clj and builds its classpath, then compare that behavior with the lein plugin and the dependency setup described in the issue. Done means a control.clj file can require project namespaces and use the project's dependency tree without maintaining a second dependency list.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
devops, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.