-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
96 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ vars: | |
MACHINE_ROOT_DIR: "{{.ROOT_DIR}}/.taskfiles/Machine" | ||
FILES_DIR: "{{.MACHINE_ROOT_DIR}}/files" | ||
SCRIPTS_DIR: "{{.MACHINE_ROOT_DIR}}/scripts" | ||
# renovate: depName=AdguardTeam/AdGuardHome datasource=github-releases | ||
ADGUARD_VERSION: v0.107.57 | ||
|
||
tasks: | ||
fetch-certificate: | ||
|
@@ -64,18 +66,6 @@ tasks: | |
- ssh [email protected] chmod u+rw,g-wx,o-wx /etc/chrony/conf.d/0-ntp-allow.conf | ||
- ssh [email protected] systemctl restart chrony | ||
|
||
update-titan-certificate: | ||
desc: Update Titan certificate | ||
cmds: | ||
- ssh [email protected] mkdir -p /var/lib/gatus | ||
- scp "{{.FILES_DIR}}/certificates/certificate.crt" [email protected]:/var/lib/gatus/certificate.crt | ||
- ssh [email protected] chown gatus:gatus /var/lib/gatus/certificate.crt | ||
- ssh [email protected] chmod u+rw,g-wx,o-wx /var/lib/gatus/certificate.crt | ||
- scp "{{.FILES_DIR}}/certificates/certificate.key" [email protected]:/var/lib/gatus/certificate.key | ||
- ssh [email protected] chown gatus:gatus /var/lib/gatus/certificate.key | ||
- ssh [email protected] chmod u+rw,g-wx,o-wx /var/lib/gatus/certificate.key | ||
- ssh [email protected] systemctl restart gatus | ||
|
||
update-styx-certificate: | ||
desc: Update Styx certificate | ||
cmds: | ||
|
@@ -103,13 +93,24 @@ tasks: | |
- ssh root@{{.MACHINE}}.zinn.tech systemctl restart unifi-core | ||
|
||
install-artemis-adguard: | ||
desc: Install AdGuardHome | ||
desc: Install Artemis AdGuardHome | ||
vars: | ||
# renovate: depName=AdguardTeam/AdGuardHome datasource=github-releases | ||
ADGUARD_VERSION: v0.107.57 | ||
cmds: | ||
- ssh [email protected] wget -q https://github.com/AdguardTeam/AdGuardHome/releases/download/{{.ADGUARD_VERSION}}/AdGuardHome_linux_arm64.tar.gz -O /opt/AdGuardHome_linux_arm64.tar.gz | ||
- ssh [email protected] 'cd /opt && tar xf AdGuardHome_linux_arm64.tar.gz' | ||
- ssh [email protected] 'cd /opt/AdGuardHome && ./AdGuardHome -s install' | ||
|
||
install-titan-adguard: | ||
desc: Install Titan AdGuardHome | ||
vars: | ||
# renovate: depName=AdguardTeam/AdGuardHome datasource=github-releases | ||
ADGUARD_VERSION: v0.107.57 | ||
cmds: | ||
- ssh [email protected] wget -q https://github.com/AdguardTeam/AdGuardHome/releases/download/{{.ADGUARD_VERSION}}/AdGuardHome_linux_amd64.tar.gz -O /opt/AdGuardHome_linux_amd64.tar.gz | ||
- ssh [email protected] 'cd /opt && tar xf AdGuardHome_linux_amd64.tar.gz' | ||
- ssh [email protected] 'cd /opt/AdGuardHome && ./AdGuardHome -s install' | ||
|
||
install-artemis-docker: | ||
desc: Install docker | ||
|
@@ -130,23 +131,47 @@ tasks: | |
- ssh [email protected] chmod -x /etc/cron.d/cloudflare-ddns | ||
|
||
restart-artemis-adguard: | ||
desc: Restart AdGuardHome | ||
desc: Restart Artemis AdGuardHome | ||
cmds: | ||
- ssh [email protected] systemctl restart AdGuardHome | ||
|
||
restart-titan-adguard: | ||
desc: Restart Titan AdGuardHome | ||
cmds: | ||
- ssh [email protected] systemctl restart AdGuardHome | ||
|
||
update-artemis-configuration: | ||
desc: Update Artemis configuration | ||
cmds: | ||
- task: update-artemis-adguard-configuration | ||
vars: | ||
machine_ip: 10.0.0.8 | ||
- task: update-artemis-gatus-configuration | ||
|
||
update-artemis-adguard-configuration: | ||
desc: Update Artemis AdGuardHome configuration | ||
requires: | ||
vars: | ||
- machine_ip | ||
cmds: | ||
- scp "{{.FILES_DIR}}/artemis/AdGuardHome.yaml" [email protected]:/opt/AdGuardHome/AdGuardHome.yaml | ||
- cat "{{.FILES_DIR}}/adguard/AdGuardHome.yaml" | sed -e "s/MACHINE_IP/{{.machine_ip}}/" > /tmp/AdGuardHome.yaml | ||
- scp /tmp/AdGuardHome.yaml [email protected]:/opt/AdGuardHome/AdGuardHome.yaml | ||
- rm /tmp/AdGuardHome.yaml | ||
- ssh [email protected] chmod og-rwx /opt/AdGuardHome/AdGuardHome.yaml | ||
- ssh [email protected] systemctl restart AdGuardHome | ||
|
||
update-titan-adguard-configuration: | ||
desc: Update Titan AdGuardHome configuration | ||
requires: | ||
vars: | ||
- machine_ip | ||
cmds: | ||
- cat "{{.FILES_DIR}}/adguard/AdGuardHome.yaml" | sed -e "s/MACHINE_IP/{{.machine_ip}}/" > /tmp/AdGuardHome.yaml | ||
- scp /tmp/AdGuardHome.yaml [email protected]:/opt/AdGuardHome/AdGuardHome.yaml | ||
- rm /tmp/AdGuardHome.yaml | ||
- ssh [email protected] chmod og-rwx /opt/AdGuardHome/AdGuardHome.yaml | ||
- ssh [email protected] systemctl restart AdGuardHome | ||
|
||
update-artemis-gatus-configuration: | ||
desc: Update Artemis AdGuardHome configuration | ||
cmds: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
kubernetes/main/apps/networking/external-services/external-adguard-titan.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: adguard-titan | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
port: 3000 | ||
targetPort: 3000 | ||
--- | ||
apiVersion: discovery.k8s.io/v1 | ||
kind: EndpointSlice | ||
metadata: | ||
name: adguard-titan | ||
labels: | ||
kubernetes.io/service-name: adguard-titan | ||
addressType: IPv4 | ||
ports: | ||
- name: http | ||
appProtocol: http | ||
protocol: TCP | ||
port: 3000 | ||
endpoints: | ||
- addresses: | ||
- "10.0.0.7" | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: &app adguard-titan | ||
labels: | ||
app.kubernetes.io/name: *app | ||
app.kubernetes.io/instance: *app | ||
spec: | ||
ingressClassName: internal-nginx | ||
rules: | ||
- host: adguard-titan.zinn.ca | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: *app | ||
port: | ||
number: 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters