This file contains hidden or 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
| variable "vpc_id" {} | |
| variable "subnets" {} | |
| variable "ingress_cidr_blocks" {} | |
| variable "key_name" {} | |
| variable "ami" {} | |
| variable "instance_type" {} | |
| variable "server_dns" {} | |
| resource "aws_security_group" "gocd_elb" { | |
| name = "gocd-agent-ui-elb-sg" |
This file contains hidden or 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
| node.override['gocd']['agent']['go_server_host'] = 'gocd.ukpds.org' | |
| node.override['gocd']['agent']['package_file']['url'] = 'https://download.go.cd/binaries/16.2.1-3027/win/go-agent-16.2.1-3027-setup.exe' | |
| include_recipe 'gocd::agent' |
This file contains hidden or 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
| ubuntu@ip-10-0-1-229:~$ cat /var/log/go-server/go-server.log | |
| 2016-04-06 20:55:30,829 INFO [main] GoSslSocketConnector:78 - Included ciphers: null | |
| 2016-04-06 20:55:30,833 INFO [main] GoSslSocketConnector:79 - Excluded ciphers: null | |
| 2016-04-06 20:55:30,833 INFO [main] GoSslSocketConnector:80 - Included protocols: null | |
| 2016-04-06 20:55:30,833 INFO [main] GoSslSocketConnector:81 - Excluded protocols: null | |
| 2016-04-06 20:55:30,834 INFO [main] GoSslSocketConnector:82 - Renegotiation Allowed: true | |
| 2016-04-06 20:55:30,906 INFO [main] Jetty9Server:169 - Configuring Jetty using /etc/go/jetty.xml | |
| 2016-04-06 20:55:30,984 INFO [main] GoServer:99 - Including addons: | |
| 2016-04-06 20:55:43,367 INFO [main] H2Database:128 - [db] Using connection configuration jdbc:h2:db/h2db/cruise;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MVCC=FALSE;CACHE_SIZE=131072;TRACE_LEVEL_FILE=1;TRACE_MAX_FILE_SIZE=16;DATABASE_EVENT_LISTENER='com.thoughtworks.go.server.util.H2EventListener' [User: sa] | |
| 2016-04-06 20:55:43,372 INFO [main] H2Database |
This file contains hidden or 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
| #!/bin/bash | |
| ## Execute the CI task from the Rakefile | |
| #sudo $(which chef) exec rake ci | |
| ## Obtain the source AMI to use for our Packer build. | |
| base_ami_id = $(aws ec2 describe-images --filters Name=tag-key,Values=ami Name=tag-value,Values=aws-ubuntu-base --output text --query 'Images[0].ImageId') | |
| echo $base_ami_id | |
| ## Build an AMI for this cookbook |
This file contains hidden or 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
| #!/bin/bash | |
| ## Execute the CI task from the Rakefile | |
| #sudo $(which chef) exec rake ci | |
| ## Obtain the source AMI to use for our Packer build. | |
| base_ami_id = $(aws ec2 describe-images --filters Name=tag-key,Values=ami Name=tag-value,Values=aws-ubuntu-base --output text --query 'Images[0].ImageId') | |
| echo $base_ami_id | |
| ## Build an AMI for this cookbook |
This file contains hidden or 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
| amazon-ebs: [2016-04-06T20:17:08+00:00] INFO: Processing http_request[verify_go-server_comes_up] action get (gocd::server line 16) | |
| amazon-ebs: [2016-04-06T20:17:08+00:00] ERROR: Connection refused connecting to http://localhost:8153/go/home, retry 1/5 | |
| amazon-ebs: [2016-04-06T20:17:13+00:00] ERROR: Connection refused connecting to http://localhost:8153/go/home, retry 2/5 | |
| amazon-ebs: [2016-04-06T20:17:18+00:00] ERROR: Connection refused connecting to http://localhost:8153/go/home, retry 3/5 | |
| amazon-ebs: [2016-04-06T20:17:23+00:00] ERROR: Connection refused connecting to http://localhost:8153/go/home, retry 4/5 | |
| amazon-ebs: [2016-04-06T20:17:28+00:00] ERROR: Connection refused connecting to http://localhost:8153/go/home, retry 5/5 |
This file contains hidden or 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
| Failures: | |
| 1) gocd-agent::default When all attributes are default, on an unspecified platform includes dependent recipes | |
| Failure/Error: runner.converge(described_recipe) | |
| Mixlib::ShellOut::ShellCommandFailed: | |
| Expected process to exit with [0], but received '127' | |
| ---- Begin output of powershell.exe -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Unrestricted -InputFormat None -Command "[System.Environment]::GetEnvironmentVariable('ChocolateyInstall', 'MACHINE')" ---- | |
| STDOUT: | |
| STDERR: sh: powershell.exe: command not found |
This file contains hidden or 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
| { | |
| "variables": { | |
| "version": "{{env `VERSION`}}", | |
| "aws_access_key": "{{env `AWS_ACCESS_KEY`}}", | |
| "aws_secret_key": "{{env `AWS_SECRET_KEY`}}", | |
| "atlas_username": "swade1987", | |
| "atlas_token": "AGatG6zR7NjPRg.atlasv1.JrueNghrDyMItxjyzeotL87l26ymHb9MLzTlkyaf5joZH5cMg0kpViaR3qCr9iDOE9Y", | |
| "name": "windows-base", | |
| "region": "us-west-2", | |
| "vpc_id": "vpc-a8a350cc", |
This file contains hidden or 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
| variable "elasticsearch_ami" { | |
| default = "ami-f37a9393" | |
| } | |
| module "elasticsearch" { | |
| source = "../modules/elasticsearch" | |
| ami = "${var.elasticsearch_ami}" | |
| vpc_id = "${module.vpc.vpc_id}" | |
| subnets = "${module.vpc.private_subnets}" | |
| ingress_cidr_blocks = "0.0.0.0/0" |
This file contains hidden or 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
| Build -> Unit Test -> New cookbook in Chef | |
| -> New artefact in our artefact repository | |
| -> New AMI via Packer (running a chef-solo run of the app cookbook) | |
| -> Obtain the new AMI Id and pass this to Terraform for my specific environment | |
| -> Write something somehow that rolls the instances in that environment. | |
| -> Also remove the node from the chef server on termination | |
| Have the user_data for the launch configuration connect to the node to a chef environment. |