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

Create DNS Flow skeleton like Certs Flow #270

Closed
humphd opened this issue Feb 23, 2023 · 2 comments · Fixed by #289
Closed

Create DNS Flow skeleton like Certs Flow #270

humphd opened this issue Feb 23, 2023 · 2 comments · Fixed by #289
Assignees
Labels
category: DNS A service about hosting domains category: queue A service that connects and manages certificate creation/expiration

Comments

@humphd
Copy link
Contributor

humphd commented Feb 23, 2023

We've got two very similar, and related, processes to manage:

  • DNS
  • Certificates

Both now have an API:

The Certificates have an asynchronous flow, made-up of various sub-jobs: https:/DevelopingSpace/starchart/tree/main/app/queues/certificate.

We need the same sort of thing for DNS. There is some work in https:/DevelopingSpace/starchart/blob/main/app/lib/domains.server.ts that might help with this, but what we really need to do is break down the process of working with DNS (Route53, MySQL, Notifications, etc) as a series of async jobs that can be performed in the background, and linked together as a flow.

Without this, we're going to waste a lot of time trying to hook everything together, so I'd like to prioritize the work, and get it started as soon as possible.

@dadolhay has the most experience thinking in terms of distinct, async jobs, so perhaps he can throw some thoughts in here.

@Genne23v are you interested in working on this?

Whoever does work on it, I'd highly recommend we do this in stages like @dadolhay did with the certs flow: build the skeleton, then build the individual workers to connect back to our existing APIs. I'd like to avoid having someone go off for a month and try to build this without feedback.

To get the ball rolling, here's a draft of the process:

  1. addDnsRecord() (or update, delete) takes record details and creates a new flow. A record is immediately put into MySQL with the state indicating that it's in process, so the front-end can begin to query for that data (and state)
  2. A call to Route53 is made
  3. We ask Route53 when it's done using the SDK API (might take 2 or 3 tries)
  4. When the record is done, we update the MySQL data with the new status (could be error or ok)
  5. We send the user whatever notification(s) are necessary to let them know what has happened

What am I missing?

@humphd humphd added category: DNS A service about hosting domains category: queue A service that connects and manages certificate creation/expiration labels Feb 23, 2023
@Genne23v
Copy link
Contributor

@humphd I should've let you know that I'm working on this. It took much longer than I thought as I struggled with some errors. I just pushed #274 to resolve this issue. Although notification is missing in my code.

@humphd
Copy link
Contributor Author

humphd commented Feb 24, 2023

Thanks @Genne23v.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: DNS A service about hosting domains category: queue A service that connects and manages certificate creation/expiration
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants