<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.
    主站蜘蛛池模板: 黄色一级视频免费观看| 亚洲国产成人综合| 亚洲精品国产精品乱码不卞| 四虎影视永久免费观看地址| 亚洲精品老司机在线观看| 99亚洲乱人伦aⅴ精品| eeuss免费影院| 久视频精品免费观看99| 久久WWW免费人成人片| 亚洲裸男gv网站| 久青草国产免费观看| 久草视频免费在线| 一本久久综合亚洲鲁鲁五月天| 日韩va亚洲va欧洲va国产| 亚洲成a人片在线观看中文!!!| 真人无码作爱免费视频| 最近中文字幕大全免费视频 | 99亚洲精品卡2卡三卡4卡2卡| 女人张开腿给人桶免费视频| 久久亚洲国产精品五月天婷| 亚洲乱码在线播放| 在线视频免费观看www动漫| 色天使亚洲综合一区二区| 狠狠亚洲狠狠欧洲2019| 免费不卡在线观看AV| 四虎永久免费影院在线| 国产无限免费观看黄网站| 天天干在线免费视频| 免费的黄色的网站| 又粗又大又硬又爽的免费视频 | 亚洲色无码专区一区| 久久青青草原国产精品免费| 日韩免费电影在线观看| 亚洲一级毛片免费看| 亚洲欧洲免费视频| 亚洲综合无码AV一区二区| 美女被吸屁股免费网站| 亚洲AV无码成人精品区天堂| 成人毛片100免费观看| 亚洲国产成人五月综合网| 国产亚洲午夜精品|