Skip to content

Commit

Permalink
Merge pull request #28 from Saetch/25-kubernetes-integration
Browse files Browse the repository at this point in the history
25 kubernetes integration
  • Loading branch information
Saetch authored Jun 27, 2024
2 parents fbef51b + 8e94dba commit dbf5342
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 9 deletions.
10 changes: 5 additions & 5 deletions Cluster/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- "5000:8080"
networks:
- distr-network
bicubic_interpolation_service:
bicubic:
container_name: bicubic_interpolation_service
image: ghcr.io/saetch/bicubic_interpolation_service:latest
build:
Expand All @@ -38,7 +38,7 @@ services:
replicas: 1 ## this is needed as of now. Do not change this or the values will be distributed unevenly. The coordinator is yet to be made replicatable
restart: "no"
depends_on:
- hasher_service
- hasher-service
nodecs:
image: ghcr.io/saetch/deightma_nodecs:latest
build:
Expand All @@ -53,7 +53,7 @@ services:
replicas: 7
depends_on:
- coordinator
- hasher_service
- hasher-service
hasher-service:
image: ghcr.io/saetch/hasher_service:latest
ports:
Expand Down Expand Up @@ -82,8 +82,8 @@ services:
- coordinator
- nodecs
- master
- hasher_service
- bicubic_interpolation_service
- hasher-service
- bicubic
networks:
distr-network:
driver: bridge
2 changes: 1 addition & 1 deletion Cluster/hasher_service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN cargo build --release


FROM alpine:3.19.1

RUN apk add curl
COPY --from=BUILDER /app/target/release/hasher_service /app/
WORKDIR /app/
CMD ["./hasher_service"]
6 changes: 3 additions & 3 deletions deploy/deploy-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
image: ghcr.io/saetch/deightma_coordinator:latest
ports:
- containerPort: 8080
name: coordinator-p
name: coord-port
env:
- name: DB_HOST
value: test-db
Expand All @@ -36,7 +36,7 @@ spec:
selector:
app: coordinator
ports:
- name: coordinator-p
- name: coord-port
protocol: TCP
port: 8080
targetPort: coordinator-p
targetPort: coord-port
42 changes: 42 additions & 0 deletions deploy/deploy-hasher_service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: hasher
spec:
selector:
matchLabels:
app: hasher
template:
metadata:
labels:
app: hasher
spec:
containers:
- name: app
image: ghcr.io/saetch/hasher_service:latest
ports:
- containerPort: 8080
name: hasher-port
env:
- name: DB_HOST
value: test-db
resources:
requests:
memory: "20Mi"
cpu: "10m"
limits:
memory: "100Mi"
cpu: "100m"
---
apiVersion: v1
kind: Service
metadata:
name: hasher-service
spec:
selector:
app: hasher
ports:
- name: hasher-port
protocol: TCP
port: 8080
targetPort: hasher-port

0 comments on commit dbf5342

Please sign in to comment.