Skip to main content

Helper app for building and running packer templates

Project description

packme

overview

packme is a python3 application for generating and running packer templates.

It works by generating manifest.json files out of manifest.yml files which contain the packer settings for the image to build. The manifest.yml files will be searched in a directory which contains as subdirectories the images to be built using packer. That directory has to be defined from the CLI (-t/--templates-dir option) and has the following structure:

my_templates_directory/
    image1/
        manifest.yml
    ...
    imageN/
        manifest.yml

Each manifest.yml has the following structure:

---
parameters:
    param1: value1
    ...
    paramN: valueN

packer:
    description: packer description string
    variables: packer variables dict
    builders: packer builders list
    provisioners: packer provisioners list
    post-processors: packer post processors list

The packer section is strictly the YAML representation of a packer json file with the standards description, variables, builders, provisioners and post-processors packer fields. Those fields can contain Jinja2 templates which can be of two flavors: parameters or environment. parameters will be defined in the parameters section of the YAML file while environment will be either environment variables or variables passed through the packme CLI.

In order to run packme, an input configuration file has to be provided. This file is a YAML file which declares the list of the images for which manifest.json file will be built and run after with packer. It has the following structure:

---
templates:
    image1:
        packages: [package1, ..., packageN]
    ...
    imageN:
        extends: image1

where packages defines non standard packages that will added as extra provisioners when generating the manifest.json file for the corresponding image.

An image can extend another one by starting its building from another image. This is the aim of extends keyword which allows to declare that dependency.

Documentation

packme documentation

Prerequesites

  • packer
  • QEMU

Installation

pip install packme

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

packme-0.8.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file packme-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: packme-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10

File hashes

Hashes for packme-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d47a8e2ef9d221d84988c8d2c39020bc61bb9a7b2e0703d200027e931057167
MD5 514dd3df363c6173a02405fbae0408e1
BLAKE2b-256 40cce89e7bebdb2faa5477f19b1fcc37d8c5b5e5807f7777f5ae4d293c7b53cc

See more details on using hashes here.

Supported by

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