Creating Amazon Machine Image (AMI) using Packer (HCL) and Ansible

  Рет қаралды 5,796

ListenToLearn

ListenToLearn

Күн бұрын

Пікірлер: 18
@MuhammadHamza-cu4ot
@MuhammadHamza-cu4ot 3 жыл бұрын
such a good and helpful video. Thanks
@listentolearn2363
@listentolearn2363 3 жыл бұрын
You're very welcome! Thanks for your support!
@MuhammadHamza-cu4ot
@MuhammadHamza-cu4ot 3 жыл бұрын
@@listentolearn2363 i am facing error can you share you mail ?
@listentolearn2363
@listentolearn2363 3 жыл бұрын
sorry, I dont monitor the mail box. Do you mind sharing your error message here or in the git hub comments please?
@harihanu1308
@harihanu1308 2 жыл бұрын
Wow Such an awesome👌 video...I like the video, could you please do more videos on this and terraform.
@listentolearn2363
@listentolearn2363 2 жыл бұрын
Thank you :) sure, will do
@marsamuk
@marsamuk Жыл бұрын
Hi. Do you have Azure equivalent video? Where’s the Ansible controller installed? Is Ansible installed on ami? If not can it be installed on ami before running the scripts? Thanks
@listentolearn2363
@listentolearn2363 Жыл бұрын
Hi Maz, The Ansible Controller is installed in my local machine and not on the ami. Its not required to install ansible in the ami for this example as the packer uses ansible from our local machine to install stuff into a temporary VM before creating an ami out of it. I dont have an Azure equivalent video yet. Thanks for your interest.
@SamarthRawat
@SamarthRawat Жыл бұрын
@listentolearn great video. I have a doubt, i tried to do this on a ec2 instance, i installed ansible and packer on it and gave the necessary inputs in the variable.hcl.pkr file. yet when i run < packer build . > command, it gets stuck on Waiting to ssh into the instance. What can I do.
@listentolearn2363
@listentolearn2363 Жыл бұрын
Hi Samrath, thanks. Ensure that you allow port 22 inbound access in your security group from local ip.
@gangster441
@gangster441 2 жыл бұрын
Great video. I am trying to create a hardened linux image. I have an ansible collection which has two roles. These must be executed as a root user. In order to bake these roles into an image, what other parameters do I need to include in packer under ansible provisioner?
@alexandergiaquinto7263
@alexandergiaquinto7263 3 жыл бұрын
Is there a way to specifiy a profile(aws credentials, access keys etc.) and a source_ami_filter(to list virtualization-type, name, and root-device-type)?
@listentolearn2363
@listentolearn2363 3 жыл бұрын
Sure. You can define "access_key" and "secret_key" as input variables and pass them as parameters to your source. Instead of using the base ami id in the source, you can user "source_ami_filter". Sample for filtering ubuntu 18.04 image - source_ami_filter { filters = { virtualization-type = "hvm" architecture = "x86_64" name = "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*" root-device-type = "ebs" } owners = ["099720109477"] most_recent = true } Thanks.
@alexandergiaquinto7263
@alexandergiaquinto7263 3 жыл бұрын
@@listentolearn2363 Thank you!!! Btw this video was a huge help really amazing stuff. One other question sorry to bombard you. So obviously you are building an Ubuntu AMI, how would you do the same thing you are doing here but with other linux distros? Say Debian for example.
@alexandergiaquinto7263
@alexandergiaquinto7263 3 жыл бұрын
Actually figured it out, thank you again for the help!
@listentolearn2363
@listentolearn2363 3 жыл бұрын
Awesome! glad you figured it out :) and thank you for all your support! Writing down the steps for the benefit of others following the channel - We could list the images using aws cli and use the parameters as filters in source_amii_filter aws ec2 describe-images --region eu-north-1 --owners 136693071363 --query 'sort_by(Images, &CreationDate)[].[CreationDate,Name,ImageId]' --output table references: wiki.debian.org/Amazon/EC2/HowTo/awscli cloud-images.ubuntu.com/locator/ec2/ access.redhat.com/solutions/15356 docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html
How to host a static website using S3 with custom Route53 domain?
8:22
Automation with Hashicorp Packer #5: Building Your First AMI
16:16
Sanjeev Thiyagarajan
Рет қаралды 42 М.
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Hashicorp packer to create AWS AMI
16:20
e2e Solution Architect
Рет қаралды 9 М.
Intro to Packer with AWS
26:01
Sam Meech-Ward
Рет қаралды 16 М.
Amazon MQ (RabbitMQ) | Publishing messages to lambda
11:22
ListenToLearn
Рет қаралды 3,1 М.
Elastic Kubernetes Service | Application Load Balancing on EKS
10:21
Packer - Ansible - Terraform Practical Session
9:18
Pavan Kumar Aleti
Рет қаралды 13 М.
Automation with Hashicorp Packer #1: Intro mutable vs Immutable infrastructure
9:15
“Don’t stop the chances.”
00:44
ISSEI / いっせい
Рет қаралды 62 МЛН