Coder Social home page Coder Social logo

petr-tichy / packer-plugin-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hashicorp/packer-plugin-sdk

0.0 1.0 0.0 2.38 MB

Packer Plugin SDK enables building Packer plugins (builders, provisioners, or post-processors) to manage any service providers or custom in-house solutions

License: Mozilla Public License 2.0

Go 99.17% Batchfile 0.01% PowerShell 0.01% Makefile 0.49% Shell 0.32%

packer-plugin-sdk's Introduction

Go Reference

Packer Plugin SDK

This SDK enables building Packer plugins. This allows Packer's users to use both the officially-supported builders, provisioners, and post-processors, and custom in-house solutions.

Packer itself is a tool for building identical machine images for multiple platforms from a single source configuration. You can find more about Packer on its website and its GitHub repository.

Packer CLI Compatibility

Packer v1.7.0 or later is needed for this SDK. Versions of Packer prior to that release are still compatible with third-party plugins, but the plugins should use the plugin tooling from inside earlier versions of Packer to ensure complete API compatibility.

Go Compatibility

The Packer Plugin SDK is built in Go, and uses the support policy of Go as its support policy. The two latest major releases of Go are supported by the SDK.

Currently, that means Go 1.14 or later must be used when building a provider with the SDK.

Getting Started

See the Extending Packer docs for a guided tour of plugin development.

Documentation

See the Extending Packer section on the Packer website.

Packer Scope (Plugins VS Core)

Packer Core

  • acts as an RPC client
  • interacts with the user
  • parses (HCL/JSON) configuration
  • manages build as whole, asks plugin(s) to manage the image lifecycle and modify the image being built.
  • discovers plugin(s) and their versions per configuration
  • manages plugin lifecycles (i.e. spins up & tears down plugin process)
  • passes relevant parts of parsed (valid JSON/HCL) and interpolated configuration to plugin(s)

Packer Provider (via this SDK)

  • acts as RPC server
  • executes any domain-specific logic based on received parsed configuration. For builders this includes managing the vm lifecycle on a give hypervisor or cloud; for provisioners this involves calling the operation on the remote instance.
  • tests domain-specific logic via provided acceptance test framework
  • provides Core with template validation, artifact information, and information about whether the plugin process succeeded or failed.

Migrating to SDK from built-in SDK

Migrating to the standalone SDK v1 is covered on the Plugin SDK section of the website.

Versioning

The Packer Plugin SDK is a Go module versioned using semantic versioning.

Contributing

See .github/CONTRIBUTING.md

License

Mozilla Public License v2.0

packer-plugin-sdk's People

Contributors

mitchellh avatar swampdragons avatar azr avatar mwhooker avatar sylviamoss avatar nywilken avatar stephen-fox avatar cbednarski avatar arizvisa avatar rickard-von-essen avatar markpeek avatar teddylear avatar packer-ci avatar alrs avatar takaishi avatar bhcleek avatar brokenbot avatar paulmey avatar dependabot[bot] avatar chrismarget avatar jsoref avatar rasa avatar sethvargo avatar overdrive3000 avatar vtolstov avatar taliesins avatar orivej avatar gmmephisto avatar jvasallo avatar devenney avatar

Watchers

James Cloos 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.