Skip to main content

packerlicious - a python wrapper for packer templates.

Project description

https://img.shields.io/pypi/v/packerlicious.svg https://travis-ci.org/mayn/packerlicious.svg?branch=master https://coveralls.io/repos/github/mayn/packerlicious/badge.svg?branch=master

About

packerlicious - a python library to create packer templates.

Project follows semantic versioning , v0.x.x API should be considered unstable, API will change frequently, please plan accordingly.

This project leverages the logic engine of troposphere.

Installation

packerlicious can be installed via pip:

$ pip install packerlicious

Examples

Below is the packerlicious equivalent of packer’s example template

>>> from packerlicious import builder, provisioner, Template
>>> template = Template()
>>> template.add_builder(
...     builder.AmazonEbs(
...         access_key="...",
...         secret_key="...",
...         region = "us-east-1",
...         source_ami="ami-fce3c696",
...         instance_type="t2.micro",
...         ssh_username="ubuntu",
...         ami_name="packer {{timestamp}}"
...     )
... )
<packerlicious.builder.AmazonEbs object at 0x104e87ad0>
>>> template.add_provisioner(
...     provisioner.Shell(
...         script="setup_things.sh"
...     )
... )
<packerlicious.provisioner.Shell object at 0x1048c08d0>
>>> print(template.to_json())
{
  "builders": [
    {
      "access_key": "...",
      "ami_name": "packer {{timestamp}}",
      "instance_type": "t2.micro",
      "region": "us-east-1",
      "secret_key": "...",
      "source_ami": "ami-fce3c696",
      "ssh_username": "ubuntu",
      "type": "amazon-ebs"
    }
  ],
  "provisioners": [
    {
      "script": "setup_things.sh",
      "type": "shell"
    }
  ]
}

Currently supported Packer resources

Builders:

  • alicloud-ecs

  • amazon-ebs

  • amazon-instance

  • azure-arm

  • cloudstack

  • digitalocean

  • docker

  • file

  • googlecompute

  • hyperv-iso

  • null

  • oneandone

  • openstack

  • profitbricks

  • qemu

  • triton

  • virtualbox-iso

  • virtualbox-ovf

  • vmware-iso

  • vmware-vmx

Post Processors:

  • alicloud-import

  • amazon-import

  • artifice

  • atlas

  • checksum

  • compress

  • docker-import

  • docker-push

  • docker-save

  • docker-tag

  • googlecompute-export

  • manifest

  • shell-local

  • vagrant

  • vagrant-cloud

  • vsphere

Provisioners:

  • ansible-local

  • ansible

  • chef-client

  • chef-solo

  • converge

  • file

  • powershell

  • puppet-masterless

  • puppet-server

  • salt-masterless

  • shell

  • shell-local

  • windows-shell

  • windows-restart

Licensing

packerlicious is licensed under the Apache license 2.0. See LICENSE for the full license text.

packerlicious contains source code from troposphere which is licensed under the BSD 2-Clause license

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

packerlicious-0.4.0.tar.gz (18.8 kB view details)

Uploaded Source

File details

Details for the file packerlicious-0.4.0.tar.gz.

File metadata

  • Download URL: packerlicious-0.4.0.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for packerlicious-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1a1e6738c8478c72e795b802320c9ed007c6511e54e3c82da03829171e4df862
MD5 90f4da48e764d30177b9e2fc646f83c7
BLAKE2b-256 5925fe023a8b88678c3edf95bade797e91264912f3b1d45c1816993c446fd025

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page