hyphacoop / distributed-press-organizing

15 stars 1 forks source link

Create A and AAAA for new project #34

Closed benhylau closed 3 years ago

benhylau commented 3 years ago

🎟️ Re-ticketed from: #
πŸ“… Due date: end-Feb
🎯 Success criteria: Create all A and AAAA records for a new project.

Task Summary

Right now, when we add a new project we have to manually add the domain to Digital Ocean, and create A and AAAA records for the <project.domain> and <api.project.domain>. This needs to be automated in the API.

There should also be a way to enable/disable WWW, IPFS, and Hypercore publishing in project config. This would affect which records get created.

At the moment we only create the TXT records for DWeb using this code. It should be pretty straightforward to extend this to A and AAAA.

To Do

YurkoWasHere commented 3 years ago

There should also be a way to enable/disable WWW, IPFS, and Hypercore publishing in project config. This would affect which records get created.

Possible project.json config change

{
  "domain": "AAAA.BBBB.CCC",
  "protocol": {
    "http":{
        "enable":"true"
    },
    "ipfs":{
        "enable":"true"
    },
    "dat":{
        "enable":"true"
    }
  }
}

--

YurkoWasHere commented 3 years ago

Do we want the ability for custom ipv4 addresses (ie server other then ours)

benhylau commented 3 years ago

How's this?

{
  "domain": "staging.compost.digital",
  "publication": {
    "protocol": {
      "http": {
        "enable": true
      },
      "ipfs": {
        "enable": true
      },
      "hypercore": {
        "enable": true
      }
    },
    "dns": [
      {
        "type": "A",
        "name": "@",
        "data": "198.50.215.6"
      },
      {
        "type": "AAAA",
        "name": "@",
        "data": "2607:5300:203:4014:5074:f2ff:feb1:a87f"
      }
    ]
  }
}

If no protocol is specified, or any of the protocols is missing, they are default to true.

DNS records are published as is and it assumes the project knows what they are doing, and there is no automated way to remove. Only A and AAAA are supported.

YurkoWasHere commented 3 years ago

We will cut out the DNS as it really is out of scope of the requirements

How's this?

{
  "domain": "staging.compost.digital",
  "publication": {
    "protocol": {
      "http": {
        "enable": true
      },
      "ipfs": {
        "enable": true
      },
      "hypercore": {
        "enable": true
      }
    }   
  }
}

README text

benhylau commented 3 years ago
YurkoWasHere commented 3 years ago

I was thinking about this last night. If I'm removing entries when "disabled" i think i need to also add a "disableDnsUpdate": true is it does not remove the @ record on disable.