-
-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
149 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Deploying Emitter with Kubernetes on AWS | ||
|
||
This directory contains Kubernetes configuration files which can be used to deploy an [production-grade cluster of emitter](https://emitter.io) on Amazon Web Services (EKS). | ||
|
||
In order to get emitter running, you'll need to have `kubectl` [tool installed](https://kubernetes.io/docs/tasks/tools/install-kubectl/) and an [Amazon Web Services](https://aws.amazon.com) account. | ||
|
||
``` | ||
kubectl apply -f storage_ssd.yaml | ||
kubectl apply -f service_dns.yaml | ||
kubectl apply -f service_loadbalancer.yaml | ||
kubectl apply -f broker.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
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,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: broker | ||
labels: | ||
app: broker | ||
spec: | ||
clusterIP: None # Headless would give us a DNS name | ||
selector: | ||
app: broker | ||
ports: # No port is actually required for this | ||
- port: 4000 | ||
targetPort: 4000 |
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,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: broker-loadbalancer | ||
spec: | ||
type: LoadBalancer | ||
selector: | ||
app: broker | ||
ports: | ||
- port: 80 | ||
targetPort: 8080 | ||
name: http | ||
- port: 443 | ||
targetPort: 443 | ||
name: https |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Deploying Emitter with Kubernetes on Azure | ||
|
||
This directory contains Kubernetes configuration files which can be used to deploy an [production-grade cluster of emitter](https://emitter.io) on Microsoft Azure (AKS). | ||
|
||
In order to get emitter running, you'll need to have `kubectl` [tool installed](https://kubernetes.io/docs/tasks/tools/install-kubectl/) and an [Microsoft Azure](https://azure.microsoft.com) account. | ||
|
||
``` | ||
kubectl apply -f storage_ssd.yaml | ||
kubectl apply -f service_dns.yaml | ||
kubectl apply -f service_loadbalancer.yaml | ||
kubectl apply -f broker.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: broker | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: broker # has to match .spec.template.metadata.labels | ||
serviceName: "broker" | ||
replicas: 3 | ||
template: | ||
metadata: | ||
labels: | ||
app: broker | ||
role: broker | ||
spec: | ||
terminationGracePeriodSeconds: 30 | ||
affinity: | ||
podAntiAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- labelSelector: | ||
matchExpressions: | ||
- key: app | ||
operator: In | ||
values: | ||
- broker | ||
topologyKey: kubernetes.io/hostname | ||
containers: | ||
- env: | ||
- name: EMITTER_LICENSE | ||
value: "..." # <- Provide license | ||
- name: EMITTER_CLUSTER_SEED | ||
value: "broker" # or "broker-0.broker.default.svc.cluster.local" | ||
- name: EMITTER_CLUSTER_ADVERTISE | ||
value: "private:4000" | ||
- name: EMITTER_STORAGE_PROVIDER | ||
value: "ssd" | ||
name: broker | ||
image: emitter/server:latest | ||
ports: | ||
- containerPort: 8080 | ||
- containerPort: 443 | ||
- containerPort: 4000 | ||
volumeMounts: | ||
- name: broker-volume | ||
mountPath: /data | ||
restartPolicy: Always | ||
updateStrategy: | ||
type: RollingUpdate | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: broker-volume | ||
annotations: | ||
volume.beta.kubernetes.io/storage-class: "fast" | ||
spec: | ||
accessModes: [ "ReadWriteOnce" ] | ||
resources: | ||
requests: | ||
storage: 50Gi |
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,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: broker | ||
labels: | ||
app: broker | ||
spec: | ||
clusterIP: None # Headless would give us a DNS name | ||
selector: | ||
app: broker | ||
ports: # No port is actually required for this | ||
- port: 4000 | ||
targetPort: 4000 |
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,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: broker-loadbalancer | ||
spec: | ||
type: LoadBalancer | ||
selector: | ||
app: broker | ||
ports: | ||
- port: 80 | ||
targetPort: 8080 | ||
name: http | ||
- port: 443 | ||
targetPort: 443 | ||
name: https |
File renamed without changes.
File renamed without changes.
File renamed without changes.