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

preview_player
Показать описание
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.

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:

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
Рекомендации по теме
Комментарии
Автор

Hi. Great video. Would be good to automate the tasks using Ansible local provisioner within packer config.

marsamuk
Автор

Thank you very much for this video, very informative and to the point, exactly what i was looking for.

legooos