mkdocs-benoit.jp.net/docs/Various/Infra.md
2022-01-07 19:17:48 +09:00

112 lines
4.4 KiB
Markdown

## Internet flowchart
```mermaid
flowchart TD
LXD["lxd.home.arpa\nJapan"]
LXD --> CONTAINERS{"Containers *.benpro.fr"}
CONTAINERS --> MULLVAD[Mullvad VPN\nJapan]
MULLVAD --> CF[Cloudflare Tunnels]
CF --> INTERNET[Internet]
MANUAL[Manual setup\nDocker+Mailcow] --> MAIL
MAIL[mail.benpro.fr] --> HETZNER[Hetzner\nFinland]
HETZNER --> INTERNET
DNS[dns.benpro.fr] --> EC2[AWS EC2\nJapan]
EC2 --> INTERNET
UPTIME[uptime.benpro.fr] --> ORACLE[Oracle OCI\nJapan]
ORACLE --> INTERNET
PYINFRA[pyinfra] --> |Infrastructure as code| DNS
PYINFRA --> |Infrastructure as code| LXD
PYINFRA --> |Infrastructure as code| UPTIME
YOU[Curious visitor] --> INTERNET
```
## VPN port allocation
```mermaid
flowchart LR
INTERNET[Internet] --> MULLVAD[Mullvad VPN\nvpn.benpro.fr] --> JPTYO{JP-TYO}
JPTYO --> PORT_56563[Port 56563]
JPTYO --> PORT_54805[Port 54805]
PORT_56563 --> LXD[lxd.home.arpa]
PORT_54805 --> LXD
LXD --> |Port 56563| GIT[Container git:22]
LXD --> |Port 54805| CHOWME[Container chownme:22]
```
## Backups flowchart
```mermaid
flowchart TD
DESKTOP_HOME["chiisai.home.arpa\nJapan"] --> |borg, only homedir| BORGBASEUSA
DESKTOP_HOME --> |borg, only homedir| BORGDANIEL
DESKTOP_HOME --> |LVM LVs| HDD_INT[Internal HDD]
HDD_INT_BACKUP --> |LVM LV| HDD_INT
HDD_INT --> |rsync| HDD_EXT[External HDD]
HDD_EXT --> |borg| BORGBASEUSA
LXD["lxd.home.arpa\nJapan"] --> |lxd export| HDD_INT_BACKUP[hdd-lxd_zfs_backup]
HDD_INT_BACKUP --> |borg| BORGBASEUSA[borgbase.com\nUSA]
HDD_INT_BACKUP --> |borg| BORGDANIEL[chown.me\nCanada]
MAIL[mail.benpro.fr] --> |borg| BORGBASEDE[borgbase.com\nGermany]
MAIL --> |borg| BORGDANIEL
```
## Syncthing flowchart
```mermaid
flowchart LR
subgraph Smartphone
SMARTPHONE[Smartphone] --> SMARTPHONE_FOLDERS{Folders}
SMARTPHONE_FOLDERS --> SMARTPHONE_FOLDERS_DCIM[DCIM]
SMARTPHONE_FOLDERS --> SMARTPHONE_FOLDERS_PICTURES[Pictures]
SMARTPHONE_FOLDERS_DCIM --> SMARTPHONE_FOLDERS_DCIM_CAMERA[Camera]
SMARTPHONE_FOLDERS_PICTURES --> SMARTPHONE_FOLDERS_PICTURES_ADOBELIGHTROOM[AdobeLightroom]
SMARTPHONE_FOLDERS --> SMARTPHONE_FOLDERS_DOCUMENTS[Documents]
SMARTPHONE_FOLDERS_DOCUMENTS --> SMARTPHONE_FOLDERS_DOCUMENTS_KEEPASS[KeePass]
end
subgraph Desktop
DESKTOP[Desktop] --> DESKTOP_FOLDERS{Folders}
DESKTOP_FOLDERS --> DESKTOP_FOLDERS_HOME[home]
DESKTOP_FOLDERS_HOME --> DESKTOP_FOLDERS_HOME_PICTURES[Pictures]
DESKTOP_FOLDERS_HOME_PICTURES --> DESKTOP_FOLDERS_HOME_PICTURES_SMARTPHONE[Smartphone]
DESKTOP_FOLDERS_HOME_PICTURES_SMARTPHONE --> DESKTOP_FOLDERS_HOME_PICTURES_SMARTPHONE_CAMERA[Camera]
DESKTOP_FOLDERS_HOME_PICTURES_SMARTPHONE --> DESKTOP_FOLDERS_HOME_PICTURES_SMARTPHONE_ADOBELIGHTROOM[AdobeLightroom]
DESKTOP_FOLDERS_HOME_PICTURES -. Manual move .-> DESKTOP_FOLDERS_HOME_PICTURES_GALLERY[gallery.benpro.fr]
CAMERA{{Camera SD Card}} -. Manual move .-> DESKTOP_FOLDERS_HOME_PICTURES_SDCARD
DESKTOP_FOLDERS_HOME_PICTURES --> DESKTOP_FOLDERS_HOME_PICTURES_TABLET[Tablet]
DESKTOP_FOLDERS_HOME_PICTURES_TABLET --> DESKTOP_FOLDERS_HOME_PICTURES_TABLET_ADOBELIGHTROOM[AdobeLightroom]
DESKTOP_FOLDERS_HOME_PICTURES --> DESKTOP_FOLDERS_HOME_PICTURES_SDCARD[CameraSDCard]
DESKTOP_FOLDERS_HOME_PICTURES_SDCARD -. Manual upload .-> ADOBECLOUD[(Adobe Cloud)]
DESKTOP_FOLDERS_HOME --> DESKTOP_FOLDERS_HOME_DOCUMENTS[Documents]
DESKTOP_FOLDERS_HOME_DOCUMENTS --> DESKTOP_FOLDERS_HOME_DOCUMENTS_KEEPASS[KeePass]
DESKTOP_FOLDERS_HOME --> DESKTOP_FOLDERS_HOME_VIDEOS[Videos]
DESKTOP_FOLDERS_HOME_VIDEOS --> DESKTOP_FOLDERS_HOME_VIDEOS_SHARED[Shared]
end
subgraph Tablet
TABLET[Tablet] --> TABLET_FOLDERS{Folders}
TABLET_FOLDERS --> TABLET_FOLDERS_PICTURES[Pictures]
TABLET_FOLDERS_PICTURES --> TABLET_FOLDERS_PICTURES_ADOBELIGHTROOM[AdobeLightroom]
TABLET_FOLDERS --> TABLET_FOLDERS_MOVIES[Movies]
TABLET_FOLDERS_MOVIES --> TABLET_FOLDERS_MOVIES_SHARED[Shared]
end
SMARTPHONE_FOLDERS_DCIM_CAMERA <--> DESKTOP_FOLDERS_HOME_PICTURES_SMARTPHONE_CAMERA
SMARTPHONE_FOLDERS_PICTURES_ADOBELIGHTROOM <--> DESKTOP_FOLDERS_HOME_PICTURES_SMARTPHONE_ADOBELIGHTROOM
TABLET_FOLDERS_PICTURES_ADOBELIGHTROOM <--> DESKTOP_FOLDERS_HOME_PICTURES_TABLET_ADOBELIGHTROOM
DESKTOP_FOLDERS_HOME_DOCUMENTS_KEEPASS --> |Send only| SMARTPHONE_FOLDERS_DOCUMENTS_KEEPASS
DESKTOP_FOLDERS_HOME_VIDEOS_SHARED --> |Send only| TABLET_FOLDERS_MOVIES_SHARED
```