packer { | |
required_plugins { | |
amazon = { | |
version = ">= 1.1.1" | |
source = "github.com/hashicorp/amazon" | |
} | |
} | |
} | |
source "amazon-ebs" "ubuntu" { | |
access_key = "" | |
secret_key = "" | |
ami_name = "ramukaka" | |
instance_type = "t2.micro" | |
region = "ap-south-1" | |
source_ami_filter { | |
filters = { | |
name = "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20220912" | |
root-device-type = "ebs" | |
virtualization-type = "hvm" | |
} | |
most_recent = true | |
owners = ["099720109477"] | |
} | |
ssh_username = "ubuntu" | |
} | |
build { | |
name = "learn-packer" | |
sources = [ | |
"source.amazon-ebs.ubuntu" | |
] | |
provisioner "shell" { | |
environment_vars = [ | |
"FOO=hello world", | |
] | |
inline = [ | |
"echo Installing Redis", | |
"sleep 30", | |
"sudo apt-get update", | |
"sudo apt-get install -y redis-server", | |
"echo \"FOO is $FOO\" > example.txt", | |
] | |
} | |
} |
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND