diff --git a/whisper-distributed/devfile.yaml b/whisper-distributed/devfile.yaml new file mode 100644 index 0000000..9e5d4b3 --- /dev/null +++ b/whisper-distributed/devfile.yaml @@ -0,0 +1,153 @@ +schemaVersion: 2.2.0 +metadata: + name: whisper-distributed + version: 1.0.0 + +components: + # RabbitMQ + - name: rabbitmq + container: + image: rabbitmq:3-management + env: + - name: RABBITMQ_DEFAULT_USER + value: user + - name: RABBITMQ_DEFAULT_PASS + value: password + endpoints: + - name: amqp + targetPort: 5672 + protocol: tcp + - name: management + targetPort: 15672 + protocol: http + volumeMounts: + - name: rabbitmq-data + path: /var/lib/rabbitmq + + # Receiver service + - name: receiver + container: + image: receiver:latest + endpoints: + - name: http + targetPort: 8000 + protocol: http + volumeMounts: + - name: input-volume + path: /app/input + - name: shared-volume + path: /app/shared + + # Splitter service + - name: splitter + container: + image: splitter:latest + endpoints: + - name: http + targetPort: 8000 + protocol: http + volumeMounts: + - name: shared-volume + path: /app/shared + + # Processor1 service + - name: processor1 + container: + image: processor:latest + env: + - name: PROCESSOR_ID + value: "1" + endpoints: + - name: http + targetPort: 8000 + protocol: http + volumeMounts: + - name: shared-volume + path: /app/shared + + # Processor2 service + - name: processor2 + container: + image: processor:latest + env: + - name: PROCESSOR_ID + value: "2" + endpoints: + - name: http + targetPort: 8000 + protocol: http + volumeMounts: + - name: shared-volume + path: /app/shared + + # Unifier service + - name: unifier + container: + image: unifier:latest + endpoints: + - name: http + targetPort: 8000 + protocol: http + volumeMounts: + - name: shared-volume + path: /app/shared + - name: output-volume + path: /app/output + + # Volumes + - name: rabbitmq-data + volume: + size: 1Gi + + - name: shared-volume + volume: + size: 5Gi + + - name: input-volume + volume: + size: 2Gi + + - name: output-volume + volume: + size: 2Gi + +# Build commands for each service +commands: + # Build commands + - id: build-receiver + exec: + component: receiver + workingDir: /projects/receiver + commandLine: docker build -t receiver:latest . + + - id: build-splitter + exec: + component: splitter + workingDir: /projects/splitter + commandLine: docker build -t splitter:latest . + + - id: build-processor + exec: + component: processor1 + workingDir: /projects/processor + commandLine: docker build -t processor:latest . + + - id: build-unifier + exec: + component: unifier + workingDir: /projects/unifier + commandLine: docker build -t unifier:latest . + + # Composite build command + - id: build-all + composite: + commands: + - build-receiver + - build-splitter + - build-processor + - build-unifier + +# Events +events: + preStart: + - build-all \ No newline at end of file