diff --git a/samples/grpc/local-drone-control-java/kubernetes/deployment2.yml b/samples/grpc/local-drone-control-java/kubernetes/deployment2.yml new file mode 100644 index 000000000..ce3e3a7e0 --- /dev/null +++ b/samples/grpc/local-drone-control-java/kubernetes/deployment2.yml @@ -0,0 +1,54 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: local-drone-control-service-2 + name: local-drone-control-service-2 + namespace: local-drone-control-namespace +spec: + # note: the default image cannot scale out as it uses a local database + replicas: 1 + selector: + matchLabels: + app: local-drone-control-service-2 + template: + metadata: + labels: + app: local-drone-control-service-2 + actorSystemName: local-drone-control-service-2 + spec: + containers: + - name: restaurant-drone-deliveries-service-2 + # use specific image version from docker publish + image: johanandren/local-drone-control:20230922-090652-37e49e0 + # these will need to be increased/tuned for production environments! + resources: + limits: + memory: "512Mi" + requests: + memory: "512Mi" + cpu: "1000m" + ports: + - name: grpc + containerPort: 8080 + protocol: TCP + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: JAVA_TOOL_OPTIONS + value: "-XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75" + - name: LOCATION_ID + # one of the location ids supported by the restaurant-drone-deliveries service + value: "sweden/stockholm/norrmalm" + - name: CENTRAL_DRONE_CONTROL_HOST + # update with public endpoint for restaurant-drone-deliveries + value: k8s-restaura-restaura-5bd7dc845f-48570e637882db8c.elb.us-east-2.amazonaws.com + - name: CENTRAL_DRONE_CONTROL_PORT + value: "80" + - name: H2_DATABASE_PATH + # for state to survive restarts this would need to be a volume + # right now a restarted node will replay all orders from central + # and only report new drone updates + value: /tmp/drone-db diff --git a/samples/grpc/local-drone-control-scala/deploymentn.yml b/samples/grpc/local-drone-control-scala/deploymentn.yml new file mode 100644 index 000000000..e69de29bb diff --git a/samples/grpc/local-drone-control-scala/kubernetes/deploymentn.yml b/samples/grpc/local-drone-control-scala/kubernetes/deploymentn.yml new file mode 100644 index 000000000..18d74ebd3 --- /dev/null +++ b/samples/grpc/local-drone-control-scala/kubernetes/deploymentn.yml @@ -0,0 +1,67 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: local-drone-control-service-45 + name: local-drone-control-service-45 + namespace: local-drone-control-namespace +spec: + # note: the default image cannot scale out as it uses a local database + replicas: 1 + selector: + matchLabels: + app: local-drone-control-service-45 + template: + metadata: + labels: + app: local-drone-control-service-45 + actorSystemName: local-drone-control-service-45 + spec: + containers: + - name: restaurant-drone-deliveries-service-45 + # use specific image version from docker publish + image: johanandren/local-drone-control:1.5.0-M4-31-1976d92e-20231009-1730 + # these will need to be increased/tuned for production environments! + resources: + limits: + memory: "128Mi" + requests: + memory: "128Mi" + cpu: "100m" + ports: + - name: grpc + containerPort: 8080 + protocol: TCP + env: + - name: NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: JAVA_TOOL_OPTIONS + value: "-XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75" + - name: LOCATION_ID + # one of the location ids supported by the restaurant-drone-deliveries service + value: "sweden/stockholm/45" + - name: CENTRAL_DRONE_CONTROL_HOST + # update with public endpoint for restaurant-drone-deliveries + value: k8s-restaura-restaura-7b1be84b8e-04cc949d9f276f68.elb.us-east-2.amazonaws.com + - name: CENTRAL_DRONE_CONTROL_PORT + value: "80" + - name: H2_DATABASE_PATH + # for state to survive restarts this would need to be a volume + # right now a restarted node will replay all orders from central + # and only report new drone updates + value: /tmp/drone-db +--- +apiVersion: v1 +kind: Service +metadata: + name: local-drone-control-service-45-svc +spec: + selector: + app: local-drone-control-service-45 + type: NodePort + ports: + - protocol: TCP + port: 8080 + targetPort: 8080 \ No newline at end of file diff --git a/samples/grpc/restaurant-drone-deliveries-service-java/src/main/resources/persistence.conf b/samples/grpc/restaurant-drone-deliveries-service-java/src/main/resources/persistence.conf index a6f12c44a..64656b50e 100644 --- a/samples/grpc/restaurant-drone-deliveries-service-java/src/main/resources/persistence.conf +++ b/samples/grpc/restaurant-drone-deliveries-service-java/src/main/resources/persistence.conf @@ -48,4 +48,5 @@ akka.projection.grpc { akka.persistence.query.events-by-slice-firehose { delegate-query-plugin-id = "akka.persistence.r2dbc.query" } -# firehose \ No newline at end of file +# firehose + diff --git a/samples/grpc/restaurant-drone-deliveries-service-scala/src/main/resources/persistence.conf b/samples/grpc/restaurant-drone-deliveries-service-scala/src/main/resources/persistence.conf index a6f12c44a..64656b50e 100644 --- a/samples/grpc/restaurant-drone-deliveries-service-scala/src/main/resources/persistence.conf +++ b/samples/grpc/restaurant-drone-deliveries-service-scala/src/main/resources/persistence.conf @@ -48,4 +48,5 @@ akka.projection.grpc { akka.persistence.query.events-by-slice-firehose { delegate-query-plugin-id = "akka.persistence.r2dbc.query" } -# firehose \ No newline at end of file +# firehose +