Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request : Cloud Configuration Overloading #101

Open
11 tasks
erkkikeranen opened this issue Feb 14, 2018 · 0 comments
Open
11 tasks

Feature Request : Cloud Configuration Overloading #101

erkkikeranen opened this issue Feb 14, 2018 · 0 comments

Comments

@erkkikeranen
Copy link
Contributor

erkkikeranen commented Feb 14, 2018

Because there are multiple solutions available and people should not be forced to use certain solution, it should be possible to tell what implementation is used in Azure (or other cloud provider). It is fully possible that different solutions are available for solving the same problem with different cloud providers.

I suggest the following (as an idea, not as final implementation, should be expandable) as an extension that does not break anything or hurt anybody - optional addition to hedge.edn or resources/cloud-config.edn:

{:overload {:cloud :azure
                   :azure/queue (one of :azure/storage-queue :azure/servicebus-queue :azure/servicebus-btopic)
                   :azure/region :azure/northeurope
                   :functions [{:handler "handlername
                                       :azure/queue :azure/servicebus-topic
                                       :accessRights "manage"
                                       :subscription "subscriptionname
                                       :inputs [{:key "targetkeyname"
                                                      :azure/sql-query "SELECT * FROM..."}]
                   :azure/resources {:create [:azure/function-app :azure/resource-group :azure-storage]
                                                  ... other settings, replication, a template to run...}}
{:overload {:cloud :aws
                    ....
                    :aws/stage :dev}}

This cloud specific configuration is also required because user might want to set AWS region or Azure datacenter to something different than the hardcoded value.

Overloading must not be based on hacking and forking or handling manually the output of hedge and then uploading it to the cloud - it should be a seamless developer experience where you configure your function upfront. Other feasible option might be command line parameters for Azure: -q queue-implementation

  • Azure: Possibility to specify SQL (cosmosdb) or ODATA (table storage) & max fetch, target id / rowkey / partitionkey to fetch for inputs and outputs of type :table and :db
  • AWS: Possibility to set filtering / query on DynamoDB input
  • Implement cloud configuration overloading (configuration from file)
  • Regions / datacenters to cloud configuration overloading (configuration from file)
  • AWS stage to cloud configuration overloading (support in future from Azure when Slots are released)
  • Implement Namespaces for values i.e. :azure/northeurope
  • Should allow global overrides
  • Should allow function specific overrides
  • Should define if resources are created if they don't exist
  • Migrate azure queue-type selection from hedge.edn parsing (triggers, inputs and outputs)
  • Define Spec for file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants