Skip to content
This repository has been archived by the owner on Apr 29, 2020. It is now read-only.

Latest commit

 

History

History
101 lines (81 loc) · 3.1 KB

README.md

File metadata and controls

101 lines (81 loc) · 3.1 KB

Deprecated

This work is deprecated, and this repo has been archived.

dweblink-infra

Infrastructure for the dweb.link IPFS gateway

Modules

  • base
    • inventory
    • anycast
      • addresses
      • bird
      • bird_exporter
    • vpn
      • wireguard
      • topology
      • openvpn
      • wireguard_exporter
      • openvpn_exporter
  • cluster
    • docker
    • consul
    • nomad
    • consul_exporter
    • nomad_exporter
  • telemetry
    • prometheus
    • grafana
    • logstash
    • node_exporter
    • logstash_exporter
  • gateway
    • go-ipfs
    • consul-template
    • caddy (tls termination) + caddy-tlsconsul
    • caddy_exporter
  • storage
    • ipfs-cluster
    • pinbot

FAQ

Q: the change i made isn't triggering anything A: look into the code for the module and resource, and add a respective trigger A2: terraform taint command

Q: dns records of the private network don't work A: use 8.8.8.8, or configure dnsmasq with domain-rebind-ok=/dweblink.net/ (/etc/NetworkManager/dnsmasq.d/rebind.conf)

Notes

  • TF_VAR_use_public_ipv4s=true terraform apply -target=module.inventory
  • TF_VAR_use_public_ipv4s=true terraform apply -target=module.wireguard
  • TF_VAR_use_public_ipv4s=true terraform apply -target=module.openvpn
  • terraform apply -parallelism=1
  • for s in $(terraform state list | grep vultr_server); do terraform state show "$s" | grep -P 'ipv4_address|hostname'; echo ---; done


networking issues

  • remote state is over vpn, so it's tricky to do changes that interrupt vpn connectivity (e.g. openvpn module)
    • make it so bootstrap mode fixes that, e.g. when bootstrap then use local state only
  • each consul agent (:8500) is exposed to the whole vpn
  • containers can access vpn through host
  • ssh (:22) is publicly exposed
  • each module does its own firewall setup (ufw) so the inventory module can overwrite others
    • could have firewall module which grabs rules from each module and applies them

OpenVPN notes