O'Reilly logo

Google Cloud Platform Cookbook by Legorie Rajan PS

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

In this recipe, we'll create a temporary machine and install Packer. Then, we'll create the necessary configuration files for Packer to create an image running PHP:

  1. To run Packer, let's first create a Debian GNU/Linux 9 instance with Read/Write access to Compute Engine and Full access to Storage:
  1. SSH into the newly-created machine and install Packer (the binaries are available in packer.io):
$ cd ~$ sudo apt-get install unzip$ wget https://releases.hashicorp.com/packer/1.2.2/packer_1.2.2_linux_amd64.zip$ unzip packer_1.2.2_linux_amd64.zip$ lspacker packer_1.2.2_linux_amd64.zip$ ./packerUsage: packer [--version] [--help] ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required