GithubHelp home page GithubHelp logo

sd-workshop3's Introduction

Sebastian Navia.

First make sure that the databases are turned on so that the services can connect to them.

We turn on mysql for the pay microservice, we turn on MongoDb for the transaction microservice, we turn on postgres for the invoice microservice.

We also turn on kafka to fulfill its broker function.

For the postgres and mysql we create their respective images:

POSTGRES:

Go to the folder resorces/mysql

  • docker build -t sebastiannavia/postgres
  • docker push sebastiannavia/postgres
  • docker run -p 5432:5432 --name postgres --network distribuidos -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=db_invoice -d sebastiannavia/postgres

MYSQL:

Go to the folder resorces/mysql

  • docker build -t sebastiannavia/mysql
  • docker push sebastiannavia/mysql
  • docker run -p 3306:3306 --name mysql --network distribuidos -e MYSQL_ROOT_PASSWORD=mysql -e MYSQL_DATABASE=db_operation -d sebastiannavia/mysql

run MongoDB:

  • docker run -p 27017:27017 --network distribuidos --name mongodb -d mongo

imagen

Run Kafka

  • docker run -p 2181:2181 -d -p 9092:9092 --name servicekafka --network distribuidos -e ADVERTISED_HOST=servicekafka -e NUM_PARTITIONS=3 johnnypark/kafka-zookeeper:2.6.0

Then we raise the services. For example; We create the app-config image, then we upload it and finally we run it. - Keep in mind that to create and upload the image we must be inside the service folder, in this case app-config.

  • docker build -t sebastiannavia/app-config .
  • docker push sebastiannavia/app-config
  • docker run -d -p 8888:8888 --network distribuidos --name app-config sebastiannavia/app-config

For the other services it would be the same process, only the port described in the dockerfile of each service changes and at the time of running the service.

imagen

We observe that all our services are uploaded, and although it is not necessary for this delivery, we can verify that the services are in operation thanks to the consul.

imagen

In order for the service to work, only a part of the code was changed into: app-invoice/src/main/java/kafka/consumer/

imagen

sd-workshop3's People

Contributors

icesi-ops avatar sebastianavia 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.