From 98ea9b1f75599041f99d30bef60fd59789ecc275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S?= Date: Tue, 31 Aug 2021 13:25:40 +0000 Subject: [PATCH 1/9] Add Syncthing flowchart --- docs/Various/Infra.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/docs/Various/Infra.md b/docs/Various/Infra.md index 7fbc4eb..23ec05b 100644 --- a/docs/Various/Infra.md +++ b/docs/Various/Infra.md @@ -37,4 +37,47 @@ flowchart TD 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_PICTURES --> SMARTPHONE_FOLDERS_PICTURES_RAW[Raw] + 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)] + end + + subgraph Tablet + TABLET[Tablet] --> TABLET_FOLDERS{Folders} + TABLET_FOLDERS --> TABLET_FOLDERS_SDCARD[SD Card] + TABLET_FOLDERS_SDCARD --> TABLET_FOLDERS_SDCARD_PICTURES[Pictures] + TABLET_FOLDERS_SDCARD_PICTURES --> TABLET_FOLDERS_SDCARD_PICTURES_RAW[Raw] + TABLET_FOLDERS_SDCARD_PICTURES --> TABLET_FOLDERS_SDCARD_PICTURES_ADOBELIGHTROOM[AdobeLightroom] + end + + SMARTPHONE_FOLDERS_DCIM_CAMERA <--> DESKTOP_FOLDERS_HOME_PICTURES_SMARTPHONE_CAMERA + SMARTPHONE_FOLDERS_PICTURES_ADOBELIGHTROOM <--> DESKTOP_FOLDERS_HOME_PICTURES_SMARTPHONE_ADOBELIGHTROOM + SMARTPHONE_FOLDERS_PICTURES_RAW <--> TABLET_FOLDERS_SDCARD_PICTURES_RAW + TABLET_FOLDERS_SDCARD_PICTURES_ADOBELIGHTROOM <--> DESKTOP_FOLDERS_HOME_PICTURES_TABLET_ADOBELIGHTROOM ``` \ No newline at end of file From 2eec3e2e5cb589378ce41327164c1460f6575caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S?= Date: Wed, 1 Sep 2021 12:48:04 +0000 Subject: [PATCH 2/9] Add VPN port allocation --- docs/Various/Infra.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/Various/Infra.md b/docs/Various/Infra.md index 23ec05b..3416cd0 100644 --- a/docs/Various/Infra.md +++ b/docs/Various/Infra.md @@ -23,6 +23,22 @@ flowchart TD YOU[Curious visitor] --> INTERNET ``` +## VPN port allocation + +```mermaid +flowchart LR + + INTERNET[Internet] --> SSH[ssh.benpro.fr] + SSH --> MULLVAD + MULLVAD[Mullvad VPN\njp8-wireguard] --> JPTYO{JP-TYO} + JPTYO --> PORT_54902[Port 54902] + JPTYO --> PORT_56754[Port 56754] + PORT_54902 --> LXD[lxd.home.arpa] + PORT_56754 --> LXD + LXD --> |Port 54902| GIT[Container git:22] + LXD --> |Port 56754| CHOWME[Container chownme:22] +``` + ## Backups flowchart ```mermaid From edbd3a6db91ca4f7e60d367a58d28a62f6c76746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S?= Date: Thu, 2 Sep 2021 11:15:14 +0000 Subject: [PATCH 3/9] Removed unsed Raw sync --- docs/Various/Infra.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/Various/Infra.md b/docs/Various/Infra.md index 3416cd0..fce661f 100644 --- a/docs/Various/Infra.md +++ b/docs/Various/Infra.md @@ -66,7 +66,6 @@ flowchart LR SMARTPHONE_FOLDERS --> SMARTPHONE_FOLDERS_PICTURES[Pictures] SMARTPHONE_FOLDERS_DCIM --> SMARTPHONE_FOLDERS_DCIM_CAMERA[Camera] SMARTPHONE_FOLDERS_PICTURES --> SMARTPHONE_FOLDERS_PICTURES_ADOBELIGHTROOM[AdobeLightroom] - SMARTPHONE_FOLDERS_PICTURES --> SMARTPHONE_FOLDERS_PICTURES_RAW[Raw] end subgraph Desktop @@ -88,12 +87,10 @@ flowchart LR TABLET[Tablet] --> TABLET_FOLDERS{Folders} TABLET_FOLDERS --> TABLET_FOLDERS_SDCARD[SD Card] TABLET_FOLDERS_SDCARD --> TABLET_FOLDERS_SDCARD_PICTURES[Pictures] - TABLET_FOLDERS_SDCARD_PICTURES --> TABLET_FOLDERS_SDCARD_PICTURES_RAW[Raw] TABLET_FOLDERS_SDCARD_PICTURES --> TABLET_FOLDERS_SDCARD_PICTURES_ADOBELIGHTROOM[AdobeLightroom] end SMARTPHONE_FOLDERS_DCIM_CAMERA <--> DESKTOP_FOLDERS_HOME_PICTURES_SMARTPHONE_CAMERA SMARTPHONE_FOLDERS_PICTURES_ADOBELIGHTROOM <--> DESKTOP_FOLDERS_HOME_PICTURES_SMARTPHONE_ADOBELIGHTROOM - SMARTPHONE_FOLDERS_PICTURES_RAW <--> TABLET_FOLDERS_SDCARD_PICTURES_RAW TABLET_FOLDERS_SDCARD_PICTURES_ADOBELIGHTROOM <--> DESKTOP_FOLDERS_HOME_PICTURES_TABLET_ADOBELIGHTROOM ``` \ No newline at end of file From 9d6c4add12992656b4c2103bdc0886996f364fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S?= Date: Fri, 3 Sep 2021 05:03:53 +0000 Subject: [PATCH 4/9] Added more limits example --- docs/Howtos/HowtoLXD.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/Howtos/HowtoLXD.md b/docs/Howtos/HowtoLXD.md index 56c3f5f..d64b067 100644 --- a/docs/Howtos/HowtoLXD.md +++ b/docs/Howtos/HowtoLXD.md @@ -6,9 +6,19 @@ $ lxc info $ lxc config edit $ lxc config show $ lxc exec bash +# Some limits $ lxc config set limits.memory 512MB $ lxc config set limits.cpu 2 +$ lxc config set limits.cpu.allowance 50% +$ lxc config set limits.memory.swap false +$ lxc config device set root limits.read 30MB +$ lxc config device set root.limits.write 10MB +$ lxc config device set root limits.read 20Iops +$ lxc config device set root limits.write 10Iops $ lxc config device set root size 20GB +$ lxc config device override root size=20GB +$ lxc profile device set default eth0 limits.ingress 100Mbit +$ lxc profile device set default eth0 limits.egress 100Mbit $ lxc launch images:debian/11 $ lxc config set environment.LC_ALL=en_US.UTF-8 $ lxc list From 1bf1d1308178ddf52bb890e0dfb7aeceb7357ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S?= Date: Fri, 3 Sep 2021 05:04:12 +0000 Subject: [PATCH 5/9] Removed SDcard on Tablet --- docs/Various/Infra.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/Various/Infra.md b/docs/Various/Infra.md index fce661f..6cc985a 100644 --- a/docs/Various/Infra.md +++ b/docs/Various/Infra.md @@ -85,12 +85,11 @@ flowchart LR subgraph Tablet TABLET[Tablet] --> TABLET_FOLDERS{Folders} - TABLET_FOLDERS --> TABLET_FOLDERS_SDCARD[SD Card] - TABLET_FOLDERS_SDCARD --> TABLET_FOLDERS_SDCARD_PICTURES[Pictures] - TABLET_FOLDERS_SDCARD_PICTURES --> TABLET_FOLDERS_SDCARD_PICTURES_ADOBELIGHTROOM[AdobeLightroom] + TABLET_FOLDERS --> TABLET_FOLDERS_PICTURES[Pictures] + TABLET_FOLDERS_PICTURES --> TABLET_FOLDERS_PICTURES_ADOBELIGHTROOM[AdobeLightroom] end SMARTPHONE_FOLDERS_DCIM_CAMERA <--> DESKTOP_FOLDERS_HOME_PICTURES_SMARTPHONE_CAMERA SMARTPHONE_FOLDERS_PICTURES_ADOBELIGHTROOM <--> DESKTOP_FOLDERS_HOME_PICTURES_SMARTPHONE_ADOBELIGHTROOM - TABLET_FOLDERS_SDCARD_PICTURES_ADOBELIGHTROOM <--> DESKTOP_FOLDERS_HOME_PICTURES_TABLET_ADOBELIGHTROOM + TABLET_FOLDERS_PICTURES_ADOBELIGHTROOM <--> DESKTOP_FOLDERS_HOME_PICTURES_TABLET_ADOBELIGHTROOM ``` \ No newline at end of file From 3276a4ab6007d68a0dd84571c1d96e8eac14bb66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S?= Date: Sat, 4 Sep 2021 02:46:32 +0000 Subject: [PATCH 6/9] Remove one step for VPN schema --- docs/Various/Infra.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/Various/Infra.md b/docs/Various/Infra.md index 6cc985a..271ea3a 100644 --- a/docs/Various/Infra.md +++ b/docs/Various/Infra.md @@ -28,9 +28,7 @@ flowchart TD ```mermaid flowchart LR - INTERNET[Internet] --> SSH[ssh.benpro.fr] - SSH --> MULLVAD - MULLVAD[Mullvad VPN\njp8-wireguard] --> JPTYO{JP-TYO} + INTERNET[Internet] --> MULLVAD[Mullvad VPN\nvpn-jp8.benpro.fr] --> JPTYO{JP-TYO} JPTYO --> PORT_54902[Port 54902] JPTYO --> PORT_56754[Port 56754] PORT_54902 --> LXD[lxd.home.arpa] From cfae1b2c4cd75b4bde942bec4aca439ad9cf881a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S?= Date: Sat, 4 Sep 2021 08:54:52 +0000 Subject: [PATCH 7/9] Add port isolation --- docs/Howtos/HowtoLXD.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/Howtos/HowtoLXD.md b/docs/Howtos/HowtoLXD.md index d64b067..4ba2d43 100644 --- a/docs/Howtos/HowtoLXD.md +++ b/docs/Howtos/HowtoLXD.md @@ -12,13 +12,15 @@ $ lxc config set limits.cpu 2 $ lxc config set limits.cpu.allowance 50% $ lxc config set limits.memory.swap false $ lxc config device set root limits.read 30MB -$ lxc config device set root.limits.write 10MB +$ lxc config device set root limits.write 10MB $ lxc config device set root limits.read 20Iops $ lxc config device set root limits.write 10Iops -$ lxc config device set root size 20GB $ lxc config device override root size=20GB $ lxc profile device set default eth0 limits.ingress 100Mbit $ lxc profile device set default eth0 limits.egress 100Mbit +# Port isolation make the container unable to see other containers +$ lxc config device override eth0 security.port_isolation=true +$ lxc $ lxc launch images:debian/11 $ lxc config set environment.LC_ALL=en_US.UTF-8 $ lxc list From b94c46466a6b8825ca6419e414c9b62f8c46aeb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S?= Date: Sat, 4 Sep 2021 09:06:16 +0000 Subject: [PATCH 8/9] Precision on port_isolation --- docs/Howtos/HowtoLXD.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/Howtos/HowtoLXD.md b/docs/Howtos/HowtoLXD.md index 4ba2d43..de2a16f 100644 --- a/docs/Howtos/HowtoLXD.md +++ b/docs/Howtos/HowtoLXD.md @@ -18,8 +18,9 @@ $ lxc config device set root limits.write 10Iops $ lxc config device override root size=20GB $ lxc profile device set default eth0 limits.ingress 100Mbit $ lxc profile device set default eth0 limits.egress 100Mbit -# Port isolation make the container unable to see other containers -$ lxc config device override eth0 security.port_isolation=true +# Port isolation make the container unable to see other containers that are also in port_isolation mode +$ lxc config device set eth0 security.port_isolation=true +$ lxc profile device set default eth0 security.port_isolation=true $ lxc $ lxc launch images:debian/11 $ lxc config set environment.LC_ALL=en_US.UTF-8 From 2890535e8470646441e0f786c73e2b31f342e600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S?= Date: Sat, 4 Sep 2021 10:23:27 +0000 Subject: [PATCH 9/9] Add device add disk with block device --- docs/Howtos/HowtoLXD.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Howtos/HowtoLXD.md b/docs/Howtos/HowtoLXD.md index de2a16f..6dd8077 100644 --- a/docs/Howtos/HowtoLXD.md +++ b/docs/Howtos/HowtoLXD.md @@ -36,6 +36,7 @@ $ #Create a images volume in the local (default) pool (ZFS) and use it for image $ lxc storage volume create local images $ lxc config set storage.images_volume local/images $ lxc config device add $containerName $deviceName disk source=/home/foo path=/home/foo +$ lxc config device add $containerName $deviceName disk source=/dev/ path=/home/foo ``` Path: