-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added packer and updated AMI info for CF scripts
- Loading branch information
Showing
11 changed files
with
109 additions
and
4 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
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,6 +1,6 @@ | ||
#!/bin/bash | ||
hostname=`curl http://169.254.169.254/latest/meta-data/public-hostname` | ||
instanceid=`curl http://169.254.169.254/latest/meta-data/instance-id` | ||
thumbprint=`ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub | egrep -o "[0-9a-f]+:[^ ]*"` | ||
thumbprint=`ssh-keygen -E md5 -lf /etc/ssh/ssh_host_rsa_key.pub | grep -P -o "(?<=MD5:)[0-9a-f]+:[^ ]*"` | ||
|
||
curl https://droyad.gq/api/machines --header "X-Octopus-ApiKey:API-WNKDGUJOY857GW3A0ID7WQHC0" --data "%%registerRequest%%" |
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,9 @@ | ||
{ | ||
"frameworks": { | ||
"net46":{ | ||
"dependencies": { | ||
"Octopus.Client": "4.21.0" | ||
} | ||
} | ||
} | ||
} |
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,33 @@ | ||
{ | ||
"variables": { | ||
"aws_access_key": "", | ||
"aws_secret_key": "" | ||
}, | ||
"builders": [{ | ||
"type": "amazon-ebs", | ||
"access_key": "{{user `aws_access_key`}}", | ||
"secret_key": "{{user `aws_secret_key`}}", | ||
"region": "ap-southeast-2", | ||
"source_ami_filter": { | ||
"filters": { | ||
"virtualization-type": "hvm", | ||
"name": "*ubuntu-xenial-16.04-amd64-server-*", | ||
"root-device-type": "ebs" | ||
}, | ||
"owners": ["099720109477"], | ||
"most_recent": true | ||
}, | ||
"instance_type": "t2.micro", | ||
"ssh_username": "ubuntu", | ||
"ami_name": "integration-test-demo {{timestamp}}" | ||
}], | ||
"provisioners": [ | ||
{ | ||
"scripts": [ | ||
"scripts/install-mono.sh", | ||
"scripts/install-dotnet.sh" | ||
], | ||
"type": "shell" | ||
} | ||
] | ||
} |
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 @@ | ||
.\packer build -var "aws_access_key=$env:AWS_ACCESS_KEY_ID" -var "aws_secret_key=$env:AWS_SECRET_ACCESS_KEY" .\WebServer.json |
Binary file not shown.
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,23 @@ | ||
#!/usr/bin/env bash | ||
COLOR_START="\033[01;34m" | ||
COLOR_END="\033[00m" | ||
MSG_TIME="${MSG_TIME:-30}" | ||
|
||
function show_msg() { | ||
echo -e "${COLOR_START}${@}${COLOR_END}" | ||
} | ||
|
||
show_msg "Adding dotnet repo" | ||
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list' || exit 1 | ||
sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 || exit 1 | ||
|
||
show_msg "Running 'apt-get install aptitude'..." | ||
sudo apt-get install aptitude -y || exit 1 | ||
|
||
show_msg "Updating aptitude" | ||
sudo aptitude update || exit 1 | ||
|
||
show_msg "Installing dotnet" | ||
sudo aptitude install dotnet-dev-1.0.4 --assume-yes || exit 1 | ||
|
||
show_msg "dotnet installation complete" |
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,19 @@ | ||
#!/usr/bin/env bash | ||
COLOR_START="\033[01;34m" | ||
COLOR_END="\033[00m" | ||
MSG_TIME="${MSG_TIME:-30}" | ||
|
||
function show_msg() { | ||
echo -e "${COLOR_START}${@}${COLOR_END}" | ||
} | ||
|
||
show_msg "Adding mono repo" | ||
sudo apt-key update || exit 1 | ||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF || exit 1 | ||
echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots 4.6.0.245/main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list || exit 1 | ||
sudo apt-get update || exit 1 | ||
|
||
show_msg "Installing mono 4.6.1" | ||
sudo apt-get install mono-complete --yes --force-yes || exit 1 | ||
|
||
show_msg "Mono installation complete" |
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,2 @@ | ||
#!/bin/bash | ||
nohup dotnet HighestCommon.dll & |