This repository has been archived by the owner on Sep 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Add AWS Deployment #1
Open
arsci
wants to merge
12
commits into
slalom:master
Choose a base branch
from
arsci:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
cab8947
add eks cluster, split tf into modules, add deployment commands to ma…
f22ca44
revert images
52923bb
revert images
arsci 090a72e
Merge branch 'master' of https://github.com/arsci/kafka-demo
arsci d129cf8
update for tf v0.11
arsci 9756135
add detail, info for 0.11
arsci 1b336ed
fix numbering
arsci 7617e7d
revert jenkins
arsci f2ff335
revert jenkins
arsci 46e63d3
changes based on PR comments/suggestions: Clearer Makefile naming con…
arsci 5ce4201
clarified instructions
arsci 4441994
updated naming convention, updated readme
arsci File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
File renamed without changes.
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module "cluster" { | ||
source = "github.com/terraform-aws-modules/terraform-aws-eks?ref=v4.0.2" | ||
cluster_name = "kafka-demo" | ||
subnets = ["${module.vpc.public_subnets}"] | ||
vpc_id = "${module.vpc.vpc_id}" | ||
cluster_create_timeout = "30m" | ||
cluster_delete_timeout = "30m" | ||
|
||
worker_groups = [ | ||
{ | ||
instance_type = "m4.large" | ||
asg_max_size = 2 | ||
asg_desired_capacity = 2 | ||
} | ||
] | ||
} | ||
|
||
data "aws_availability_zones" "available" {} | ||
data "aws_caller_identity" "current" {} | ||
data "aws_region" "current" {} | ||
|
||
output "account_id" { | ||
value = "${data.aws_caller_identity.current.account_id}" | ||
} | ||
|
||
output "region" { | ||
value = "${data.aws_region.current.name}" | ||
} | ||
|
||
module "vpc" { | ||
source = "terraform-aws-modules/vpc/aws" | ||
version = "1.60.0" | ||
name = "kafka-demo-vpc" | ||
cidr = "10.0.0.0/16" | ||
azs = ["${data.aws_availability_zones.available.names}"] | ||
public_subnets = ["10.0.4.0/24", "10.0.5.0/24", "10.0.6.0/24"] | ||
|
||
tags = { | ||
"kubernetes.io/cluster/kafka-demo" = "shared" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: tiller | ||
namespace: kube-system | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: tiller | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: cluster-admin | ||
subjects: | ||
- kind: ServiceAccount | ||
name: tiller | ||
namespace: kube-system |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
provider "helm" { | ||
} | ||
|
||
provider "kubernetes" { | ||
} | ||
|
||
provider "aws" { | ||
version = ">= 2.11" | ||
region = "us-west-2" | ||
} | ||
|
||
module "eks" { | ||
source = "./eks" | ||
providers = { | ||
aws = "aws" | ||
} | ||
} | ||
|
||
module "app" { | ||
source = "./app" | ||
providers = { | ||
helm = "helm" | ||
kubernetes = "kubernetes" | ||
} | ||
kafka-streams-img = "${var.deploy_aws == true ? join("." , list(module.eks.account_id,"dkr.ecr",module.eks.region,"amazonaws.com/kafka-streams:latest")) : "kafka-streams:latest"}" | ||
twitter-forwarder-img = "${var.deploy_aws == true ? join("." , list(module.eks.account_id,"dkr.ecr",module.eks.region,"amazonaws.com/twitter-forwarder:latest")) : "twitter-forwarder:latest"}" | ||
tweets-transformation-img = "${var.deploy_aws == true ? join("." , list(module.eks.account_id,"dkr.ecr",module.eks.region,"amazonaws.com/tweets-transformation:latest")) : "tweets-transformation:latest"}" | ||
} | ||
|
||
variable "deploy_aws" { | ||
type = "string" | ||
default = "false" | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. This is a bit confusing, that
tf.apply.local
is run for the AWS setup. Perhaps rename it to something else, maybe tf.apply.eks and tf.apply.app or something like that?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to
app
instead oflocal
.