   "A map of application name to the start function"
   {:metadata-db {:start mdb-system/start
                  :stop mdb-system/stop}
-   :bootstrap {:start bootstrap-system/start
-                 :stop bootstrap-system/stop}
    :index-set {:start index-set-system/start
                :stop index-set-system/stop}
    :indexer {:start indexer-system/start

   :ingest {:start ingest-system/start
            :stop ingest-system/stop}
   :search {:start search-system/start
            :stop search-system/stop}})

(def in-memory-elastic-port 9206)
(def in-memory-elastic-port-for-connection 9206)


(defn- start-apps
  [system]
  (reduce (fn [system app]
            (let [{start-fn :start} (app-control-functions app)]
              (update-in system [:apps app]
                         #(try
                            (when %
                              (start-fn %))
                            (catch Exception e
                              (stop-components (stop-apps system))
                              (throw e))))))
          system
          app-startup-order))

(defn start
  "Performs side effects to initialize the system, acquire resources,
