ernestio / ernest

Ernest is a tool to define, manage and collaborate on your infrastructure
http://ernest.io/
Mozilla Public License 2.0
17 stars 6 forks source link

Unified provider logic #878

Open adriacidre opened 6 years ago

adriacidre commented 6 years ago

Preamble

Idea: <to be assigned>
Title: Unified provider logic
Status: Draft
Created: 2018-02-19

Summary

All provider logic should live on the same repo.

Product Overview

Actually the provider logic is spread between different libraries and services, so it's really hard for any newcomer (community or new dev) to identify how to work with providers.

Product Description

The main idea behind this issue is to have all provider related logic under the same repository so you can easily understand, test and manage any provider related logic.

A repository structure like:

ernestprovider
    spec        # Input ernest spec
        aws
            ec2
            ...
        ...
    mapping     # Internal mapping
        aws
            ec2
            ...
        ...
    provider    # Logic interacting with 3rd party SDKs APIs
        aws
            ec2
            ...
        ...

will allow api load the package github.com/ernestio/ernestprovider/spec and check if provided spec is correct. definition-mapper will also be able to require github.com/ernestio/ernestprovider/mapping to map the yaml spec on a valid internal service.

As all this requires are done as a package level, it won't require to load any heavy SDK, and that will only be required when you look for a github.com/ernestio/ernestprovider/provider package, mainly on the connectors.