Skip to content

Commit

Permalink
Added docker docs to launch a client node + some docs corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
amalcaraz committed Sep 17, 2018
1 parent 547f41d commit 8020583
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 11 deletions.
62 changes: 52 additions & 10 deletions source/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,55 @@
title: How to run the node
title: How to run a client node
--------------------------

## What you'll need
## Using Docker

The easiest way of launching a client node is using the [official docker image](https://hub.docker.com/r/nuls/client-node/)

[Docker](https://www.docker.com/) is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.

You can run a full nuls client node with a single line:
```sh
docker run --name nuls-node -d \
-p 127.0.0.1:6001:6001 \
-v /tmp/nuls/logs:/nuls/logs \
-v /tmp/nuls/data:/nuls/data \
nuls/client-node:1.0.1
```

By default the client interface is accessible in the port `6001`, so once the node is running, check that everything is working visiting the url [localhost:6001](http://localhost:6001) in your browser.

After that, try open the commands shell of the node by running:
```sh
docker exec -it nuls-node /nuls/bin/cmd.sh

# Then get a list of available shell commands
>> help
```

To see the node logs run:
```sh
docker logs -f nuls-node
```

All the data generated by the node is stored in the mounted volume `/tmp/nuls/data`.
You can read more details about how to configure the client node container [here](https://hub.docker.com/r/nuls/client-node/).

## Building it from source code

### What you will need

* JDK 1.8
* Maven 3.3+
* Git 2.x
* IDE ( Optional )

## Getting Source
### Getting source

```sh
$ git clone https://github.com/nuls-io/nuls.git && cd nuls
```

## Build Source
### Building from source

Make sure the JDK version is 1.8

Expand All @@ -26,8 +61,15 @@ Java version: 1.8.0_171, vendor: Oracle Corporation, runtime: /Library/Java/Java
```

If the Java version is not 1.8, it is recommended to install and set it to version 1.8.
In some linux distributions, the package `JavaFX` is not included as part of the `openjdk` package. You can get it installing the package `openjfx`:

Now,we can build the node.
```sh
apt-get update && \
apt-get -y install \
openjfx
```

Now, we can build the node.

```
$ mvn clean package
Expand All @@ -37,8 +79,9 @@ After the command is successfully executed, you can find the compilation result

> client-module/client/target/nuls-node.tar.gz
## Run Node
### Running the node

Unpackage the binaries:
```shell
$ mvn clean package
$ cd client-module/client/target
Expand All @@ -47,10 +90,9 @@ $ tar -zxvf nuls-node.tar.gz -C nuls-node
$ cd nuls-node/bin
```

- Using start.sh running the nuls process.
- Using stop.sh stop the nuls process.
- Using cmd.sh running the nuls shell.

- Use `./start.sh` to run the nuls process.
- Use `./stop.sh` to stop the nuls process.
- Use `./cmd.sh` to run the nuls shell.

## Use IDEA

Expand Down
2 changes: 1 addition & 1 deletion themes/nuls/languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ page:
sidebar:
docs:
started: Getting Started
overview: Guide
overview: Running a node
manual: Manual

protocol:
Expand Down

0 comments on commit 8020583

Please sign in to comment.