<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.
    主站蜘蛛池模板: 无人影院手机版在线观看免费 | 国产一区二区三区免费视频| 亚洲精品中文字幕乱码影院| 最近中文字幕mv免费高清视频7| 亚洲综合自拍成人| 久久免费线看线看| 亚洲AV日韩精品久久久久| a级成人毛片免费视频高清| 亚洲s色大片在线观看| 久久免费视频精品| 亚洲精品中文字幕无码AV| 国拍在线精品视频免费观看| 亚洲高清一区二区三区| 成年女人毛片免费播放人| 亚洲日韩一中文字暮| 日本免费人成视频播放| 一区二区免费国产在线观看| 亚洲精品456播放| 99视频在线观看免费| 97久久精品亚洲中文字幕无码| 6080午夜一级毛片免费看| 亚洲一卡二卡三卡四卡无卡麻豆| 曰批视频免费30分钟成人| 亚洲av永久中文无码精品综合| 国产精品成人四虎免费视频| 中文在线日本免费永久18近| 91亚洲va在线天线va天堂va国产| 成年人免费的视频| 色五月五月丁香亚洲综合网| 久久久久国产成人精品亚洲午夜| 国产午夜精品免费一区二区三区 | 亚洲欧洲日产韩国在线| 成人午夜性A级毛片免费| www成人免费观看网站| 亚洲嫩模在线观看| 美女黄网站人色视频免费国产 | 在线播放免费播放av片| 巨胸喷奶水视频www免费视频| 7777久久亚洲中文字幕蜜桃| 免费观看午夜在线欧差毛片| 成人精品一区二区三区不卡免费看|