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 a basic site - Packer Tutorial
From the course: Learning HashiCorp Packer
Provision a basic site
- Using the shell provisioner, we're going to make an image that has nginex and a simple website baked in. So, we will add here an extra provisioner, for uploading the files. The provisioners are run in order, so if we add the file upload first, that means that we'll upload those before we do anything else. And we currently have a shell type provisioner, and what we're adding now is going to be a file type provisioner, so we need to specify that type. So we'll type in here, "type" and "file," and a file provisioner has two extra properties. Those properties are the source, and the destination. The source is where to find the files on my local machine, or where Packer is running, and destination is where to send those files on the machine that Packer has launched, so the source of these files is right here, which is a relative location, so we'll just add that in now. Source..files, slash website. And the destination will upload them into our home directory into a new folder called…
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)
-
-
-
-