Hi,all
Clojure-control <https://github.com/killme2008/clojure-control> is a
clojure DSL for system admin and deployment with many remote machines via
ssh.
I am pleased to annoucment that clojure-control 0.3.0 is out.It adds
some powerful features in this release ,includes:
- ssh and scp both have a new option :sudo to be executed as root on
remote machines,for example:
(ssh "/etc/init.d/ssh restart" :sudo true)
- scp has a new option :mode to change file modes copied from local:
(scp "start.sh" "/etc/init.d/start.sh" :sudo true :mode 755)
- A new function "exists?" to test if a file exists on remote
machines:
(if (not (exists? (str "/home/deploy/.ssh")))
(ssh (sudo (str "mkdir -p /home/deploy/.ssh"))))
- Call other task in deftask with "call" function:
(deftask :ps "A task to grep process" [process]
(ssh (str "ps aux | grep " process)))
(deftask :start_ha []
(ssh "/etc/init.d/haproxy start")
(call :ps "haproxy"))
- A new function "append" to append a line to a file on remote machines:
(ssh (append "/etc/hosts" "192.168.1.100 web" :sudo true))
- A new function "sed" to replace lines in a file on remote machines,and
comm/uncomm to comment/uncomment a line in a file:
(sed <file> <before> <after> :flags <flags> :limit <limit> :backup <backup>)
Equivalent to
sed -i<backup> -r -e "<limit> s/<before>/<after>/<flags>g <filename>"
-
Limits max output line to 10000.
-
Adds more documents in wiki:
https://github.com/killme2008/clojure-control/wiki <goog_909345399>
You can install the new version by :
lein plugin install control 0.3.0 #For clojure 1.3
lein plugin install control 0.3.1 #For clojure 1.2
More information please visit it on github:
https://github.com/killme2008/clojure-control
And wiki: https://github.com/killme2008/clojure-control/wiki
<goog_909345399> <../../../>
--
庄晓丹
Email: [email protected] [email protected]
Site: http://fnil.net
Twitter: @killme2008
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en