In this video, we demo how to create a #Pihole Docker Ad Blocker with #Ansible and #Terraform. We use the concepts of Infrastructure as Code with Ansible and Terraform to deploy Pihole Docker in a vSphere environment. All the source code is stored in GitLab. Also, GitLab is used as a CI/CD pipeline. Finally, docker-compose is used to run the Pihole Docker application.
I also wrote a blog post that goes with this Video ► https://tekanaid.com/posts/create-a-p...
What is Pihole Docker?
Pihole is an open-source software that is used as an ad blocker. It's a DNS sinkhole for ads and can be run on multiple flavours of Linux. The reason it has Pi in the name is that it was originally intended to run on a Raspberry Pi. You can also install pihole inside of a docker container. We will refer to this setup as a Pihole Docker setup for this blog post.
I've been using Pihole Docker for over two years now and absolutely love it. It not only blocks ads on websites, but it can also block ads in some mobile apps. You also have the option to add domains to whitelists or blacklists. Finally, you could also run your DCHP and DNS servers directly on the Pihole Docker.
My Pihole has been running on an old Ubuntu 16.04 VM and it was time to upgrade the OS. However, I didn't use Infrastructure as Code principles when I built it the first time. So the motivation for this blog post is to recreate Pihole Docker on a Ubuntu 20.04 VM in vSphere. This time around, we will use Infrastructure as Code principles. This will make it much easier to run upgrades and updates next time.
Here are some of the tools used to build our Pihole Docker:
vSphere
Terraform Cloud
GitLab
Ansible
Docker and docker-compose
Pihole Docker
▬▬▬▬▬▬ T I M E S T A M P S ⏰ ▬▬▬▬▬▬
00:00 - Introduction
02:00 - Workflow Whiteboard
05:05 - Run Demo
06:44 - Pihole Docker Configuration Walk-through
09:18 - Repo Folder Structure
10:27 - GitLab CI/CD Pipeline Config
18:29 - View Demo Results
19:30 - Update the Pihole Docker Image Demo
21:57 - Terraform Config
26:00 - Ansible Config
30:10 - Docker-compose config
33:37 - Pihole Raspberry Pi and Synology NAS
35:29 - Demo Results After Version Upgrade
36:34 - Conclusion
▬▬▬▬▬▬▬▬▬ Courses 🎓 ▬▬▬▬▬▬▬▬
TeKanAid Academy Subscription ► https://bit.ly/subscription-premium
HashiCorp Vault 101 - Certified Vault Associate ► https://bit.ly/hc-vault-101
▬▬▬▬▬▬▬▬ Useful Links 🛠 ▬▬▬▬▬▬▬
Get the code ► https://tekanaid.com/posts/create-a-p...
Blog Post Associated with this Video ► https://tekanaid.com/posts/create-a-p...
HashiCorp Packer to Build a Ubuntu 20.04 Image Template in VMware Blog Post ► https://tekanaid.com/posts/hashicorp-...
Pihole Official Page ► https://pi-hole.net/
▬▬▬▬▬▬▬▬ Community 🌎 ▬▬▬▬▬▬▬▬▬
TeKanAid Community Forum ► https://tekanaid.com/community
▬▬▬▬▬▬▬▬ Connect 👋 ▬▬▬▬▬▬▬▬▬
TeKanAid University ► https://tekanaid.com/courses
Website ► https://bit.ly/TeKanAid_Website
Facebook Page ► https://bit.ly/TeKanAid_Facebook
Don't forget to subscribe ► https://bit.ly/TeKanAid_YouTube_Subsc...
MEDIUM ► https://bit.ly/Sam_Medium
TWITTER TeKanAid ► https://bit.ly/TeKanAid_Twitter
TWITTER Sam ► https://bit.ly/Sam_Twitter
LINKEDIN TeKanAid ► https://bit.ly/TeKanAid_LinkedIn
LINKEDIN Sam ► https://bit.ly/Sam_linkedin