Commit 918917c3 authored by Bjarno Oeyen's avatar Bjarno Oeyen
Browse files

pizilla changes

parent 3421c467
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -19,15 +19,18 @@
use Mix.Config

config :marlon,
  python_path: 'python'
  python_path: 'python',
  visualization: nil,
  communication_time: 1000,
  processing_time: 100

config :libcluster,
  topologies: [
    load_balancing_demo: [
      # strategy: Cluster.Strategy.Gossip,
      strategy: Cluster.Strategy.Epmd,
      # config: [hosts: [:"master@192.168.1.100", :"aux@192.168.1.100"]],
      config: [hosts: [:"master@192.168.0.172", :"aux@192.168.0.172", :"aux2@192.168.0.172"]],
      config: [hosts: [:"master@192.168.1.200"]],
      # config: [hosts: [:"master@192.168.0.172", :"aux@192.168.0.172", :"aux2@192.168.0.172"]],
      # connect: {Marlon.Network, :connect_node, []},
      # disconnect: {Marlon.Network, :disconnect_node, []},
    ]
+13 −4
Original line number Diff line number Diff line
@@ -30,16 +30,25 @@ defmodule Marlon.Application do
  ## Application initialisation

  def start(_reason, _args) do
    
    Logger.info "hello there application!"


    # Check whether this is the node initiated the Marlon system

    node_name = Atom.to_string(Node.self())
    children = if (String.contains?(node_name, "aux")) do

    topologies = Application.get_env(:libcluster, :topologies)

    children = if ((String.contains?(node_name, "aux")) || (String.contains?(node_name, "slave"))) do
      Logger.info "Starting Marlon on auxiliary node"
      [{__MODULE__, []}]
      [{__MODULE__, []},
       {Cluster.Supervisor, [topologies, [name: MyApp.ClusterSupervisor]]},]
    else
      Logger.info "Starting Marlon on primary node"
      [{__MODULE__, []},
        %{id: :agentgroups, start: {Marlon.AgentGroupManager, :start_link, [[], [name: :agentgroups]]}}]
       %{id: :agentgroups, start: {Marlon.AgentGroupManager, :start_link, [[], [name: :agentgroups]]}},
       {Cluster.Supervisor, [topologies, [name: MyApp.ClusterSupervisor]]},]
    end

    Supervisor.start_link(children, strategy: :one_for_all)
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ defmodule Marlon.Mixfile do
  # Run "mix help deps" to learn about dependencies.
  defp deps do
    [
      # {:erlport, "~> 0.10.0"},
      {:erlport, "~> 0.10.0"},
      {:libcluster, "~> 3.0.2"},
      # {:smile_it_demo_ui, git: "https://github.com/rhumbertgz/smile_it_demo_ui.git"},
      # {:exprof, "~> 0.2.0"},
+2 −2

File changed.

Contains only whitespace changes.