Git Product home page Git Product logo

art-vinsguru-spring-docker's Introduction

CircleCI codecov Java CI with Maven Spring Boot version

Docker Testcontainers version MongoDB Container Elasticsearch Container Kibana NGINX Container MockServer Container ZIPKIN Container

GitHub issues Project licence

art-vinsguru-spring-docker

Tutorial - Docker From Scratch [For Spring Developers] - from Vinoth Selvaraj (Udemy)

Documentation

  1. Docker commands
  2. Linux commands cheat sheet

Section 4: Docker Crash Course


Section 6: Dockerizing Spring Application

76. Docker Compose Build Option

  • docker-compose build
  • OR
  • docker-compose up --build -d

77. Docker Compose Profile

To start only certain service we have several opportunities

  1. Use command argument
    • docker-compose up mongo -d - starts only mongo service
  2. Use profiles
    • docker-compose up -d - only mongo_stack starts
    • docker-compose --profile=app up -d - additionally starts services with profile app

78. Multi Stage Dockerfile

  1. Command line:

    • art-vinsguru-spring-docker\job-service> docker build -t artarkatesoft/art-vinsguru-job-service:multistage -f ./Dockerfile-multistage ./../
  2. Docker-compose:

    • art-vinsguru-spring-docker\docker-compose\art-vinsguru-docker> docker-compose --profile=multistage-build build

79. Build Pack

  • mvn spring-boot:build-image

Section 9: Mockserver

Mockserver dashboard


8 Consolidated Logging with ELK Stack

8.2 Running elastic search with docker

  1. Start full stack with elastic cluster
    • docker-compose --profile=app --profile=logging-elk up
  2. In case of error in Windows
    • max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
    • use commands for Windows
    • wsl -d docker-desktop
    • sysctl -w vm.max_map_count=262144
    • or permanently add vm.max_map_count = 262144 to /etc/sysctl.conf

8.6. View Logs in Kibana

  1. Start full stack with elastic cluster
    • docker-compose --profile=app --profile=logging-elk up -d
  2. View filebeat logs
  • Exiting: error loading config file: config file ("filebeat.yml") can only be writable by the owner but the permissions are "-rwxrwxrwx" (to fix the permissions use: 'chmod go-w /usr/share/filebeat/filebeat.yml')
  • in Windows we can disable the permission checking by adding:
    • command: filebeat -e -strict.perms=false
  1. View logs
  • localhost: 5601
  • Kibana -> Discover ->
  • Create index pattern
    • Your index pattern matches 2 sources.
    • Index pattern name: filebeat*
    • Next step
  • Select a primary time field for use with the global time filter.
    • @timestamp
    • Create index pattern
  • Kibana -> Discover

11 Distributed Tracing with Zipkin

11.5 View trace and dependencies in Zipkin

  • Find a trace

Zipkin tracing

  • View dependencies (other microservices)

Zipkin dependencies

  • Find logs of a request by trace_id in Kibana

Kibana Logs

11.6 Persisting Zipkin data into Elasticsearch

  1. Add index pattern into Kibana
    • Menu → Management → Stack Management →
    • Index Patterns → Create index pattern → zipkin*
  2. Discover zipkin data
    • Discover → Change index pattern → zipkin*
    • by traceId
      • i.e. traceId : "13eb59a6cfc10547" (choose one)

Certificate of Completion

Certificate of completion

art-vinsguru-spring-docker's People

Contributors

artshishkin avatar

Watchers

 avatar

art-vinsguru-spring-docker's Issues

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.