add piole3

This commit is contained in:
Kameron Kenny 2025-02-24 21:10:39 -05:00
parent 0e68bb604b
commit f321286f96
5 changed files with 66 additions and 14 deletions

42
Jenkinsfile vendored
View File

@ -31,7 +31,8 @@ pipeline {
stage('Create contexts') {
steps {
sh 'docker context ls | grep pi502 || docker context create pi502 --docker "host=ssh://pi503.in.thelinuxpro.net"'
sh 'docker context ls | grep pi502 || docker context create pi502 --docker "host=ssh://pi502.in.thelinuxpro.net"'
sh 'docker context ls | grep pi503 || docker context create pi503 --docker "host=ssh://pi503.in.thelinuxpro.net"'
}
}
@ -53,10 +54,10 @@ pipeline {
stage('Start pihole1') {
steps {
script {
def status = sh(returnStatus: true, script: 'grep $(docker --context pi502 compose ps | tail -n1 | awk \'{ print $2 }\') docker-compose.yml')
def status = sh(returnStatus: true, script: 'grep $(docker compose ps | tail -n1 | awk \'{ print $2 }\') docker-compose.yml')
if (status != 0) {
sh 'docker compose up -d'
sh 'docker compose up pihole1 -d'
sh 'docker compose ps'
sh 'sleep 3'
sh 'docker compose logs'
@ -70,7 +71,7 @@ pipeline {
stage('Stop pihole2') {
steps {
script {
def status = sh(returnStatus: true, script: 'grep $(docker compose --context pi502 ps | tail -n1 | awk \'{ print $2 }\') docker-compose.yml')
def status = sh(returnStatus: true, script: 'grep $(docker --context pi502 compose ps | tail -n1 | awk \'{ print $2 }\') docker-compose.yml')
if (status != 0) {
sh 'docker compose --context pi502 down'
@ -88,7 +89,7 @@ pipeline {
def status = sh(returnStatus: true, script: 'grep $(docker --context pi502 compose ps | tail -n1 | awk \'{ print $2 }\') docker-compose.yml')
if (status != 0) {
sh 'docker --context pi502 compose up -d'
sh 'docker --context pi502 compose up pihole2 -d'
sh 'docker --context pi502 compose ps'
sh 'sleep 3'
sh 'docker --context pi502 compose logs'
@ -99,6 +100,37 @@ pipeline {
}
}
stage('Stop pihole3') {
steps {
script {
def status = sh(returnStatus: true, script: 'grep $(docker --context pi503 compose ps | tail -n1 | awk \'{ print $2 }\') docker-compose.yml')
if (status != 0) {
sh 'docker compose --context pi503 down'
sh 'sleep 5'
} else {
echo 'skip'
}
}
}
}
stage('Start pihole3') {
steps {
script {
def status = sh(returnStatus: true, script: 'grep $(docker --context pi503 compose ps | tail -n1 | awk \'{ print $2 }\') docker-compose.yml')
if (status != 0) {
sh 'docker --context pi503 compose up pihole3 -d'
sh 'docker --context pi503 compose ps'
sh 'sleep 3'
sh 'docker --context pi503 compose logs'
} else {
echo 'skip'
}
}
}
}
// stage('Integration Tests') {
// steps {
// sh 'mkdir -p test/results/integration'

View File

@ -10,13 +10,13 @@ services:
build:
dockerfile: Dockerfile
container_name: pihole1
image: docker-registry1.in.thelinuxpro.net:5000/tlp/pihole1:250120.0.1
image: docker-registry1.in.thelinuxpro.net:5000/tlp/pihole1:250224.0.1
restart: unless-stopped
environment:
TZ: 'America/Indianapolis'
WEBPASSWORD: 'forty6and2'
FTLCONF_LOCAL_IPV4: '10.200.53.241'
PIHOLE_DNS_: '8.8.8.8;8.8.4.4;10.200.53.254;10.200.254.254'
PIHOLE_DNS_: '8.8.8.8;8.8.4.4'
DHCP_ACTIVE: 'false'
VIRTUAL_HOST: 'dns1.in.thelinuxpro.net'
TEMPERATUREUNIT: 'f'
@ -30,13 +30,13 @@ services:
build:
dockerfile: Dockerfile
container_name: pihole2
image: docker-registry1.in.thelinuxpro.net:5000/tlp/pihole2:250120.0.1
image: docker-registry1.in.thelinuxpro.net:5000/tlp/pihole2:250224.0.1
restart: unless-stopped
environment:
TZ: 'America/Indianapolis'
WEBPASSWORD: 'forty6and2'
FTLCONF_LOCAL_IPV4: '10.200.53.242'
PIHOLE_DNS_: '8.8.8.8;8.8.4.4;10.200.53.254;10.200.254.254'
PIHOLE_DNS_: '8.8.8.8;8.8.4.4'
DHCP_ACTIVE: 'false'
VIRTUAL_HOST: 'dns2.in.thelinuxpro.net'
TEMPERATUREUNIT: 'f'
@ -45,3 +45,27 @@ services:
networks:
dns_local_net:
ipv4_address: 10.200.53.242
pihole3:
build:
dockerfile: Dockerfile
container_name: pihole3
image: docker-registry1.in.thelinuxpro.net:5000/tlp/pihole3:250224.0.1
restart: unless-stopped
environment:
TZ: 'America/Indianapolis'
WEBPASSWORD: 'forty6and2'
FTLCONF_LOCAL_IPV4: '10.200.53.243'
PIHOLE_DNS_: '8.8.8.8;8.8.4.4'
DHCP_ACTIVE: 'false'
VIRTUAL_HOST: 'dns3.in.thelinuxpro.net'
TEMPERATUREUNIT: 'f'
QUERY_LOGGING: 'true'
WEBTHEME: 'default-dark'
volumes:
- pihole-etc:/etc/pihole
- pihole-dnsmasq:/etc/dnsmasq.d
networks:
dns_local_net:
ipv4_address: 10.200.53.243

View File

@ -34,6 +34,4 @@ log-async
cache-size=10000
server=8.8.8.8
server=8.8.4.4
server=10.200.53.254
server=10.200.254.254
interface=eth0

View File

@ -1,4 +1,4 @@
#; Pi-hole FTL config file
#; Comments should start with #; to avoid issues with PHP and bash reading this file
MACVENDORDB=/macvendor.db
LOCAL_IPV4=10.200.53.241
# LOCAL_IPV4=10.200.53.241

View File

@ -4,8 +4,6 @@ WEBTHEME=default-dark
TEMPERATUREUNIT=F
PIHOLE_DNS_1=8.8.8.8
PIHOLE_DNS_2=8.8.4.4
PIHOLE_DNS_3=10.200.53.254
PIHOLE_DNS_4=10.200.254.254
PIHOLE_INTERFACE=eth0
QUERY_LOGGING=true
BLOCKING_ENABLED=true