{ANN} Clojure-control 0.3.4 released

87 views
Skip to first unread message

dennis zhuang

unread,
May 9, 2012, 12:16:41 PM5/9/12
to Clojure
Clojure-control:  a clojure DSL for system admin and deployment with many remote machines via ssh

Usage: https://github.com/killme2008/clojure-control

Release 0.3.4

- New function (local cmd) to execute command on local machine : (local "tar zcvf app.tar.gz app/")
- Custer name could be a symbol rather than keyword
- (set-options!) now could accept several options: (set-options! :user "deploy" :parallel true) 
- New function (clear-options!) to clear global options.
- Using host and user of cluster in task by &host and &user :  
 (deftask test [] (println (str &user "@" &host)))

Upgrade:

   lein plugin install control 0.3.4


--
庄晓丹
Email:        killm...@gmail.com xzh...@avos.com
Site:           http://fnil.net
Twitter:      @killme2008



dennis zhuang

unread,
May 10, 2012, 10:02:46 AM5/10/12
to Clojure
A new release 0.3.5:

--Now you can run a task with user@host rather than a pre-defined cluster by:

  lein control run user@host task args

Upgrade:

   lein plugin install control 0.3.5



2012/5/10 dennis zhuang <killm...@gmail.com>

Rostislav Svoboda

unread,
May 10, 2012, 4:34:11 PM5/10/12
to clo...@googlegroups.com
I took the steps from your README.md and it seems like something's
missing :( see below

Bost

bost@bost-desktop:~/dev$ rm -rf mycontrol/
bost@bost-desktop:~/dev$ lein1 version
Leiningen 1.7.1 on Java 1.7.0_04 Java HotSpot(TM) Client VM
bost@bost-desktop:~/dev$ lein1 plugin install control 0.3.5
[INFO] Unable to find resource 'control:control:jar:0.3.5' in
repository central (http://repo1.maven.org/maven2)
Installing shell wrapper to /home/bost/.lein/bin/clojure-control
Copying 2 files to /tmp/lein-f0119cb7-6660-4181-aeed-149113f38fc1/lib
Including control-0.3.5.jar
Including clojure-1.3.0.jar
Including tools.cli-0.2.1.jar
Created control-0.3.5.jar
bost@bost-desktop:~/dev$ lein1 new mycontrol
Created new project in: /home/bost/dev/mycontrol
Look over project.clj and start coding in mycontrol/core.clj
bost@bost-desktop:~/dev$ cd mycontrol/
bost@bost-desktop:~/dev/mycontrol$ lein1 control init
bost@bost-desktop:~/dev/mycontrol$ cat
classes/ control.clj .gitignore project.clj README src/
test/
bost@bost-desktop:~/dev/mycontrol$ cat control.clj
(defcluster :default-cluster
:clients [
{:host "localhost" :user "root"}
])

(deftask :date "echo date on cluster" []
(ssh "date"))
bost@bost-desktop:~/dev/mycontrol$ lein1 control run default-cluster date
Empty hosts for cluster default-cluster
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at jline.ConsoleRunner.main(ConsoleRunner.java:69)
Caused by: java.lang.RuntimeException: Empty hosts for cluster
default-cluster (NO_SOURCE_FILE:0)
at clojure.lang.Compiler.eval(Compiler.java:5440)
at clojure.lang.Compiler.eval(Compiler.java:5391)
at clojure.core$eval.invoke(core.clj:2382)
at clojure.main$eval_opt.invoke(main.clj:235)
at clojure.main$initialize.invoke(main.clj:254)
at clojure.main$script_opt.invoke(main.clj:270)
at clojure.main$main.doInvoke(main.clj:354)
at clojure.lang.RestFn.invoke(RestFn.java:551)
at clojure.lang.Var.invoke(Var.java:390)
at clojure.lang.AFn.applyToHelper(AFn.java:193)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
... 5 more
Caused by: java.lang.RuntimeException: Empty hosts for cluster default-cluster
at control.core$do_begin.invoke(core.clj:353)
at leiningen.control$run_control.invoke(control.clj:30)
at leiningen.control$run.doInvoke(control.clj:97)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.core$apply.invoke(core.clj:542)
at leiningen.control$control.doInvoke(control.clj:136)
at clojure.lang.RestFn.invoke(RestFn.java:464)
at clojure.lang.Var.invoke(Var.java:377)
at clojure.lang.AFn.applyToHelper(AFn.java:172)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.core$apply.invoke(core.clj:542)
at leiningen.core$apply_task.invoke(core.clj:262)
at leiningen.core$_main.doInvoke(core.clj:329)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.core$apply.invoke(core.clj:542)
at leiningen.core$_main.invoke(core.clj:332)
at user$eval42.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5424)
... 16 more

dennis zhuang

unread,
May 10, 2012, 9:15:35 PM5/10/12
to clo...@googlegroups.com
I am sorry, 0.3.5 will break the example with only :clients in cluster.
I've push 0.3.6 to clojars, upgrade control by:

  lein plugin install control 0.3.6

Sorry for this issue,thanks.

2012/5/11 Rostislav Svoboda <rostisla...@gmail.com>

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
Reply all
Reply to author
Forward
0 new messages