HashiCorp Packer Terraform and Ansible to Set Up Jenkins

preview_player
Показать описание
This video discusses #HashiCorp #Packer #Terraform and #Ansible to set up #Jenkins for CI/CD in Azure. This is the second video in a new video series called End-to-End Infrastructure and Application Deployment. The goal of this series is to learn best practices around the automation of infrastructure provisioning and application deployment. We cover the concepts of Infrastructure as Code, CI/CD, secrets management, dynamic secrets, the secret zero problem, service mesh, and more. Our cloud of choice is Azure for this series. Our focus for this video is on the second step and that is to set up our CI/CD pipeline with Jenkins. This is done by following the steps below:

1. Use Packer to build an Azure image that has Docker installed.
2. Create a Docker container that contains Jenkins, Vault, Terraform, and Ansible.
3. Use HashiCorp Vault to retrieve Azure credentials to use for Terraform
4. Run Terraform to build a Jenkins VM in Azure based on the Packer image.
5. Use Ansible to configure the Jenkins VM by running the Docker container.

I've also written a blog post that goes with this video:

▬▬▬▬▬▬ T I M E S T A M P S ⏰ ▬▬▬▬▬▬
00:00 - Introduction
01:50 - Agenda
02:44 - Overall Goal
04:17 - Topics To Learn
05:26 - Set Up Jenkins Diagram
07:38 - Folder Structure
09:08 - Packer Demo
18:44 - Terraform Demo
20:56 - Retrieve Azure Creds from Vault
24:13 - Terraform Code Walk-through
31:14 - Ansible Demo
34:23 - Ansible Code Walk-through
36:39 - Dockerfile Walk-through
42:39 - Check Jenkins Machine
43:15 - Recap

▬▬▬▬ Some tools used in this series ▬▬▬▬
- HashiCorp Packer
- HashiCorp Terraform
- HashiCorp Vault
- HashiCorp Consul
- Jenkins
- Ansible
- Microsoft Azure

▬▬▬▬▬ Topics to Learn in this series ▬▬▬▬▬
1. Vault Azure Secrets Engine
2. Packer Images in Azure
3. Terraform Building VMs in Azure based on Packer Images
4. Ansible to Configure an Azure VM
5. Vault Secure Introduction
6. Vault App Role
7. Vault Dynamic Database Secrets for MongoDB
8. Vault Transit Secrets Engine
9. Advanced CI/CD Pipeline Workflow using GitHub(VCS), Jenkins(CI/CD), Terraform(IaC), Ansible(Config Mgmt), Vault(Secrets Mgmt)
10. Consul Service Mesh

▬▬▬▬▬▬▬▬▬ Courses 🎓 ▬▬▬▬▬▬▬▬
🎟️ Get 15% off of my Terraform 101 Course with this coupon ► YOUTUBE15TF101
🎟️ Get 15% off of my Vault 101 Course with this coupon ► YOUTUBE15VAULT101

▬▬▬▬▬▬▬▬ Useful Links 🛠 ▬▬▬▬▬▬▬

▬▬▬▬▬▬▬▬ Community 🌎 ▬▬▬▬▬▬▬▬▬

▬▬▬▬▬▬▬▬ Connect 👋 ▬▬▬▬▬▬▬▬▬
Рекомендации по теме
Комментарии
Автор

Would be great to cover Base Image -> App Image workflow and structure. Plus image hardening and cleanup.

Oswee
Автор

Thanks for this great tutorial. Very cool and helpful.
I would like to know something that I seem to miss and can't find an answer for.
All demos and tutorials (that I've seen) create new network resources for the provisioned machine.
What if I already have existing network, network interface, network security (the default) and resource groups (also for the machines themselves) and I don't want to create new such resources, but to use the ones I have, which I can hopefully provide either hard coded or as variables?
I would love an answer to that. It's a mystery to me and I'd love a solution 😃
Thank you!

duridium
Автор

Let's say a lab spin-up where we want to name and domain-join windows servers.
What are the best practices
How would you achieve that to be fully automated using ESXI - Packer and Terraform

helloworld