Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A awesome-python
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 13
    • Issues 13
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 317
    • Merge requests 317
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Vinta Chen
  • awesome-python
  • Merge requests
  • !1037

add packerlicious - packer template generation in python

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/mayn/add-packerlicious into master Mar 19, 2018
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: mayn

What is this Python project?

packerlicious is a python library to create packer templates in python.

example usage:

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}}"
    )
)

template.add_provisioner(
    provisioner.Shell(
        script="setup_things.sh"
    )
)

print(template.to_json())

resulting packer template:

    {
      "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"
        }
      ]
    }

What's the difference between this Python project and similar ones?

  • only one that supports expressing packer templates in python

--

Anyone who agrees with this pull request could vote for it by adding a 👍 to it, and usually, the maintainer will merge it when votes reach 20.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/mayn/add-packerlicious