siilisolutions / hedge

a serverless solution for clojure
Eclipse Public License 1.0
39 stars 6 forks source link

Task refactoring #52

Open jikuja opened 6 years ago

jikuja commented 6 years ago
jikuja commented 6 years ago

Start of discussion:

How Hedge should support multiple clouds with one build.boot file?

One solution:

(set-env! :source-paths #{"src"}
          :resource-paths #{"resources"}
          :dependencies '
                          [siili/boot-hedge "0.0.4-SNAPSHOT" :scope "test"]
                          [siili/hedge "0.0.4-SNAPSHOT"]
])

(require '[boot-hedge.aws.core :refer :all])
(require '[boot-hedge.azure.core :refer :all])

This requires that all tasks in hedge namespaces are unique. Should we refactor common tasks into common namespace and then rafactor rest of the tasks with cloud-specific postfixes or prefixes?

Other solution:

(require '[boot-hedge.common.core :refer :all])
(init-hedge! :aws :azure)

In this case first command import all common tasks and then init-hedge! import tasks for requested cloud platform. Usability? Feasibility?