Skip to content

Commit

Permalink
Merge remote-tracking branch 'capgemini/master' into azure-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
ravbaba committed Nov 4, 2015
2 parents 69e5cfe + 4b8c1ab commit e4ebd7d
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 31 deletions.
12 changes: 9 additions & 3 deletions bootstrap/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ verify_prereqs() {
check_terraform_version() {
local IFS='.'
local current_version_string="${2:-$( terraform --version | awk 'NR==1 {print $2}' )}"
local requirement_version_string=${1:-0.6.1}
local requirement_version_string=${1:-0.6.6}
local -a current_version=( ${current_version_string#'v'} )
local -a requirement_version=( ${requirement_version_string} )
local n diff
Expand Down Expand Up @@ -69,7 +69,14 @@ get_apollo_variables() {
}

apollo_launch() {
if [ "$@" ]; then
if [[ "$@" == "-i" ]]; then
get_terraform_modules
terraform_apply
run_if_exist "ansible_ssh_config"
ansible_playbook_run
run_if_exist "set_vpn"
open_urls
elif [ "$@" ]; then
eval $@
else
run_if_exist "ssh_thumbprint"
Expand All @@ -78,7 +85,6 @@ apollo_launch() {
run_if_exist "ansible_ssh_config"
ansible_playbook_run
run_if_exist "set_vpn"
open_urls
fi
}

Expand Down
2 changes: 1 addition & 1 deletion packer/scripts/ubuntu/install_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -o pipefail

sudo apt-get -y update

sudo pip install docker-py==1.3.1
sudo pip install docker-py==1.5.0

sudo apt-get install -y linux-image-extra-$(uname -r)

Expand Down
2 changes: 1 addition & 1 deletion packer/tests/spec/docker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
end

describe package('docker-py') do
it { should be_installed.by('pip').with_version('1.3.1') }
it { should be_installed.by('pip').with_version('1.5.0') }
end

describe package("linux-image-extra-#{`uname -r`.strip}") do
Expand Down
2 changes: 1 addition & 1 deletion packer/ubuntu-14.04_amd64-amis.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"marathon_version": "v0.10.1",
"consul_version": "0.5.2",
"weave_version": "1.2.0",
"docker_version": "1.8.2-0~trusty",
"docker_version": "1.9.0-0~trusty",
"version": "{{env `APOLLO_VERSION`}}",
"aws_region": "{{env `AWS_REGION`}}",
"aws_source_ami": "{{env `AWS_SOURCE_AMI`}}",
Expand Down
2 changes: 1 addition & 1 deletion packer/ubuntu-14.04_amd64-droplet.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"marathon_version": "v0.10.1",
"consul_version": "0.5.2",
"weave_version": "1.2.0",
"docker_version": "1.8.2-0~trusty",
"docker_version": "1.9.0-0~trusty",
"version": "{{env `APOLLO_VERSION`}}"
},
"builders": [{
Expand Down
2 changes: 1 addition & 1 deletion packer/ubuntu-14.04_amd64-google.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"marathon_version": "v0.10.1",
"consul_version": "0.5.2",
"weave_version": "1.2.0",
"docker_version": "1.8.2-0~trusty",
"docker_version": "1.9.0-0~trusty",
"version": "{{env `APOLLO_VERSION`}}"
},
"builders": [{
Expand Down
2 changes: 1 addition & 1 deletion packer/ubuntu-14.04_amd64.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"marathon_version": "v0.10.1",
"consul_version": "0.5.2",
"weave_version": "1.2.0",
"docker_version": "1.8.2-0~trusty",
"docker_version": "1.9.0-0~trusty",
"access_token": "{{env `ATLAS_TOKEN`}}",
"iso_url": "http://releases.ubuntu.com/trusty/ubuntu-14.04.3-server-amd64.iso",
"iso_checksum": "9e5fecc94b3925bededed0fdca1bd417"
Expand Down
18 changes: 9 additions & 9 deletions terraform/aws-public/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ variable "atlas_artifact_version" {
/* Remember to update the list every time when you build a new artifact on atlas */
variable "amis" {
default = {
ap-northeast-1 = "ami-75dcf81b"
ap-southeast-1 = "ami-7324e310"
ap-southeast-2 = "ami-a60c52c5"
eu-central-1 = "ami-950b18f9"
eu-west-1 = "ami-f603dd85"
sa-east-1 = "ami-da962db6"
us-east-1 = "ami-be106dd4"
us-west-1 = "ami-7b046b1b"
us-west-2 = "ami-00657261"
ap-northeast-1 = "ami-3f6a4d51"
ap-southeast-1 = "ami-1e3cfb7d"
ap-southeast-2 = "ami-ca326ca9"
eu-central-1 = "ami-de392ab2"
eu-west-1 = "ami-4972ac3a"
sa-east-1 = "ami-7076cd1c"
us-east-1 = "ami-48ef9222"
us-west-1 = "ami-54610e34"
us-west-2 = "ami-cb3b2caa"
}
}
8 changes: 7 additions & 1 deletion terraform/aws/bastion-server.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ resource "aws_instance" "bastion" {
"sudo iptables -t nat -A POSTROUTING -j MASQUERADE",
"echo 1 | sudo tee /proc/sys/net/ipv4/conf/all/forwarding",
/* Install docker */
"curl -sSL https://get.docker.com/ubuntu/ | sudo sh",
/* Add the repository to your APT sources */
"sudo -E sh -c 'echo deb https://apt.dockerproject.org/repo ubuntu-trusty main > /etc/apt/sources.list.d/docker.list'",
/* Then import the repository key */
"sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D",
"sudo apt-get update",
/* Install docker-engine */
"sudo apt-get install -y docker-engine=${var.docker_version}",
"sudo service docker start",
/* Initialize open vpn data container */
"sudo mkdir -p /etc/openvpn",
Expand Down
23 changes: 14 additions & 9 deletions terraform/aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,22 @@ variable "atlas_artifact_version" {
}
}

variable "docker_version" {
description = "Docker version"
default = "1.8.2-0~trusty"
}

/* Remember to update the list every time when you build a new artifact on atlas */
variable "amis" {
default = {
ap-northeast-1 = "ami-75dcf81b"
ap-southeast-1 = "ami-7324e310"
ap-southeast-2 = "ami-a60c52c5"
eu-central-1 = "ami-950b18f9"
eu-west-1 = "ami-f603dd85"
sa-east-1 = "ami-da962db6"
us-east-1 = "ami-be106dd4"
us-west-1 = "ami-7b046b1b"
us-west-2 = "ami-00657261"
ap-northeast-1 = "ami-3f6a4d51"
ap-southeast-1 = "ami-1e3cfb7d"
ap-southeast-2 = "ami-ca326ca9"
eu-central-1 = "ami-de392ab2"
eu-west-1 = "ami-4972ac3a"
sa-east-1 = "ami-7076cd1c"
us-east-1 = "ami-48ef9222"
us-west-1 = "ami-54610e34"
us-west-2 = "ami-cb3b2caa"
}
}
6 changes: 3 additions & 3 deletions wercker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ build:
name: install packer
cwd: packer/
code: |
wget https://dl.bintray.com/mitchellh/packer/packer_0.7.5_linux_amd64.zip
unzip packer_0.7.5_linux_amd64.zip
wget https://dl.bintray.com/mitchellh/packer/packer_0.8.6_linux_amd64.zip
unzip packer_0.8.6_linux_amd64.zip
./packer version
- script:
cwd: packer/
Expand Down Expand Up @@ -52,7 +52,7 @@ deploy:
cloud: $CLOUD
artifact_name: $ARTIFACT_NAME
artifact_version: $ARTIFACT_VERSION
terraform_version: 0.6.1
terraform_version: 0.6.6
run_tests: true
after-steps:
- wantedly/pretty-slack-notify:
Expand Down

0 comments on commit e4ebd7d

Please sign in to comment.