RFC: 1-click deploy #68
Description
Problem
We want to give interested parties a chance to try out Radicle without having to take care of their own infrastructure. Goal is to introduce a low-friction solution which is also reliable.
Proposal
This is not Radicle's core offering and we'd even encourage competition in this space. Thus our design should be transferable and as plug-and-play as possible.
We'll have an entrance contract that list all contracts offering their service. Decisions would be made based on the number of subscribers to each contract and the price each one is asking.
Upon deciding to purchase, user sends money to either topUp(address org)
or registerOrgThenTopUp()
. We might need a conversion from ether to stablecoin here, to simplify financing for service providers who have obligations in fiat.
This will eventually emit a NewTopUp
event containing org address and probably more info like expiry block. (After talking with Alexis, we decided to keep accounting in block terms on contracts)
Inside each k8s cluster, which ideally lives on a different cloud, we'll have a controller watching NewTopUp
events for their respective contract. On new events, we create Deployment and Service for this new org, with the needed containers inside. If it already exists, we simply change the expiry block, without affecting anything else.
We'll use IaC (Infrastructure as code) with Terraform managing the cloud resources for us, thus a potential third party can offer an alternative once they clone our infra code and fill in their own cloud keys.
Issues
-
We are relying on major clouds AWS, GCP and Azure which are in the same jurisdiction. Others lack support in our automation tooling because of poor API or lack of enough interest from community/maintainers.
-
GeoDNS. Our p2p system, as is, can't optimize for latency-based routing. I think, this needs to be solved on protocol level so we can ideally have two machines representing the same
org-node
ideally on a write-write capacity but if not, write-read. -
High availability. Same as above.
-
Durability. Data can get lost, while in worst-case scenario, data can be partially or fully recovered by connecting with users' p2p nodes, having a HA solution would make our system more robust.