Qovery / engine

The Orchestration Engine To Deliver Self-Service Infrastructure ⚡️
https://www.qovery.com
GNU General Public License v3.0
2.27k stars 68 forks source link

feat: Qovery AWS EC2 🌎 #694

Closed deimosfr closed 2 years ago

benjaminch commented 2 years ago

I find bootstrap lib folder a bit complicated now. Shouldn't we treat AWS EC2 / Edge as a new provider? I will bring a lot of upsides:

We can reuse stuff from one provider to the other, or at least make the change easily to support it (I am thinking about applications / DBs). New AWS EC2 provider should be able to reuse full fledge components as we do today for DNS managers / container registries or Object storages. It will be nice to allow that.

So for 'lib/bootstrap' I would go with something like:

/lib
  /aws
    /bootstrap
    /charts
    /chart-values
    /[..]
  /aws-ec2 <= Only AWS EC2 specifics goes here, if same as AWS, then just copy for now, we will refactor if needed at some point
    /bootstrap
    /charts
    /chart-values
    /[..]
  /scaleway
    /bootstrap
    /charts
    /chart-values
    /[..]
  /digitalocean
    /bootstrap
    /charts
    /chart-values
    /[..]
evoxmusic commented 2 years ago

EC2 is not a new Cloud Provider but a new Kubernetes Provider. So everything that is AWS-related is valid to this new Kubernetes Provider.

⚠️ Note: the name Qovery Edge has been replaced by Qovery AWS EC2 since it is not an Edge provider that we really want here. Our use case is to make Qovery accessible on AWS with a cost-effective solution while keeping Kubernetes.

benjaminch commented 2 years ago

Sure thing but I think we should consider this new EC2 as new provider or at least better isolate / separate it in the code base while avoiding to pollute general AWS cases. Of course there will be some duplicate but it can be refactored easily.

evoxmusic commented 2 years ago

I've refactored the code to not duplicate them between EKS and EC2 - if you want we can move EC2 and EKS into separate files. It makes sense to me as well. Let me know

benjaminch commented 2 years ago

It would makes sense to split those and see how we can refactor a bit after. It can be done after but let say doing it now is less work upfront I think. Let me know if I can help.

evoxmusic commented 2 years ago

It would makes sense to split those and see how we can refactor a bit after. It can be done after but let say doing it now is less work upfront I think. Let me know if I can help.

@benjaminch I did the refacto :) Let me know what you think now. Thx for your feedback

evoxmusic commented 2 years ago

@benjaminch I didn't comment all your messages since I refactored the existing code and I didn't really add anything new. Feel free to apply your changes directly. You don't need to ask me 😁