Skip to content

Instantly share code, notes, and snippets.

View swade1987's full-sized avatar

Steve Wade swade1987

View GitHub Profile
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}",
"atlas_username": "{{env `ATLAS_USERNAME`}}",
"atlas_token": "AGatG6zR7NjPRg.atlasv1.JrueNghrDyMItxjyzeotL87l26ymHb9MLzTlkyaf5joZH5cMg0kpViaR3qCr9iDOE9Y",
"name": "aws-windows-base",
"region": "us-west-2",
"vpc_id": "",
"subnet_id": "",
@swade1987
swade1987 / gist:273e917f3f1a81e7e10e
Created February 21, 2016 23:06
packer build output
Stevens-MacBook-Pro:core-cookbook stevenwade$ packer build windows.json
amazon-ebs output will be in this color.
==> amazon-ebs: Prevalidating AMI Name...
==> amazon-ebs: Inspecting the source AMI...
==> amazon-ebs: Creating temporary keypair: packer 56ca3d45-ead0-1272-2150-a7fce10b2f62
==> amazon-ebs: Creating temporary security group for this instance...
==> amazon-ebs: Authorizing access to port 5985 the temporary security group...
==> amazon-ebs: Launching a source AWS instance...
amazon-ebs: Instance ID: i-af039168
@swade1987
swade1987 / gist:7f05255f3bcbe3925f5b
Created February 22, 2016 09:45
user data file
<powershell>
write-output "Starting instance userdata script"
write-output "Running User Data Script"
write-host "(host) Running User Data Script"
cmd.exe /c net user /add vagrant FooBar@123
cmd.exe /c net localgroup administrators vagrant /add
Set-ExecutionPolicy -ExecutionPolicy bypass -Force
Test-WSMan -ComputerName 52.36.159.226
wsmid : http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd
ProtocolVersion : http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd
ProductVendor : Microsoft Corporation
ProductVersion : OS: 0.0.0 SP: 0.0 Stack: 3.0
@swade1987
swade1987 / gist:fe7e3e4a3e3a13df13a0
Created February 22, 2016 16:07
chef-solo provisioner
{
"type": "chef-solo",
"skip_install": true,
"cookbook_paths": ["cookbooks/core"],
"run_list": ["core::default"]
},
@swade1987
swade1987 / gist:584932c675edc10a40da
Created February 22, 2016 20:04
packer windows ami
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}",
"atlas_username": "",
"atlas_token": "",
"name": "aws-windows-base",
"region": "us-west-2",
"vpc_id": "vpc-6aa9440e",
"subnet_id": "subnet-3c042265",
==> amazon-ebs: Prevalidating AMI Name...
==> amazon-ebs: Inspecting the source AMI...
==> amazon-ebs: Creating temporary keypair: packer 56cb68d7-162c-45d5-ff59-690ba1b35760
==> amazon-ebs: Creating temporary security group for this instance...
==> amazon-ebs: Authorizing access to port 5985 the temporary security group...
==> amazon-ebs: Launching a source AWS instance...
amazon-ebs: Instance ID: i-ad2d6e77
==> amazon-ebs: Waiting for instance (i-ad2d6e77) to become ready...
==> amazon-ebs: Skipping waiting for password since WinRM password set...
==> amazon-ebs: Waiting for WinRM to become available...
@swade1987
swade1987 / gist:d32ab71389cddecb72d8
Created February 22, 2016 20:47
packer 0.9.0 debug
Stevens-MBP:core-cookbook stevenwade$ packer build -debug windows.json
Debug mode enabled. Builds will not be parallelized.
amazon-ebs output will be in this color.
==> amazon-ebs: Prevalidating AMI Name...
==> amazon-ebs: Pausing after run of step 'StepPreValidate'. Press enter to continue.
@swade1987
swade1987 / gist:0b2b57622874933ca729
Created February 23, 2016 12:34
vagrant up output
Stevens-MacBook-Pro:bamboo-agent-cookbook stevenwade$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'swade1987/aws-windows-base' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'swade1987/aws-windows-base'
default: URL: https://atlas.hashicorp.com/swade1987/aws-windows-base
==> default: Adding box 'swade1987/aws-windows-base' (v0.0.3) for provider: virtualbox
default: Downloading: https://atlas.hashicorp.com/swade1987/boxes/aws-windows-base/versions/0.0.3/providers/virtualbox.box
An error occurred while downloading the remote file. The error
@swade1987
swade1987 / gist:4e9d3f36fd7631207668
Created February 23, 2016 13:33
vagrant script
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "swade1987/aws-windows-base"