Commits

Anonymous committed 7d5dd12

on deploy

  • Participants
  • Parent commits b890f12

Comments (0)

Files changed (1)

File src/parvel_deploy.ml

 
     type host_config;
 
-    (* [~listen_addr] -- [(ip, port)] that first worker will listen,
-       other workers on this host will listen [port+i] ports if possible.
-       [ip] is IP address of interface to listen on, in string format.
-       Use ["0.0.0.0"] to listen on all interfaces.
-       ["127.0.0.1"] is not a wise solution for cluster.
-
+    (* [host] is limited to textual representation of IPv4 addresses for now.
        [path] is either relative to [user]'s home directory, or absolute.
+       Ports [base_port + 0..n] will be used as listening ports for workers.
 
        Note: user that runs [host_config] must have ssh access to user@host
        without entering password.
     value host_config :
       ~user:string ->
       ~host:string ->
+      ?base_port:int ->
       ~path:string ->
-      ?listen_addr:(string * int) ->
       ~host_processes:int ->
       unit ->
       host_config
     value host_config
      ~user
      ~host
+     ?(base_port = Topoman_config.master_port)
      ~path
-     ?(listen_addr = (Topoman_config.listen_ip, Topoman_config.listen_port))
      ~host_processes
      ()
       : host_config
                    run_remote ~user_host ~path &
                    Array.append
                      [| "PARVEL_CONNECT=ws://" ^ Parvel.get_listen_addr_str ()
-                      ; "PARVEL_LISTEN=" ^
-                          let (ip, port) = listen_addr in
-                          ip ^ ":" ^ string_of_int (port + n)
+                      ; "PARVEL_LISTEN="
+                        ^ host ^ ":" ^ string_of_int (base_port + n)
                       |]
                      argv
                 )