-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
204db8b
commit 44b2e4c
Showing
17 changed files
with
388 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
############################################################################### | ||
# Set default behavior to automatically normalize line endings. | ||
############################################################################### | ||
* text=auto | ||
|
||
############################################################################### | ||
# Set default behavior for command prompt diff. | ||
# | ||
# This is need for earlier builds of msysgit that does not have it on by | ||
# default for csharp files. | ||
# Note: This is only used by command line | ||
############################################################################### | ||
#*.cs diff=csharp | ||
|
||
############################################################################### | ||
# Set the merge driver for project and solution files | ||
# | ||
# Merging from the command prompt will add diff markers to the files if there | ||
# are conflicts (Merging from VS is not affected by the settings below, in VS | ||
# the diff markers are never inserted). Diff markers may cause the following | ||
# file extensions to fail to load in VS. An alternative would be to treat | ||
# these files as binary and thus will always conflict and require user | ||
# intervention with every merge. To do so, just uncomment the entries below | ||
############################################################################### | ||
#*.sln merge=binary | ||
#*.csproj merge=binary | ||
#*.vbproj merge=binary | ||
#*.vcxproj merge=binary | ||
#*.vcproj merge=binary | ||
#*.dbproj merge=binary | ||
#*.fsproj merge=binary | ||
#*.lsproj merge=binary | ||
#*.wixproj merge=binary | ||
#*.modelproj merge=binary | ||
#*.sqlproj merge=binary | ||
#*.wwaproj merge=binary | ||
|
||
############################################################################### | ||
# behavior for image files | ||
# | ||
# image files are treated as binary by default. | ||
############################################################################### | ||
#*.jpg binary | ||
#*.png binary | ||
#*.gif binary | ||
|
||
############################################################################### | ||
# diff behavior for common document formats | ||
# | ||
# Convert binary document formats to text before diffing them. This feature | ||
# is only available from the command line. Turn it on by uncommenting the | ||
# entries below. | ||
############################################################################### | ||
#*.doc diff=astextplain | ||
#*.DOC diff=astextplain | ||
#*.docx diff=astextplain | ||
#*.DOCX diff=astextplain | ||
#*.dot diff=astextplain | ||
#*.DOT diff=astextplain | ||
#*.pdf diff=astextplain | ||
#*.PDF diff=astextplain | ||
#*.rtf diff=astextplain | ||
#*.RTF diff=astextplain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
#Makefile | ||
SHELL := /bin/bash | ||
|
||
AWS_DEFAULT_REGION ?= "eu-west-1" | ||
PACKFILE ?= "base.json" | ||
ENVIRONMENT ?= "management-<account-number>" | ||
PACKFILE ?= "packfiles/RedHat/base-aws.json" | ||
ENVIRONMENT ?= "environment/personal-jgw.json" | ||
|
||
# List of targets the `readme` target should call before generating the readme | ||
export README_DEPS ?= docs/targets.md docs/terraform.md | ||
|
||
.PHONY: base | ||
-include $(shell curl -sSL -o .build-harness "https://raw.githubusercontent.com/JamesWoolfenden/build-harness/master/templates/Makefile.build-harness"; echo .build-harness) | ||
|
||
base: | ||
sh ./build.sh -p ${PACKFILE} -e ${ENVIRONMENT} | ||
## Lint terraform code | ||
lint: | ||
$(SELF) terraform/install terraform/get-modules terraform/get-plugins terraform/lint terraform/validate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# PSScriptAnalyzerSettings.psd1 | ||
@{ | ||
Severity=@('Error','Warning') | ||
ExcludeRules=@('PSUseShouldProcessForStateChangingFunctions') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
# | ||
# This is the canonical configuration for the `README.md` | ||
# Run `make readme` to rebuild the `README.md` | ||
# | ||
# Name of this project | ||
name: packer-by-example | ||
|
||
# Logo for this project | ||
#logo: docs/slalom-logo.png | ||
|
||
# License of this project | ||
license: 'APACHE2' | ||
|
||
# Copyrights | ||
copyrights: | ||
- name: 'Slalom, LLC' | ||
url: 'https://slalom.com' | ||
year: '2019' | ||
|
||
# Canonical GitHub repo | ||
github_repo: JamesWoolfenden/packer-by-example | ||
|
||
# Badges to display | ||
badges: | ||
- name: 'Build Status' | ||
image: 'https://travis-ci.org/JamesWoolfenden/build-harness.svg?branch=master' | ||
url: 'https://travis-ci.org/JamesWoolfenden/build-harness' | ||
- name: 'Latest Release' | ||
image: 'https://img.shields.io/github/release/JamesWoolfenden/build-harness.svg' | ||
url: 'https://github.com/JamesWoolfenden/build-harness/releases/latest' | ||
|
||
# Short description of this project | ||
description: |- | ||
Packer-by-example is a collection of Scripts, Ansible, Makefiles and Packer files to building images in the Public Cloud. | ||
It's designed to work with CI/CD systems such as Travis CI, CircleCI and Jenkins, or even at your console. | ||
# Introduction to the project | ||
introduction: |- | ||
# This is an introduction. | ||
# How to use this project | ||
usage: |- | ||
some usage info... | ||
# How to get started quickly | ||
quickstart: |- | ||
Here's how to get started... | ||
1. `git clone https://github.com/jameswoolfenden/build-harness.git` to pull down the repository | ||
2. `make init` to initialize the [`build-harness`](https://github.com/jameswoolfenden/build-harness/) | ||
# Other files to include in this README from the project folder | ||
include: | ||
- 'docs/instructions.md' | ||
- 'docs/targets.md' | ||
|
||
# Contributors to this project | ||
contributors: | ||
- name: 'James Woolfenden' | ||
github: 'jameswoolfenden' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
# AWS amis | ||
|
||
These examples target the customisation of existing AWS Amis, usually from AWS or from trusted sources such as Canonicals AWS account. You can find the details of an AMI from the command line | ||
|
||
## AWS Set-up | ||
|
||
You will need to set-up and configured your AWS: | ||
|
||
```cli | ||
aws configure | ||
``` | ||
|
||
When you run packer its is assumed that the following Environment variables are set: | ||
|
||
```cli | ||
AWS_ACCESS_KEY_ID | ||
AWS_SECRET_ACCESS_KEY | ||
AWS_SESSION_TOKEN | ||
``` | ||
|
||
You can run | ||
|
||
```bash | ||
./build.sh -packfile ./packfiles/redhat/base-aws.json -environment | ||
``` | ||
|
||
Additionally in the root you will find the script **iam_assum_role**, this allows you to assume an aws role to build your AMI's. | ||
# AWS amis | ||
|
||
These examples target the customisation of existing AWS Amis, usually from AWS or from trusted sources such as Canonicals AWS account. You can find the details of an AMI from the command line | ||
|
||
## AWS Set-up | ||
|
||
You will need to set-up and configured your AWS: | ||
|
||
```cli | ||
aws configure | ||
``` | ||
|
||
When you run packer its is assumed that the following Environment variables are set: | ||
|
||
```cli | ||
AWS_ACCESS_KEY_ID | ||
AWS_SECRET_ACCESS_KEY | ||
AWS_SESSION_TOKEN | ||
``` | ||
|
||
You can run | ||
|
||
```bash | ||
./build.sh -packfile ./packfiles/redhat/base-aws.json -environment | ||
``` | ||
|
||
Additionally in the root you will find the script **iam_assum_role**, this allows you to assume an aws role to build your AMI's. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# Azure Images | ||
|
||
## Azure Set-up | ||
|
||
You can run | ||
|
||
```bash | ||
./build.sh -packfile ./packfiles/redhat/base-azure.json -environment | ||
# Azure Images | ||
|
||
## Azure Set-up | ||
|
||
You can run | ||
|
||
```bash | ||
./build.sh -packfile ./packfiles/redhat/base-azure.json -environment | ||
``` |
Oops, something went wrong.