Coder Social home page Coder Social logo

dsirine / spring-petclinic-microservices Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spring-petclinic/spring-petclinic-microservices

0.0 0.0 1.0 131.21 MB

Distributed version of Spring Petclinic built with Spring Cloud

License: Apache License 2.0

Shell 16.73% JavaScript 7.25% Java 55.10% HTML 9.86% Dockerfile 1.04% Less 6.68% HCL 3.34%

spring-petclinic-microservices's Introduction

Starting services locally with docker-compose

In order to start entire infrastructure using Docker, you have to build images by executing from a project root: ./mvnw clean install -P buildDocker then docker-compose up. You can reach all services as following:

Start a MySql database

You may start a MySql database with docker:

docker run -e MYSQL_ROOT_PASSWORD=petclinic -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:5.7.8

or download and install the MySQL database (e.g., MySQL Community Server 5.7 GA), which can be found here: https://dev.mysql.com/downloads/

Jenkins

In order to change Jenkins Port Number From 8080 To Any Port Number(9999), to Avoid Conflict Of Other Services because Default Port No. 8080 For Jenkins and many Other services is same, you can just follow this steps:

`nano /etc/default/jenkins`  

change `HTTP_PORT = 8080` to `HTTP_PORT = 9999`  

save file and now change Dir. to `sudo nano /lib/systemd/system/jenkins.service`  

change Environment ="JENKINS_PORT=8080" to Previously written Port No.  

`Environment="JENKINS_PORT=9999"`  

and now:  

`sudo systemctl restart jenkins.service`  

You can check the url of jenkins on http://localhost:9999  

Integrate GitHub Repository to Jenkins:

To integrate Jenkins and GitHub to improve the efficiency of building, testing, and deploying your code, you should to schedule your build, pull code and data files from GitHub repository to Jenkins machine, by adding a webhook and the select Pushes trigger event with my repository and you have to install ngrok to give public url.

Configuring Jenkins

To configure jenkins with aws, you should to install the pluguin aws in jenkins manger and the add aws credential to jenkins credential

Cloudformation

To build our infrastructure , you can execute this command from CloudFormation folder

aws cloudformation create-stack --stack-name petclinic --region eu-west-3 --template-body file://network.yml --parameters file://network.json --capabilities CAPABILITY_NAMED_IAM

Kubernetes

In order to deploy our project in K8S, you should install all ressources via Helm Chart by executing the script run_kubernetes.sh as follow:

chmod +x run_kubernetes.sh

./run_kubernetes.sh

you can check all ressources in petclinic namespace:

kubens petclinic

kubectl get all

Monitoring

Grafana and Prometheus are included in the docker-compose.yml configuration

Using Prometheus

Using Grafana with Prometheus

spring-petclinic-microservices's People

Contributors

arey avatar dsirine avatar mszarlinski avatar verydapeng avatar cyrille-leclerc avatar gordonad avatar tduchateau avatar jpaszek avatar rstoyanchev avatar jonatan-ivanov avatar damc-dev avatar andeemarks avatar srenkens avatar mklose avatar donydex avatar boly38 avatar akashsolanki avatar vladfau avatar tejasm avatar ramazansakin avatar philweber avatar xaseron avatar mrumpf avatar marcingrzejszczak avatar mahdieha avatar lukasforst avatar garrying avatar craigsdennis avatar cbeams avatar bram-atmire avatar

Forkers

rawand-yezza

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.