diff --git a/WORKSPACE b/WORKSPACE index b402ee7..e7b9fbf 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -41,9 +41,13 @@ git_repository( name = "rules_python", remote = "https://github.com/bazelbuild/rules_python.git", # tag = "0.4.0", - commit = "693a1587baf055979493565933f8f40225c00c6d", + commit = "5f51a4451b478c5fed491614756d16745682fd7c", ) +load("@rules_python//python:repositories.bzl", "py_repositories") + +py_repositories() + register_toolchains("//tools/python:python3_toolchain") # pip package pinnings need to be initialized. @@ -62,14 +66,14 @@ load("@arrdem_source_pypi//:requirements.bzl", "install_deps") # Call it to define repos for your requirements. install_deps() -# git_repository( -# name = "rules_zapp", -# remote = "https://git.arrdem.com/arrdem/rules_zapp.git", -# commit = "961be891e5cff539e14f2050d5cd9e82845ce0f2", -# # tag = "0.1.2", -# ) - -local_repository( - name = "rules_zapp", - path = "/home/arrdem/Documents/hobby/programming/rules_zapp", +git_repository( + name = "rules_zapp", + remote = "https://git.arrdem.com/arrdem/rules_zapp.git", + commit = "961be891e5cff539e14f2050d5cd9e82845ce0f2", + # tag = "0.1.2", ) + +# local_repository( +# name = "rules_zapp", +# path = "/home/arrdem/Documents/hobby/programming/rules_zapp", +# ) diff --git a/projects/gandi/BUILD.bazel b/projects/gandi/BUILD.bazel index e887cbb..ea754a3 100644 --- a/projects/gandi/BUILD.bazel +++ b/projects/gandi/BUILD.bazel @@ -4,7 +4,7 @@ py_library( name = "gandi", srcs = glob(["src/gandi/client.py"]), imports = [ - "src/python", + "src", ], deps = [ py_requirement("requests"), diff --git a/projects/public_dns/config.yml.in b/projects/public_dns/config.yml.in new file mode 100644 index 0000000..8d743d6 --- /dev/null +++ b/projects/public_dns/config.yml.in @@ -0,0 +1,34 @@ +--- +gandi: + key: "op://TireFire Heavy Industries/Gandi API key/credential" + +meraki: + key: "op://TireFire Heavy Industries/Meraki API/credential" + organization: "op://TireFire Heavy Industries/Meraki API/organization" + network: "op://TireFire Heavy Industries/Meraki API/network" + router_serial: "op://TireFire Heavy Industries/Meraki API/router_serial" + +tasks: + # My zones + - template: arrdem.com.j2 + zones: + - arrdem.com + - arrdem.me + - reidmckenzie.com + + - paren.party + + # Parked domains + - template: park.j2 + zones: [] + + - template: tirefireind.us.j2 + zones: + - tirefireind.us + - tirefire.industries + +bindings: + ttl: 300 # 5min TTL on records + # local: + # public_v4s: + # - 174.51.247.120 diff --git a/projects/public_dns/src/resources/zonefiles/tirefireind.us.j2 b/projects/public_dns/src/resources/zonefiles/tirefireind.us.j2 index 37c492a..8e8441a 100644 --- a/projects/public_dns/src/resources/zonefiles/tirefireind.us.j2 +++ b/projects/public_dns/src/resources/zonefiles/tirefireind.us.j2 @@ -22,6 +22,8 @@ relay {{ ttl }} IN A {{ link }} pxe {{ ttl }} IN A {{ link }} vpn {{ ttl }} IN A {{ link }} hass {{ ttl }} IN A {{ link }} +k8s {{ ttl }} IN A {{ link }} +git {{ ttl }} IN A {{ link }} {% endfor %} # Secrets service diff --git a/projects/public_dns/update.sh b/projects/public_dns/update.sh index f44fc4b..ebcb836 100755 --- a/projects/public_dns/update.sh +++ b/projects/public_dns/update.sh @@ -2,6 +2,8 @@ cd "$(dirname $(realpath "$0"))" -exec bazel run :updater -- \ +op inject --in-file ./config.yml.in --out-file ./config.yml + +exec bazel run //projects/public_dns:updater -- \ --config $(realpath ./config.yml) \ --templates $(realpath src/resources/zonefiles) diff --git a/tools/python/pythonshim b/tools/python/pythonshim index 3c96de3..20da612 100755 --- a/tools/python/pythonshim +++ b/tools/python/pythonshim @@ -4,7 +4,7 @@ # But ... that's exactly what we want to do. # So this script exists to find a 'compliant' Python install and use that. -PYTHONREV="3.11" +PYTHONREV="3.12" CMD="python${PYTHONREV}" if [ -x "$(command -v "$CMD")" ]; then diff --git a/tools/python/requirements.in b/tools/python/requirements.in index c88d77b..4f04805 100644 --- a/tools/python/requirements.in +++ b/tools/python/requirements.in @@ -55,3 +55,4 @@ yamllint yaspin pytimeparse git+https://github.com/arrdem/jaraco.text.git@0dd8d0b25a93c3fad896f3a92d11caff61ff273d#egg=jaraco.text +onepasswordconnectsdk