View vpc
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
module "vpc" { | |
source = "terraform-aws-modules/vpc/aws" | |
version = "2.6.0" | |
name = var.cluster_name | |
cidr = "10.2.0.0/16" | |
azs = data.aws_availability_zones.available.names | |
private_subnets = ["10.2.0.0/20", "10.2.16.0/20", "10.2.32.0/20"] | |
public_subnets = ["10.2.48.0/20", "10.2.64.0/20", "10.2.80.0/20"] | |
enable_dns_hostnames = true |
View worker_groups_launch_template
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
worker_groups_launch_template = [ | |
{ | |
name = "spot-1" | |
# override_instance_types = ["m5.large", "m5a.large", "m5d.large", "m5ad.large"] | |
override_instance_types = ["t3a.medium", "t3.medium"] | |
spot_instance_pools = 2 | |
asg_max_size = 3 | |
asg_desired_capacity = 1 | |
kubelet_extra_args = "--node-labels=node.kubernetes.io/lifecycle=spot" | |
public_ip = true |
View backend.tf
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
terraform { | |
backend "s3" { | |
bucket = "{{CLUSTER_NAME}}" | |
key = "terraform.tfstate" | |
region = "{{REGION}}" | |
# dynamodb_table = "test-eks-spot-locks" | |
encrypt = true | |
} | |
} |
View cluster-autoscaler.tf
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
# taken and adapted from here to get it working: | |
# https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/docs/autoscaling.md | |
resource "aws_iam_role_policy_attachment" "workers_autoscaling" { | |
policy_arn = aws_iam_policy.worker_autoscaling.arn | |
role = module.eks.worker_iam_role_name | |
} | |
resource "aws_iam_policy" "worker_autoscaling" { | |
name_prefix = "ClusterAutoScalingPolicy-${var.cluster_name}" |
View task-deploy.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
apiVersion: tekton.dev/v1alpha1 | |
kind: Task | |
metadata: | |
name: deploy-application | |
spec: | |
inputs: | |
resources: | |
- name: git-source | |
type: git | |
params: |
View task-build-src.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
apiVersion: tekton.dev/v1alpha1 | |
# apiVersion: tekton.dev/v1beta1 | |
kind: Task | |
metadata: | |
name: build-image-from-source | |
spec: | |
inputs: | |
resources: | |
- name: git-source | |
type: git |
View git-resource.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
apiVersion: tekton.dev/v1alpha1 | |
kind: PipelineResource | |
metadata: | |
name: git | |
spec: | |
type: git | |
params: | |
- name: revision | |
value: master | |
- name: url |
View hello-helm-values.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
replicaCount: 2 | |
image: | |
repository: kubernautslabs/hello-helm | |
tag: latest | |
pullSecret: regsecret | |
pullPolicy: Always | |
#pullPolicy: Never | |
service: | |
name: hello-service | |
type: LoadBalancer |
View aks-terraform-variables
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
variable "client_id" {} | |
variable "client_secret" {} | |
variable "agent_count" { | |
default = 1 | |
} | |
variable "ssh_public_key" { | |
default = "~/.ssh/id_rsa.pub" |
View haproxy-heartbeat-master-vip.sh
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
#!/usr/bin/env bash | |
# by casey siens | |
#RUN THIS AS ROOT. YOU MUST BE ABLE TO SSH TO EACH NODE AS ROOT! IGNORE THE RED WARNINGS WHEN THE SERVICES START DURING THE INSTALL!!! ALLOW THE SCRIPT TO FINISH!!! | |
#List of master node ips. | |
ha_master_ip_list="10.9.8.21 10.9.8.22 10.9.8.23" | |
#VIP for ha. | |
ha_vip="10.9.8.20" |
NewerOlder