From 571e7bdca8ed16ef2230d85c42d8b5136d2aad5c Mon Sep 17 00:00:00 2001 From: Blake Jackson Date: Sun, 31 Dec 2017 10:51:48 -0500 Subject: [PATCH 1/3] Update SendCommand.java fixed typo --- src/main/java/org/tron/command/SendCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/tron/command/SendCommand.java b/src/main/java/org/tron/command/SendCommand.java index 886cb8ef438..d3374f2662c 100644 --- a/src/main/java/org/tron/command/SendCommand.java +++ b/src/main/java/org/tron/command/SendCommand.java @@ -48,7 +48,7 @@ public void execute(Peer peer, String[] parameters) { public void usage() { System.out.println(""); System.out.println("USAGE [send]:"); - System.out.println("Command: send [receiver] [mount]"); + System.out.println("Command: send [receiver] [amount]"); System.out.println("Description: Make a transaction."); System.out.println(""); } From c317a9e392c00c6338c17720e423d136d386629c Mon Sep 17 00:00:00 2001 From: Blake Jackson Date: Sun, 31 Dec 2017 10:53:38 -0500 Subject: [PATCH 2/3] Update Cli.java Removed extra line break --- src/main/java/org/tron/command/Cli.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/org/tron/command/Cli.java b/src/main/java/org/tron/command/Cli.java index 8d3774f1608..3be46f040fd 100644 --- a/src/main/java/org/tron/command/Cli.java +++ b/src/main/java/org/tron/command/Cli.java @@ -56,7 +56,6 @@ public void run(Peer peer) { case "printblockchain": new PrintBlockchainCommand().execute(peer, cmdParameters); break; - case "consensus": new ConsensusCommand().server(); break; From e864b305d7b883f887c401810859b5b54610a81c Mon Sep 17 00:00:00 2001 From: Blake Jackson Date: Sun, 31 Dec 2017 11:39:50 -0500 Subject: [PATCH 3/3] added ifrastructure to project --- infrastructure/README.md | 31 ++++++++++++++++++++++++ infrastructure/docker/docker-compose.yml | 15 ++++++++++++ src/main/resources/tron.conf | 2 +- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 infrastructure/README.md create mode 100644 infrastructure/docker/docker-compose.yml diff --git a/infrastructure/README.md b/infrastructure/README.md new file mode 100644 index 00000000000..d00661fb2bc --- /dev/null +++ b/infrastructure/README.md @@ -0,0 +1,31 @@ +The purpose for this folder is to provide developers with the infrastructure needed to run the application. These are +not the only solutions for running the application, but just some that have been used to get the application running. + +### What's in here? +Because the application requires several other components to be running, we've provided the developer an easy way to get +the dependencies up and running. Here are the dependencies: + +#### Kafka +Data streaming service + +#### Zookeeper +Stores shared data about consumers and brokers + +### Docker +Located in `docker/docker-compose.yml`, simply run the following command to get kafka and zookeeper up and running: + +```bash +cd docker +docker-compose up --build --force-recreate +``` + +*Alternatively, you can create a docker swarm with:* + +```bash +cd docker +docker stack deploy -c docker-compose.yml tron-stack +``` + + +### Kubernetes +TODO: provide this \ No newline at end of file diff --git a/infrastructure/docker/docker-compose.yml b/infrastructure/docker/docker-compose.yml new file mode 100644 index 00000000000..19efdd9ed1c --- /dev/null +++ b/infrastructure/docker/docker-compose.yml @@ -0,0 +1,15 @@ +version: '3' +services: + zookeeper: + image: wurstmeister/zookeeper:latest + ports: + - "2181:2181" + kafka: + image: wurstmeister/kafka:latest + ports: + - "7203:7203" + - "9092:9092" + environment: + KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1 + KAFKA_CREATE_TOPICS: "block:1:1,transaction:1:1" + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 \ No newline at end of file diff --git a/src/main/resources/tron.conf b/src/main/resources/tron.conf index dc02178910f..83c7f655cd5 100644 --- a/src/main/resources/tron.conf +++ b/src/main/resources/tron.conf @@ -17,6 +17,6 @@ database-test { # Kafka kafka { - host = "11.11.11.12" + host = "127.0.0.1" port = ":9092" } \ No newline at end of file