Code Monkey home page Code Monkey logo

go-k8s-srv2's Introduction

go-k8s-srv2

icap-service-2

Go Report Card Contributions welcome Apache License, Version 2.0

This service is as per the architecture the first proxy service that will get the file from icap-server and upload it to minio

Steps of processing

When it starts

  • Listens on the queue
  • Get the file from the processing outcome queue
  • Copy that file to the shared disk
  • Notify icap server on the adaptation outcome queue

Configuration

  • This pod need to mount the share storage mounted on icap server and that is how they will share the file together
  • It's possible to have multiple replica of this service running. Only one will get the file and process itdj

Docker build

  • To build the docker image
git clone https://github.com/k8-proxy/go-k8s-srv2
cd k8-proxy/go-k8s-srv2
docker build -t <docker_image_name> .
  • To run the container First make sure that you have rabbitmq and minio running, then run the command bellow
docker run -e ADAPTATION_REQUEST_QUEUE_HOSTNAME='<rabbit-host>' \ 
-e ADAPTATION_REQUEST_QUEUE_PORT='<rabbit-port>' \
-e MESSAGE_BROKER_USER='<rabbit-user>' \
-e MESSAGE_BROKER_PASSWORD='<rabbit-password>' \
-e MINIO_ENDPOINT='<minio-endpoint>' \ 
-e MINIO_ACCESS_KEY='<minio-access>' \ 
-e MINIO_SECRET_KEY='<minio-secret>' \ 
-e MINIO_SOURCE_BUCKET='<bucket-to-upload-file>' \ 
--name <docker_container_name> <docker_image_name>

Testing steps

  • Run the container as mentionned above

  • Publish data reference to rabbitMq on queue name : adaptation-request-queue with the following data(table) :

  • file-id : An ID for the file
  • source-file-location : The full path to the file
  • rebuilt-file-location : A full path representing the location where the rebuilt file will go to
  • Check your container logs to see the processing
docker logs <container name>

Rebuild flow to implement

new-rebuild-flow-v2

go-k8s-srv2's People

Contributors

azopat avatar dtollaku avatar ibrahimk9000 avatar mahnouman avatar mohammedbakr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.