Skip to content

Docker Setup Requirements

Neha Jagtap edited this page Apr 24, 2021 · 1 revision

The following applies to the Fall 2020 Capstone Demo. The run configuration was two dockers containing

  • Parity-System
  • Parity-Client

EML-CTS was run in the "host" container; in the demo this was an Ubuntu Linux system running on localhost, to which Ubuntu assigned IP address 10.0.2.15 (which appears as the command line ip address for eml-cts in the parity-client docker file).

This demo is for the experimental dev-docker branch. This will run the parity system .jar inside of a Docker Container to demonstrate the flexible deployment provided by Docker containers.

What you need to replicate the demo

  • Ubuntu 20.04 LTS (run locally or on VirtualBox 6.1.16 r140961)
  • Linux x64 Compressed Archive for Java 1.8.0_271 (jdk-8u271-linux-x64.tar.gz)
  • Docker Engine client and server version 19.03.13 for linux/amd64
  • Mysql Ver 8.0.22 for Linux on x86_64 (MySQL Community Server - GPL)
  • Postman v7.36.0 for Linux

Setup Prerequisites

  1. Bootup Ubuntu and create Linux user "dockerubuntu"

  2. Install Docker Engine according to the Docker Documentation

  3. Install Linux Java version from the Oracle website.

  4. Install MySQL server from APT repository and set user permissions according to the Getting Started Guide (Create user eml@localhost and table nist_cts_eml. Grant all permissions on eml@localhost to nist_cts_eml.)

  5. Clone git repository from branch dev-docker. From the demo directory, move all folders and the json query unto the Desktop.

  1. Open a command terminal in each of the 3 folder directories. In system-run, create a Docker image from the Dockerfile with this command: docker build --tag system /home/dockerubuntu/Desktop/system-run/

  2. Create a docker network to run the container in with this command: docker network create --subnet=192.168.1.1/24 ctsnet

  3. Run the newly created Docker image inside a container using the specified IP with this command: docker run --net ctsnet --ip 192.168.1.50 --name system1 system

  4. Now, using the terminal in the parity-run directory, run the jar file on the local IP with this command: java -jar parity-client.jar 127.0.0.1 client0620.conf

  5. Run the cts-run shaded jar locally using this command: java -jar eml-cts.jar 127.0.0.1

  6. Run Postman and import the json file as a collection using the import button in the top left.

  7. Run the imported collection of requests. If done correctly, you should see activity in the eml-cts.jar window, and a list of buy requests if you type "orders" in the running parity-client.jar console.

Future Work Items:

  • Separate eml-cts into separate actors to deploy in separate docker contaners.
  • Typing to an application that expects a console (prompt for output comes out, can't type to it (output only))
  • Implement Docker Compose (Tool for defining and running multi-container Docker applications.)
  • Run everything in a docker container including eml-cts components/actors.
  • SQL connections and running eml-cts without requiring an SQL database.
  • Setup Dockerfiles that copy application directories from Github and build Maven .jars inside the docker image.

Clone this wiki locally