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
{ | |
"kubernetes": { | |
"backends": { | |
"api.whoami.127.0.0.1.nip.io/{catchall:.*}": { | |
"servers": { | |
"whoami-6d75494548-k9gtm": { | |
"url": "http://10.1.0.11:80", | |
"weight": 1 | |
} | |
}, |
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
import io.reactivex.Observable | |
import io.reactivex.ObservableEmitter | |
import io.vertx.reactivex.core.RxHelper | |
import io.vertx.reactivex.core.Vertx | |
import java.util.concurrent.TimeUnit | |
object Main { | |
val vertx = Vertx.vertx() | |
val blockingScheduler by lazy { vertx.let(RxHelper::blockingScheduler) } |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: nginx | |
template: |
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
locals { | |
subnets = ["${aws_subnet.terraform-blue-green.*.id}"] | |
user_data = <<EOF | |
#cloud-config | |
runcmd: | |
- docker run -d -p 80:80 nginx:latest | |
EOF | |
} |
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 "infrastructure_version" { | |
default = "2" | |
} | |
provider "aws" { | |
region = "us-west-2" | |
} | |
terraform { | |
backend "s3" { |
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
data "aws_route53_zone" "terraform-blue-green" { | |
name = "yourdomain.com." | |
} | |
resource "aws_route53_record" "terraform-blue-green" { | |
zone_id = "${data.aws_route53_zone.terraform-blue-green.zone_id}" | |
name = "v${var.infrastructure_version}.yourdomain.com" | |
type = "A" | |
alias { |
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
resource "aws_elb" "terraform-blue-green" { | |
name = "terraform-blue-green-v${var.infrastructure_version}" | |
subnets = ["${aws_subnet.terraform-blue-green.*.id}"] | |
security_groups = ["${aws_security_group.terraform-blue-green.id}"] | |
instances = ["${aws_instance.terraform-blue-green.*.id}"] | |
listener { | |
instance_port = 80 | |
instance_protocol = "http" |
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
resource "aws_security_group" "terraform-blue-green" { | |
description = "Terraform Blue/Green" | |
vpc_id = "${var.vpc_id}" | |
name = "terraform-blue-green-v${var.infrastructure_version}" | |
tags { | |
Name = "Terraform Blue/Green (v${var.infrastructure_version})" | |
} | |
} |
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
locals { | |
subnets = ["${aws_subnet.terraform-blue-green.*.id}"] | |
user_data = <<EOF | |
#cloud-config | |
runcmd: | |
- docker run -d -p 80:80 nginx:latest | |
EOF | |
} |
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
resource "aws_key_pair" "terraform-blue-green" { | |
key_name = "terraform-blue-green-v${var.infrastructure_version}" | |
public_key = "${file("keypairs/keypair.pub")}" | |
} |
NewerOlder