   Returns `{:ok, pid}` or `{:error, reason}`
   """
   @spec deploy(Map) :: :ok | {:error, String.t}
-  def deploy(options) do
+  def deploy(details) do
     Logger.info("Beginning Fleet deployment...")
-    unless options[:deployment_repo], do: raise "No deployment repo provided"
-
-    case DeploymentRepo.download(options.deployment_repo) do
-      :ok               -> start_deploy(options)
+    unless details[:deployment_repo], do: raise "No deployment repo provided"
+
+    case DeploymentRepo.download(details.deployment_repo) do
+      :ok               -> start_deploy(details)
       {:errors, reason} -> {:error, reason}
     end
   end
 
   @doc "Re-deployes the Dockerized app to a CoreOS cluster."
   @spec redeploy(Map) :: :ok | {:error, String.t}
-  def redeploy(options) do
+  def redeploy(details) do
     Logger.info("Beginnging Fleet re-deployment...")
-    start_deploy(options)
-  end
-
-  def create_cluster(options) do
-    if options[:product_cluster_etcd_token] == nil do
+    start_deploy(details)
+  end
+
+  def create_cluster(details) do
+    if details[:product_cluster_etcd_token] == nil do
       # legacy (no product deployment info)
-      DeploymentRepo.get_etcd_cluster(options.deployment_repo)
-    else
-      cluster = case EtcdCluster.create(options[:product_cluster_etcd_token]) do
+      DeploymentRepo.get_etcd_cluster(details.deployment_repo)
+    else
+      cluster = case EtcdCluster.create(details[:product_cluster_etcd_token]) do
         {:ok, etcd_cluster} -> etcd_cluster
         {:error, reason}    ->
           Logger.error("Failed to create etcd cluster:  #{reason}")

  end

  @doc false
  defp configure_router(options, cluster, deployed_units) do
    if options[:openaperture_router] do
      case Router.validate_routing_options(options[:openaperture_router]) do
        :ok ->
          case update_router(options[:openaperture_router], cluster, deployed_units) do
            :ok -> :ok
            {:error, errors} ->
              {:error, "Router returned the following errors: #{JSON.encode!(errors)}"}
          end
        {:error, errors} ->
          {:error, "Routing options have been misconfigured: #{JSON.encode!(errors)}"}
      end
    else
      :ok

    cond do
      host_cnt      == 0 -> fail_w_no_hosts(source_repo)
      new_units_cnt == 0 -> fail_w_no_units(source_repo)
      true               -> do_deploy(cluster, host_cnt, new_units, details)
    end
  end

  defp fail_w_no_hosts(repo) do
    Notifications.send_hipchat(%{
      prefix:     "Deployment of #{repo} failed!",
      message:    "Unable to find hosts associated with the deployment repo!",
      is_success:  false
    })
    Logger.error(
     "Unable to complete deployment, no hosts associated with the repo!"
    )
    {:error, "no hosts associated with the repo"}
  end

  defp fail_w_no_units(repo) do
    # Workflow.step_failed(_workflow, "Unable to complete deployment, no valid Units were retrieved from the deployment repo!")
    Notifications.send_hipchat(%{prefix:     "Deployment of #{repo} failed!",
      message:    "Unable to find valid units for this repo!",
      is_success:  false
    })
    Logger.error(
      "Unable to complete deployemnt, no valid Units were retrieved from the deployment repo"
    )
    {:error, "No valid units were retrieved from the repo"}
  end


  defp do_deploy(cluster, requested_instance_cnt, new_units, details) do
    if details[:min_instance_cnt] && details[:min_instance_cnt] > requested_instance_cnt do
      requested_instance_cnt = details[:min_instance_cnt]
    end

    Logger.debug("Allocating #{requested_instance_cnt} ports on the cluster...");

    if details[:product_cluster] && details[:product_component] do
      # find all current port entries so we can remove them after the deploy units finishes
      Logger.debug("Allocating ports on the cluster...")
      # TODO: replace this with querying ManagerAPI
      # available_ports = ProductCluster.allocate_ports_for_component(
      #   details.product_cluster,
      #   details.product_component,
      #   requested_instance_cnt
      # )
    else
