Hashicorp Packer: Build a Windows server in AWS and manage with Ansible

Опубликовано: 11 Август 2022
на канале: LondonIAC / Dennis McCarthy / Automation Engineer
5,301
71

I’m going to follow the steps from the Hashicorp website and create a customised Windows 2019 server and setup winrm, and set the Administrator password.

Once the AMI image is ready, were going to build an instance bases on our new AMI image, then get Ansible to setup the server for us.

Get your copy of the code from my GitHub page: https://github.com/dmccuk/packer_wind...

Don't forget to STAR the repo and give me a follow on GitHub.

This is the Hashicorp link. I'm made some updated to their code like the region in AWS. You can do the same one you clone the code.

Assumptions
I won’t be going into detail on these items:

I’m assuming your have already installed Packer!
I’m also assuming you know how to obtain and use the AWS access and Secret key from the AWS console.

Don’t worry if you don’t know how to do these steps. You can follow my previous video’s where I show you how to do this in details:

Build you’re first EC2 instance:    • Getting started with AWS EC2 | Hands-...  
Install Packer and create an AMI:    • Introduction to DevOps Tools - Instal...  

A quick note:
"I make these video’s for you. I hope they help with your learning so feel free to share any of them with your colleagues, on LinkedIn and other social media platforms. I'd really appreciate it if you could Subscribe so you see new content I post and please, like the video".

If you have question, pop them in the comments and I’ll reply as soon as I can. Now, lets get down to it.

Steps

Create the required packer files
Create the AMI image
Build a windows server from the new AMI
Login to test credentials
Open the FW for winrm-HTTPS
Test with Ansible win_ping to confirm connectivity
Now run my test playbook


Let me know how you get on!

Remember to remove all resources
Now that the demo has worked, I'm going to destroy my EC2 instance, the AMI image we created and the snapshot. This way I won't be charged by AWS for any of these resource sticking around. I advise you to do the same as you don't want to be spending any money you don't need to.

Follow my demo and I'll show you how to do all of the steps.

#packer #windows #ansible


Смотрите видео Hashicorp Packer: Build a Windows server in AWS and manage with Ansible онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь LondonIAC / Dennis McCarthy / Automation Engineer 11 Август 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 5,301 раз и оно понравилось 71 людям.