Skip to content

Latest commit

 

History

History

packer-example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Example Automation with Packer

This is a template for creating an automated Vultr Marketplace build pipeline.

  1. Clone the repository to your workstation.

     $ git clone https://github.com/vultr/vultr-marketplace.git
    
  2. Install HashiCorp Packer.

  3. Verify your workstation's IP address is in your Vultr API access control list.

  4. Publish your API key.

     $ export VULTR_API_KEY=<Your API Key>
    
  5. If you desire a debug log, export these two variables:

     $ export PACKER_LOG=1
     $ export PACKER_LOG_PATH=packer.log
    
  6. Change to the Packer example directory.

     $ cd vultr-marketplace/packer-example
    
  7. Use packer init to automatically download the Vultr Packer Plugin.

     $ packer init packer-example.pkr.hcl
    
  8. Use packer build to automatically deploy a server, prepare it, make a snapshot, and then destroy the original server.

     $ packer build packer-example.pkr.hcl
    

The result is an Ubuntu 20.04 LTS snapshot suitable for the Vultr Marketplace.