jasonwalsh / herzog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CircleCI

Contents

Motivation

The purpose of this repository is to demonstrate a fully automated image deployment and testing pipeline.

Requirements

Usage

This repository builds Amazon Machine Images (AMIs) using software called Packer. After Packer finishes the build, it uploads an artifact (AMI) to the AWS account associated with the AWS Access Key ID and AWS Secret Access Key provided by the user. The AMI is then available for use by Vagrant.

The main.tf file wraps the Packer build command in a Terraform configuration file and creates the security group used via the Vagrant AWS provider to allow incoming SSH connections.

$ terraform init
$ terraform apply

Environment Variables

The following environment variables are required to use this repository.

Name Required
AWS_ACCESS_KEY_ID ✔️
AWS_DEFAULT_REGION ✔️
AWS_SECRET_ACCESS_KEY ✔️

Inputs

Name Description Type Default Required
instance_type The EC2 instance type to use while building the AMI string "t2.small" no
options https://packer.io/docs/commands/build.html#options map <map> no
public_key The public key material string "~/.ssh/id_rsa.pub" no
ssh_username The username to connect to SSH with string n/a yes
template The Packer template string n/a yes

Outputs

Name Description
message SSH connectivity information

About

License:MIT License


Languages

Language:HCL 100.0%