Skip to content

This repository contains packer related content like packer configuration files and other documents to implement images as a code.

License

Notifications You must be signed in to change notification settings

anupam-sy/packer-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packer Lab

This repository contains packer related content like packer files and other documents to implement images as a code.

Prerequisites

Below prerequisites must be fulfilled for successful execution of code.

Software Requirement

Resources in this repository are meant for use with Packer (check the version using packer version). If you don't have the compatible version, install it from official packer documentation. See Installation-Guide on how to install Packer.

Permissions

Authenticating with Google Cloud services requires either a User Application Default Credentials, a JSON Service Account Key or an Access Token. These are not required if you are running the googlecompute Packer builder on Google Cloud with a properly-configured Google Service Account.

  1. If you run the googlecompute Packer builder locally on your workstation, you will need to install the Google Cloud SDK and authenticate using User Application Default Credentials. You don't need to specify an account file if you are using this method. Your user must have at least below roles to use Packer succesfully.
  • Compute Instance Admin (v1)
  • Service Account User roles
  1. Make sure to open your firewall to allow ssh connection to virtual machine launched by packer for building image.

Execution

To execute the packer commands for building the image, go to command prompt and switch to the directory conatinaing all the packer config files and run the following commands:

  • [Required] packer init
  • [Optional] packer fmt .
  • [Optional] packer validate .
  • [Required] packer build .

Note: See Packer-Guide to get real-quick overview of Packer.

References

About

This repository contains packer related content like packer configuration files and other documents to implement images as a code.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published