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/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; 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(""); } 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