Auctions integration in webapp deployment flow #948

Open
opened 2024-09-26 12:43:28 +00:00 by prathamesh · 1 comment
Member
  • Currently, the deployments are requested using an ApplicationDeploymentRequest record, for example, through the request-webapp-deployment command (PR)
  • In the request-webapp-deployment command, the target deployer has to be specified (--deployer); also, given app config (--env-file) is encrypted and uploaded to the deployer
  • For integrating provider auctions in the deployment flow however, where there can be multiple winners, the deployer(s) won't be known beforehand

Proposed approach:

  • Auction:
    • Create a new type of record ApplicationDeploymentAuction wherein the auction id of a live provider auction is set
      • A new laconic-so command publish-deployment-auction can be implemented that creates an auction and publishes the required record
    • The deployer queries for these ApplicationDeploymentAuction records in addition to ApplicationDeploymentRequests
    • For each auction, the deployer places a bid if configured max_price in auction is within deployer's configured rate
  • Post auction:
    • On auction completion, call request-webapp-deployment with the auction id, where, in addition to publishing an ApplicationDeploymentRequest record, it will upload the encrypted config to all deployers owned by the auction winners
    • Rest of the application deployment flow works as it is
* Currently, the deployments are requested using an `ApplicationDeploymentRequest` record, for example, through the `request-webapp-deployment` command ([PR](https://git.vdb.to/cerc-io/stack-orchestrator/pulls/938)) * In the `request-webapp-deployment` command, the target deployer has to be specified (`--deployer`); also, given app config (`--env-file`) is encrypted and uploaded to the deployer * For integrating `provider` auctions in the deployment flow however, where there can be multiple winners, the deployer(s) won't be known beforehand Proposed approach: * Auction: * Create a new type of record `ApplicationDeploymentAuction` wherein the auction id of a live `provider` auction is set * A new laconic-so command `publish-deployment-auction` can be implemented that creates an auction and publishes the required record * The deployer queries for these `ApplicationDeploymentAuction` records in addition to `ApplicationDeploymentRequest`s * For each auction, the deployer places a bid if configured `max_price` in auction is within deployer's configured rate * Post auction: * On auction completion, call `request-webapp-deployment` with the auction id, where, in addition to publishing an `ApplicationDeploymentRequest` record, it will upload the encrypted config to all deployers owned by the auction winners * Rest of the application deployment flow works as it is
Author
Member

Implementation notes:

Note: The flow mentioned below is an alternative to existing one which should continue working as it is

  • User (app owner/deployment requester) publishes an ApplicationRecord and sets a name to it
  • User runs the new laconic-so command publish-deployment-auction
    • This will create an SP auction
    • Also publish an ApplicationDeploymentAuction record
  • webapp-deployer picks up ApplicationDeploymentAuction and places a bid if configured max_price in auction is within deployer's configured rate
  • Once the auction is complete, user calls the command request-webapp-deployment with auction id
    • This will resolve webapp-deployers for all the auction winners
    • Upload encrypted config to all resolved webapp-deployers
    • Publish an ApplicationDeploymentRequest record targeted to each webapp-deployer
      • Record can now have auction_id instead of payment
  • webapp-deployer picks up above ApplicationDeploymentRequest
    • If auction is set, it will check if it is in auction winners list instead of checking for payment
    • Deploy web-app and publish an ApplicationDeploymentRecord
  • User releases funds once they see an ApplicationDeploymentRecord and perform deployment health checks
Implementation notes: Note: The flow mentioned below is an alternative to existing one which should continue working as it is - User (app owner/deployment requester) publishes an `ApplicationRecord` and sets a name to it - User runs the new `laconic-so` command `publish-deployment-auction` - This will create an SP auction - Also publish an `ApplicationDeploymentAuction` record - webapp-deployer picks up `ApplicationDeploymentAuction` and places a bid if configured `max_price` in auction is within deployer's configured rate - Once the auction is complete, user calls the command `request-webapp-deployment` with auction id - This will resolve webapp-deployers for all the auction winners - Upload encrypted config to all resolved webapp-deployers - Publish an `ApplicationDeploymentRequest` record targeted to each webapp-deployer - Record can now have `auction_id` instead of `payment` - webapp-deployer picks up above `ApplicationDeploymentRequest` - If `auction` is set, it will check if it is in auction winners list instead of checking for payment - Deploy web-app and publish an `ApplicationDeploymentRecord` - User releases funds once they see an `ApplicationDeploymentRecord` and perform deployment health checks
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/stack-orchestrator#948
No description provided.