Skip to content

Real Life test for The Protocol Master: Python, Java and .NetCore on Docker

License

Notifications You must be signed in to change notification settings

kendarorg/the-protocol-master-samples

Repository files navigation

The Protocol Master Sample

Table of Contents

These are simple environments to test The Protocol Master application. We will mock without a line of code the database and a rest api of a simple TODO web application.

Just for fun this is a .NET Core application with Entity Framework and very basic JQuery-based Front-End

  • The documentation for the protocol master is here

Prerequisites

  • A Docker environment
  • The Docker environment address (let's use DOCKER_SERVER for now)

Machine Dependant Stuffs! Beware

All .NET applications run out of the box only on Intel architecture, that means

  • Platform: linux/amd64
  • Target Architecture: amd64

For Apple M processors should work the following, change the HttpServer and RestServer dockerfile according to your needs (see on Microsoft for further info on the subject)

  • Platform: linux/arm64
  • Target Architecture: arm64

Simple TODO app (mysql,http,.NET)

(Thanks patrick-baker for the UI!)

If you have Intellij or know what are *.http files you can configure this setting the myhost variable to DOCKER_SERVER

Startup

  • Clone the repo https://github.com/kendarorg/the-protocol-master-samples.git
  • Configure your browser to use DOCKER_SERVER:29000 as HTTP/S Proxy
  • Navigate to the "net-core" directory
  • Run docker-compose up to generate the environment
  • Several containers will be created
    • net-core-tpm: The Protocol Master server
    • net-core-mysql: The mysql database
    • net-core-http: The web-ui
    • net-core-rest: The rest back-end
  • Download the SSL certificate from http://localhost:8081/api/protocols/http-01/plugins/ssl-plugin/der and install it as a trusted root certificate

You can check now the application navigating (in the proxied browser) to anything you want, and you will se the calls flowing on the console.

You can even try the application on http://net-core-http/index.html but for the sake of simplicity please delete all tasks before continuing the tutorial

Recording

Look Ma, NO DATABASE

Look Ma, NOT EVEN THE API SERVER

Simple quotes app (java,mysql,mqtt)

If you have Intellij or know what are *.http files you can configure this setting the myhost variable to DOCKER_SERVER

You can check the quotations going to http:\\java-rest\index.html

Startup

  • Clone the repo https://github.com/kendarorg/the-protocol-master-samples.git
  • Configure your browser to use DOCKER_SERVER:29000 as HTTP/S Proxy
  • Navigate to the "java" directory
  • Run docker-compose up to generate the environment
  • Several containers will be created
    • java-tpm: The Protocol Master server
    • java-mysql: The mysql database
    • java-mosquitto: The mqtt broker
    • java-rest: The application reading mqtt messages (and showing on APIs)
    • java-quote-generator: The quote generation (every 10 seconds random stock quotes)
  • Download the SSL certificate from http://localhost:8081/api/protocols/http-01/plugins/ssl-plugin/der and install it as a trusted root certificate
  • Connect your mysql ui to DOCKER_HOST:23306 and use the database db

Now your environment is ready for a real test!

Recording

Look Ma, NO BROKER

Simple quotes app (python,mysql,amqp)

If you have Intellij or know what are *.http files you can configure this setting the myhost variable to DOCKER_SERVER

You can check the quotations going to http:\\py-rest\index.html

Startup

  • Clone the repo https://github.com/kendarorg/the-protocol-master-samples.git
  • Configure your browser to use DOCKER_SERVER:29000 as HTTP/S Proxy
  • Navigate to the "python" directory
  • Run docker-compose up to generate the environment
  • Several containers will be created
    • py-tpm: The Protocol Master server
    • py-mysql: The mysql database
    • py-rabbit: The amqp broker
    • py-rest: The application reading mqtt messages (and showing on APIs)
    • py-quote-generator: The quote generation (every 10 seconds random stock quotes)
  • Download the SSL certificate from http://localhost:8081/api/protocols/http-01/plugins/ssl-plugin/der and install it as a trusted root certificate
  • Connect your mysql ui to DOCKER_HOST:23306 and use the database db

Now your environment is ready for a real test!

Recording

Look Ma, NO BROKER

If you like it Buy me a coffe :)

paypal


About

Real Life test for The Protocol Master: Python, Java and .NetCore on Docker

Resources

License

Stars

Watchers

Forks

Packages

No packages published