Skip to content

Commit

Permalink
server and node agent README updated
Browse files Browse the repository at this point in the history
Signed-off-by: Aravinda Vishwanathapura <[email protected]>
  • Loading branch information
aravindavk committed Dec 27, 2020
1 parent befbcff commit 2aa801d
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 0 deletions.
76 changes: 76 additions & 0 deletions node/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# moana-node

Clone the repo

```
$ git clone https://github.com/kadalu/moana.git
$ cd moana.cr
```

Create Required directories in the node

```
$ mkdir /var/lib/moana \
/var/run/moana \
/var/lib/moana/volfiles \
/var/log/moana
```

Copy Systemd unit template file

```
$ cp extra/[email protected] /lib/systemd/system/
```

Copy glusterfsd wrapper script

```
$ cp extra/kadalu-brick /usr/sbin/
```

## Development Setup

Install Crystal

```
$ curl https://dist.crystal-lang.org/apt/setup.sh | sudo bash
$ sudo apt-get install build-essential crystal
```

Clone the repo

```
$ git clone https://github.com/kadalu/moana.git
$ cd moana
```

Install the dependencies and build the moana-node

```
$ cd node
$ shards install
$ export PATH=$PATH:$(pwd)/bin
$ shards build
```

Start the moana-node service,

```
$ moana-node
```

Options available are:

* `NODENAME` - Node name/host name to use with all Volume operations. Default `$(hostname)`
* `PORT` - Port of the service. If `ENDPOINT` is specified then takes the PORT from that. Default value is `4000` if Endpoint also not specified.
* `ENDPOINT` - Endpoint to use for in-cluster communication between nodes. Default is `$(hostname):${PORT}`
* `ENDPOINT_HTTPS` - If `yes` then use `https` for the endpoint URL else use `http`.
* `WORKDIR` - Workdir to save node/cluster configurations once joined to a Cluster. Default is `/var/lib/kadalu`

To run with the above options,

```
$ NODENAME=node1.example.com ENDPOINT=http://node1.local:4001 moana-node
```

Now `moana-node` is ready for getting Join request.
23 changes: 23 additions & 0 deletions server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Development Setup

Install Crystal

```
$ curl https://dist.crystal-lang.org/apt/setup.sh | sudo bash
$ sudo apt-get install build-essential crystal
```

Install the dependencies and build the moana-server

```
$ cd server
$ shards install
$ export PATH=$PATH:$(pwd)/bin
$ shards build
```

Start the moana-server service,

```
$ moana-server
```

0 comments on commit 2aa801d

Please sign in to comment.