Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions infrastructure/README.md
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions infrastructure/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion src/main/java/org/tron/command/Cli.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public void run(Peer peer) {
case "printblockchain":
new PrintBlockchainCommand().execute(peer, cmdParameters);
break;

case "consensus":
new ConsensusCommand().server();
break;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/tron/command/SendCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -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("");
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/tron.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ database-test {

# Kafka
kafka {
host = "11.11.11.12"
host = "127.0.0.1"
port = ":9092"
}