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

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

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

    莊周夢蝶

    生活、程序、未來
       :: 首頁 ::  ::  :: 聚合  :: 管理
    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.
    主站蜘蛛池模板: 亚洲国产成人久久综合碰| 女人让男人免费桶爽30分钟| 亚洲一级特黄大片无码毛片 | 亚洲第一成年男人的天堂| 免费无码又爽又刺激网站直播| 亚洲乱码中文字幕手机在线| 乱淫片免费影院观看| 亚洲欧洲日本在线| www免费黄色网| 亚洲开心婷婷中文字幕| 国产一级淫片a免费播放口| 亚洲AV第一页国产精品| 日韩免费人妻AV无码专区蜜桃| 一区二区三区亚洲| 91黑丝国产线观看免费| 亚洲 欧洲 自拍 另类 校园| 国产成人免费福利网站| 午夜肉伦伦影院久久精品免费看国产一区二区三区 | 免费无码又黄又爽又刺激| 亚洲Aⅴ在线无码播放毛片一线天 亚洲avav天堂av在线网毛片 | 亚洲av中文无码乱人伦在线r▽| 四虎国产精品永久免费网址| 亚洲国产福利精品一区二区| 成人免费无码大片A毛片抽搐| 日韩欧美亚洲国产精品字幕久久久 | 国产一级一毛免费黄片| 亚洲福利视频网址| 午夜免费福利在线| rh男男车车的车车免费网站| 亚洲精品tv久久久久久久久| 在线观看成人免费视频不卡| 亚洲Aⅴ在线无码播放毛片一线天| 国产综合精品久久亚洲| **一级一级毛片免费观看| 亚洲精品9999久久久久无码| 在线观看亚洲成人| 国产精品视频免费观看| 曰批免费视频播放在线看片二| 亚洲AV第一页国产精品| 国产伦精品一区二区三区免费下载 | 国产成人精品免费视频大全|