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
# Provider | |
variable "profile" { | |
description = "your default / custom aws profile see your ~/.aws/credentials file for details" | |
default = "tikal" | |
} | |
variable "region" { | |
description = "your default aws region" | |
default = "eu-west-1" |
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
output "rds_addrs" { | |
value = "${join(",", data.dns_a_record_set.db-stg.addrs)}" | |
} | |
output "aws_db_snapshot_id" { | |
value = "${data.aws_db_snapshot.latest_db_snapshot.id}" | |
} | |
output "vpc_id" { | |
value = "${data.aws_vpc.prod.id}" | |
} |
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
# variables.tf ... | |
# Provider | |
variable "profile" { | |
description = "your default / custom aws profile see your ~/.aws/credentials file for details" | |
default = "tikal" | |
} | |
variable "region" { | |
description = "your default aws region" |
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
kops create cluster \ | |
--node-count 3 \ | |
--zones eu-west-1a \ | |
--master-zones eu-west-1a \ | |
--node-size t2.medium \ | |
--master-size t2.medium \ | |
--ssh-public-key kops_rsa.pub \ | |
--dns-zone=hub.tikal.io \ | |
--name ${KOPS_CLUSTER_NAME} |
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
NAME CLOUD ZONES | |
dev.hub.tikal.io aws eu-west-1a | |
NAME ROLE MACHINETYPE MIN MAX ZONES | |
master-eu-west-1a Master t2.medium 1 1 eu-west-1a | |
nodes Node t2.medium 3 3 eu-west-1a |
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
kops get cluster && kops get --name $KOPS_CLUSTER_NAME instancegroups |
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
kubectl cluster-info | |
Kubernetes master is running at https://api.dev.hub.tikal.io | |
Elasticsearch is running at https://api.dev.hub.tikal.io/api/v1/namespaces/kube-system/services/elasticsearch-logging/proxy | |
Heapster is running at https://api.dev.hub.tikal.io/api/v1/namespaces/kube-system/services/heapster/proxy | |
Kibana is running at https://api.dev.hub.tikal.io/api/v1/namespaces/kube-system/services/kibana-logging/proxy | |
KubeDNS is running at https://api.dev.hub.tikal.io/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy | |
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. |
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
kops cluster update # for preview | |
kops cluster update --yes |
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
kops replace -f ${KOPS_CLUSTER_NAME}-cluster.yaml | |
kops replace -f ${KOPS_CLUSTER_NAME}-ig.yaml` |
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
mkdir ./specs | |
kops get cluster --name ${KOPS_CLUSTER_NAME} -o yaml > ./specs/${KOPS_CLUSTER_NAME}-cluster.yaml | |
kops get --name ${KOPS_CLUSTER_NAME} instancegroups -o yaml > ./specs/${KOPS_CLUSTER_NAME}-ig.yaml |