Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
itadventurer committed Jun 18, 2024
1 parent 6fc04d7 commit 8f42684
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 10 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/ghcr-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,11 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v4
# need to repeat the build for following directories:
# - csp1_producer
# - csp1_consumer
# - csp1_transformer
# - csp2_producer
# - csp2_transformer
# - dashboard

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build and push csp1_producer
- name: Build and push everything
run: |
cd csp1_producer
# todo:
for DIR in csp2_transformer csp1_producer csp1_consumer csp1_transformer csp2_producer dashboard ;do
IMAGE_NAME=$PROJECT/$DIR
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
Expand Down
40 changes: 40 additions & 0 deletions kubernetes/csp1_consumer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: csp1-consumer
labels:
app: csp1-consumer
spec:
replicas: 1
selector:
matchLabels:
app: csp1-consumer
template:
metadata:
labels:
app: csp1-consumer
spec:
containers:
- name: csp1-consumer
image: ghcr.io/kafka-trainings/example-project/csp1_consumer:latest
ports:
- containerPort: 8080
volumeMounts:
- name: config
mountPath: /app/app.properties
volumes:
- name: config
configMap:
name: csp1-consumer-config
---
apiVersion: v1
kind: ConfigMap
metadata:
name: csp1-consumer-config
data:
app.properties: |
bootstrap.servers=broker:9092
topic=csp1_transactions
group.id=csp1_consumer
app.log.infos=true
client.id=csp1_consumer
40 changes: 40 additions & 0 deletions kubernetes/csp1_producer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: csp1-producer
labels:
app: csp1-producer
spec:
replicas: 1
selector:
matchLabels:
app: csp1-producer
template:
metadata:
labels:
app: csp1-producer
spec:
containers:
- name: csp1-producer
image: ghcr.io/kafka-trainings/example-project/csp1_producer:latest
ports:
- containerPort: 8080
volumeMounts:
- name: config
mountPath: /app/app.properties
volumes:
- name: config
configMap:
name: csp1-producer-config
---
apiVersion: v1
kind: ConfigMap
metadata:
name: csp1-producer-config
data:
app.properties: |
bootstrap.servers=broker:9092
topic=csp1_transactions
producer.msgs.per.sec=1
app.log.infos=true
client.id=csp1_producer

0 comments on commit 8f42684

Please sign in to comment.