Giter Club home page Giter Club logo

packerlicious's Introduction

packerlicious

image

image

image

image

About

packerlicious - a python library to create packer templates.

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-chroot
  • amazon-ebs
  • amazon-ebssurrogate
  • amazon-ebsvolume
  • amazon-instance
  • azure-arm
  • cloudstack
  • digitalocean
  • docker
  • file
  • googlecompute
  • hyperv-iso
  • hyperv-vmcx
  • lxc
  • lxd
  • ncloud
  • null
  • oneandone
  • openstack
  • oracle-classic
  • parallels-iso
  • parallels-pvm
  • profitbricks
  • qemu
  • scaleway
  • 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-import
  • googlecompute-export
  • manifest
  • shell-local
  • vagrant
  • vagrant-cloud
  • vsphere
  • vsphere-template

Provisioners:

  • ansible-local
  • ansible
  • chef-client
  • chef-solo
  • converge
  • file
  • powershell
  • puppet-masterless
  • puppet-server
  • salt-masterless
  • shell
  • shell-local
  • windows-shell
  • windows-restart

Community Plugins:

  • packer-provisioner-inspec

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

packerlicious's People

Contributors

andyli avatar anurag-ks avatar benjymb avatar blazejkw avatar cbeck527 avatar cedarctic avatar clfs avatar cmccandless avatar codevbus avatar fatmcgav avatar fuzzmz avatar gnewson avatar guillearch avatar hongjoonchew avatar hugovk avatar hunterel avatar isaacm avatar kshitijkarthick avatar levisbakalinsky avatar mayn avatar mkerins avatar mprince avatar shakeelmohamed avatar sibidass avatar valkum avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.