 (def treeops-bin "/root/TreeOps")
 
 (defn configure!
-  "Configure logcabin"
-  [node]
-  (info node "configuring logcabin")
+  "Configure LogCabin"
+  [node]
+  (info node "configuring LogCabin")
   (c/su
     (c/exec :echo (str 
                     "serverId = " 

            :> config-file)))

(defn bootstrap!
  "bootstrap logcabin"
  [node]
  (info node "bootstrapping logcabin")
  (c/su
    (c/cd "/root"
          (c/exec logcabin-bin :-c config-file :-l log-file :--bootstrap))))

(defn start!
  "Start logcabin"
  [node]
  (info node "starting logcabin")
  (c/su
    (c/cd "/root"
          (c/exec logcabin-bin :-c config-file :-d :-l log-file :-p pid-file))))

(defn stop!
  "Stop logcabin"
  [node]
  (info node "stopping logcabin")
  (c/su
    (cu/grepkill! :LogCabin)
    (c/exec :rm :-rf pid-file)))

(defn reconfigure!
  "Reconfigure logcabin servers"
  [node]
  (info node "reconfiguring logcabin servers")
  (c/su
    (c/cd "/root"
          (c/exec reconfigure-bin 

            (start! node)
            
            (jepsen/synchronize test)
            ; Use Reconfigure tool to set up the LogCabin cluster in n1.
            (when (= node :n1)
              (reconfigure! node))
            
