diff --git a/.gitignore b/.gitignore index a70ad60..7f5cc86 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ devenv.local.nix # pre-commit .pre-commit-config.yaml +# Terraform +*.tfvars +.terraform \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..969d736 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python Debugger: Current File", + "type": "debugpy", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal", + "justMyCode": false + } + ] +} \ No newline at end of file diff --git a/devenv.nix b/devenv.nix index 7f2a433..b794745 100644 --- a/devenv.nix +++ b/devenv.nix @@ -6,8 +6,13 @@ pkgs.kubectl pkgs.kubernetes-helm pkgs.argocd + # pkgs.terraform ]; languages.nix.enable = true; + languages.terraform.enable = true; + languages.python.enable = true; + languages.python.venv.enable = true; + languages.python.venv.requirements = ./pydeps.requirements; pre-commit.hooks.shellcheck.enable = true; } diff --git a/os/routers/glmain/devices.yaml b/os/routers/glmain/devices.yaml new file mode 100644 index 0000000..d4ffa38 --- /dev/null +++ b/os/routers/glmain/devices.yaml @@ -0,0 +1,23 @@ +lab: + - mac: '3C:7C:3F:1E:B7:A0' + name: 'tnascore1' + - mac: '00:A0:98:3D:7C:C8' + name: 'kubedb' + - mac: 'B8:27:EB:F7:44:4E' + name: 'pi1' +k3s: + - mac: '7C:83:34:B8:7B:43' + name: 'bee1' + - mac: '68:1D:EF:26:B7:6C' + name: 'terry1' + - mac: '58:47:CA:71:D8:E6' + name: 'minisf1' + - mac: '00:A0:98:17:B2:64' + name: 'tnas1' +hub: + - mac: 'E4:5F:01:A2:8D:BC' + name: 'castle' + - mac: 'DC:A6:32:92:B2:79' + name: 'basement' + - mac: '4E:F6:9C:7C:56:33' + name: 'flic' \ No newline at end of file diff --git a/os/routers/glmain/dhcp-mapping b/os/routers/glmain/dhcp-mapping new file mode 100644 index 0000000..40cf4c0 --- /dev/null +++ b/os/routers/glmain/dhcp-mapping @@ -0,0 +1,105 @@ +config dnsmasq + option domainneeded '1' + option filterwin2k '0' + option localise_queries '1' + option rebind_localhost '1' + option local '/lan/' + option domain 'lan' + option expandhosts '1' + option nonegcache '0' + option authoritative '1' + option readethers '1' + option leasefile '/tmp/dhcp.leases' + option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto' + option nonwildcard '1' + option localservice '1' + option ednspacket_max '1232' + option rebind_protection '0' + +config dhcp 'lan' + option interface 'lan' + option start '100' + option limit '150' + option dhcpv4 'server' + option ra_slaac '1' + option force '1' + option dhcpv6 'disabled' + option ra 'disabled' + option leasetime '720m' + option ignore '0' + +config dhcp 'wan' + option interface 'wan' + option ignore '1' + +config odhcpd 'odhcpd' + option maindhcp '0' + option leasefile '/tmp/hosts/odhcpd' + option leasetrigger '/usr/sbin/odhcpd-update' + option loglevel '4' + +config domain + option name 'console.gl-inet.com' + option ip '10.0.0.2' + +config domain + option name 'console.gl-inet.com' + option ip '::ffff:10.0.0.2' + +config dhcp 'guest' + option interface 'guest' + option start '100' + option limit '150' + option leasetime '12h' + option dhcpv6 'disabled' + option ra 'disabled' + +config host + option mac '3C:7C:3F:1E:B7:A0' + option ip '10.0.10.1' + option tag 'LabTrueNas1' + +config host + option mac '7C:83:34:B8:7B:43' + option ip '10.0.10.2' + option tag 'LabK3sbee1' + +config host + option mac '00:A0:98:3D:7C:C8' + option ip '10.0.10.3' + option tag 'LabKubedb' + +config host + option mac 'B8:27:EB:F7:44:4E' + option ip '10.0.10.4' + option tag 'LabPi1' + +config host + option mac 'E4:5F:01:A2:8D:BC' + option ip '10.0.11.1' + option tag 'HubCastle' + +config host + option mac 'DC:A6:32:92:B2:79' + option ip '10.0.11.2' + option tag 'HubBasement' + +config host + option mac '68:1D:EF:26:B7:6C' + option ip '10.0.10.5' + option tag 'LabTerry1' + +config host + option mac '58:47:CA:71:D8:E6' + option ip '10.0.10.6' + option tag 'LabMinisf1' + +config host + option mac '00:A0:98:17:B2:64' + option ip '10.0.10.7' + option tag 'LabTruenas2' + +config host + option mac '4E:F6:9C:7C:56:33' + option ip '10.0.11.3' + option tag 'HubFlic' \ No newline at end of file diff --git a/os/routers/glmain/etc-hosts b/os/routers/glmain/etc-hosts new file mode 100644 index 0000000..1ced0d6 --- /dev/null +++ b/os/routers/glmain/etc-hosts @@ -0,0 +1,16 @@ +127.0.0.1 localhost + +::1 localhost ip6-localhost ip6-loopback +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters +10.0.0.1 gl.router.internal +10.0.10.1 tnas1.lab.internal +10.0.10.2 bee1.lab.internal +10.0.10.3 kubedb.lab.internal +10.0.10.4 pi1.lab.internal +10.0.10.5 terry1.lab.internal +10.0.10.6 minisf1.lab.internal +10.0.10.7 tnas2.lab.internal +10.0.11.1 castle.hub.internal castle.home.sosnovsky.ca +10.0.11.2 basement.hub.internal +10.0.11.3 flic.hub.internal diff --git a/pydeps.requirements b/pydeps.requirements new file mode 100644 index 0000000..e69de29