From the course: Learning HashiCorp Packer
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Provision Hello World - Packer Tutorial
From the course: Learning HashiCorp Packer
Provision Hello World
- [Instructor] Provisioners customize the instance that Packer has launched from the builder section. And then it will take the image. Packer has support from multiple types of provisioners, from the simple shell command all the way up to running full config management tools, like Ansible and Chef. We'll add a really simple shell provisioner to our current template here, which just echos out Hello World. Provisioners are top-level elements at the same level as builders, so we need to put a comma in here and type in provisioners. And it's an array. You can have multiple provisioners, but we'll just have one today, just our Hello World one. And the type, we have to specify what type it is, as we said before, there could be many, many kinds. And the type here is just shell. So type is shell. And the shell can be inline or as a script. And a script is a file, so we'd have a separate file for that one. But we're just having a really simple one now, so we'll just have it as inline. So we'll…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Select an AWS AMI base2m 31s
-
(Locked)
Automate AWS AMI base build3m 28s
-
(Locked)
Using build variables6m 55s
-
(Locked)
Provision Hello World1m 59s
-
(Locked)
Provision a basic site3m 40s
-
(Locked)
Challenge: Provision a MariaDB server40s
-
(Locked)
Solution: Provision a MariaDB server3m 45s
-
(Locked)
-
-
-
-