GithubHelp home page GithubHelp logo

kowshikshivarudrappa / packer-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from a-luna/packer-examples

0.0 0.0 0.0 57 KB

Packer templates which create machine images running various applications, e.g., LEMP stack with Bedrock-Wordpress fully-configured, ready to install immediately upon instancing.

License: MIT License

Shell 98.62% PHP 1.20% HTML 0.18%

packer-examples's Introduction

Packer Examples

This repository contains a collection of packer templates which create machine images running various applications.

Each directory contains one or more JSON template files which can be built by running packer build. See the README file in each directory for any necessary steps that need to be performed before using the template.

Install

  1. Install Packer
  2. Open a new terminal and verify packer is available. Output should be similar to below:
$ packer
usage: packer [--version] [--help] <command> [<args>]

Available commands are:
    build       build image(s) from template
    fix         fixes templates from old versions of packer
    inspect     see components of a template
    push        push template files to a Packer build service
    validate    check that a template is valid
    version     Prints the Packer version

Template Directory

  • nginx-ubuntu (Ubuntu 16.04 with NGINX installed and configured)
  • wordpress-bedrock (Bedrock-Wordpress running on Ubuntu 16.04 LEMP stack, fully configured and ready to install immediately)

Creating Amazon EC2 Machine Images (AMIs)

An AWS account is required in order to build AMIs with any of the example templates. All amazon-ebs builders are configured to launch t2.micro instances, which are included with the free-tier.

You must choose which method you will use to provide your AWS access keys to packer. Read this page for more info. I recommend creating a credentials file, the default location Packer checks for this file is $HOME/.aws/credentials on Linux and macOS, or %USERPROFILE%.aws\credentials on Windows. To accociate your access keys with the default profile, include the lines below in your credentials file:

[default]
aws_access_key_id = YOUR ACCESS KEY
aws_secret_access_key = YOUR SECRET KEY

[default]
region = us-west-1

The region value should match the VPC that you wish to launch the EC2 instance and where the resulting AMI will be stored. The SDK checks the AWS_PROFILE environment variable to determine which profile to use. If no AWS_PROFILE variable is set, the SDK uses the default profile.

You can optionally specify a different location for Packer to look for the credentials file by setting the environment variable AWS_SHARED_CREDENTIALS_FILE. See Amazon's documentation on specifying profiles for more details.

License

MIT License

Author Information

Created in 2018 by Aaron Luna

packer-examples's People

Contributors

a-luna 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.