<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    莊周夢(mèng)蝶

    生活、程序、未來(lái)
       :: 首頁(yè) ::  ::  :: 聚合  :: 管理
    update: Allow passing command line arguments to task now.

    1.What is clojure-control?

        The idea came from node-control.
        Define clusters and tasks for system administration or code deployment, then execute them on one or many remote machines.
        Clojure-control depends only on OpenSSH and clojure on the local control machine.Remote machines simply need a standard sshd daemon.

    2.Quick example

    Get the current date from the two machines listed in the 'mycluster'  config with a single command:

         (ns samples
         (:use [control.core :only [task cluster scp ssh begin]]))
         ;;define clusters
         (cluster :mycluster
                     :clients [
                                   { :host 
    "a.domain.com" :user "alogin"}
                                   { :host 
    "b.domain.com" :user "blogin"}
                                 ])
         ;;define tasks
         (task :date 
    "Get date"
                  []
                  (ssh 
    "date"))
        ;;start running
        (begin)

        If saved in a file named "controls.clj",run with   

    java -cp clojure.jar:clojure-contrib.jar:control-0.1-SNAPSHOT.jar clojure.main controls.clj mycluster date

        Each machine execute "date" command ,and the output form the remote machine is printed to the console.Exmaple console output

     

        Performing mycluster
        Performing date 
    for a.domain.com
        a.domain.com:ssh: date
        a.domain.com:stdout: Sun Jul 
    24 19:14:09 CST 2011
        a.domain.com:exit: 
    0
        Performing date 
    for b.domain.com
        b.domain.com:ssh: date
        b.domain.com:stdout: Sun Jul 
    24 19:14:09 CST 2011
        b.domain.com:exit: 
    0

        Each line of output is labeled with the address of the machine the command was executed on. The actual command sent and the user used to send it is displayed. stdout and stderr output of the remote process is identified as well as the final exit code of the local ssh command.


    3.How to scp files?
        Let's define a new task named deploy

      (task :deploy "scp files to remote machines"
            []
            (scp (
    "release1.tar.gz" "release2.tar.gz""/home/alogin/"))

        Then it will copy release1.tar.gz and release2.tar.gz to remote machine's /home/alogin directory.

    4.Where is it?

        It's on github,https://github.com/killme2008/clojure-control

        Any suggestion or bug reports welcomed.
    主站蜘蛛池模板: 亚洲精品视频免费在线观看| 91精品国产免费久久久久久青草| 亚洲亚洲人成综合网络| 今天免费中文字幕视频| 中文字幕在线日亚洲9| 亚洲人成无码久久电影网站| 91香蕉国产线在线观看免费| 亚洲成a人无码亚洲成av无码| 在线播放亚洲第一字幕| 免费无码又黄又爽又刺激| 无码精品人妻一区二区三区免费 | 亚洲天堂一区二区三区| 国产精品成人四虎免费视频| 国产精品免费观看调教网| 亚洲大码熟女在线观看| 久久国产亚洲精品无码| 亚洲精品国产精品国自产观看| 最近新韩国日本免费观看| 五月天婷婷免费视频| 日韩亚洲产在线观看| 亚洲AV无码一区二区二三区软件 | 久久亚洲精品无码网站| 亚洲国产精品一区二区久久| 免费一级特黄特色大片在线观看| 久久国产精品免费观看| 日日狠狠久久偷偷色综合免费| 亚洲人成人77777在线播放| 国产亚洲成AV人片在线观黄桃| 日韩中文字幕免费| 免费福利在线播放| 日韩免费高清播放器| 窝窝影视午夜看片免费| 亚洲精品无码永久在线观看男男| 亚洲人成亚洲精品| 亚洲精品无码MV在线观看 | 亚洲av午夜福利精品一区| 亚洲第一区精品日韩在线播放| 最近免费中文字幕大全视频| 2020因为爱你带字幕免费观看全集| 国产三级在线免费观看| 免费无码AV一区二区|