-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding K8s service definition for the other parts of WebCrawler (#12)
* implementing TrackerService K8s * came up with a better way to encode CLUSTER_IP into Lighthouse and Tracker * Added K8s YAML file for WebCrawler * fixed issue with lighthouse YAML * cluster fully forms on K8s
- Loading branch information
1 parent
556e123
commit f2b419a
Showing
18 changed files
with
239 additions
and
18 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ petabridge.cmd{ | |
} | ||
|
||
akka { | ||
coordinated-shutdown.exit-clr = on | ||
actor { | ||
provider = cluster | ||
} | ||
|
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
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,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: web-cluster-http | ||
labels: | ||
app: web-cluster | ||
spec: | ||
type: LoadBalancer | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 9376 | ||
selector: | ||
app: web-cluster |
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,49 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: crawler | ||
labels: | ||
app: crawler | ||
spec: | ||
clusterIP: None | ||
ports: | ||
- port: 5213 | ||
selector: | ||
app: crawler | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: crawler | ||
labels: | ||
app: crawler | ||
spec: | ||
serviceName: crawler | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: crawler | ||
template: | ||
metadata: | ||
labels: | ||
app: crawler | ||
spec: | ||
terminationGracePeriodSeconds: 35 | ||
containers: | ||
- name: crawler | ||
image: webcrawler.crawlservice:0.2.1 | ||
env: | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: CLUSTER_IP | ||
value: "$(POD_NAME).crawler" | ||
- name: CLUSTER_SEEDS | ||
value: akka.tcp://webcrawler@lighthouse-0.lighthouse:4053,akka.tcp://webcrawler@lighthouse-1.lighthouse:4053,akka.tcp://webcrawler@lighthouse-2.lighthouse:4053 | ||
livenessProbe: | ||
tcpSocket: | ||
port: 5213 | ||
ports: | ||
- containerPort: 5213 | ||
protocol: TCP |
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,16 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: web-cluster-http | ||
labels: | ||
app: web-cluster | ||
tier: frontend | ||
spec: | ||
type: LoadBalancer | ||
ports: | ||
- nodePort: 31231 | ||
protocol: TCP | ||
port: 80 | ||
targetPort: 80 | ||
selector: | ||
app: web-cluster |
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,49 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: tracker | ||
labels: | ||
app: tracker | ||
spec: | ||
clusterIP: None | ||
ports: | ||
- port: 5212 | ||
selector: | ||
app: tracker | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: tracker | ||
labels: | ||
app: tracker | ||
spec: | ||
serviceName: tracker | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: tracker | ||
template: | ||
metadata: | ||
labels: | ||
app: tracker | ||
spec: | ||
terminationGracePeriodSeconds: 35 | ||
containers: | ||
- name: tracker | ||
image: webcrawler.trackerservice:0.2.1 | ||
env: | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: CLUSTER_IP | ||
value: "$(POD_NAME).tracker" | ||
- name: CLUSTER_SEEDS | ||
value: akka.tcp://webcrawler@lighthouse-0.lighthouse:4053,akka.tcp://webcrawler@lighthouse-1.lighthouse:4053,akka.tcp://webcrawler@lighthouse-2.lighthouse:4053 | ||
livenessProbe: | ||
tcpSocket: | ||
port: 5212 | ||
ports: | ||
- containerPort: 5212 | ||
protocol: TCP |
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,54 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: web-cluster | ||
labels: | ||
app: web-cluster | ||
spec: | ||
clusterIP: None | ||
ports: | ||
- port: 16666 | ||
selector: | ||
app: web-cluster | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: web-cluster | ||
labels: | ||
app: web-cluster | ||
spec: | ||
serviceName: web-cluster | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: web-cluster | ||
template: | ||
metadata: | ||
labels: | ||
app: web-cluster | ||
spec: | ||
terminationGracePeriodSeconds: 35 | ||
containers: | ||
- name: web-cluster | ||
image: webcrawler.web:0.2.1 | ||
env: | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: CLUSTER_IP | ||
value: "$(POD_NAME).web-cluster" | ||
- name: CLUSTER_SEEDS | ||
value: akka.tcp://webcrawler@lighthouse-0.lighthouse:4053,akka.tcp://webcrawler@lighthouse-1.lighthouse:4053,akka.tcp://webcrawler@lighthouse-2.lighthouse:4053 | ||
livenessProbe: | ||
tcpSocket: | ||
port: 16666 | ||
readinessProbe: | ||
tcpSocket: | ||
port: 80 | ||
ports: | ||
- containerPort: 16666 | ||
protocol: TCP | ||
- containerPort: 80 | ||
protocol: TCP |