Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding TWINS coin #161

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,47 +56,47 @@ Comparing with building from source manually, you will benefit from using this s
SSH to your VPS and clone the Github repository:

```bash
git clone https://github.com/masternodes/vps.git && cd vps
git clone https://github.com/NewCapital/nodemaster.git && cd nodemaster
```

Install & configure your desired master node with options:

```bash
./install.sh -p pivx
./install.sh -p twins
```

## Examples for typical script invocation

These are only a couple of examples for typical setups. Check my [easy step-by-step guide for [vultr](/docs/masternode_vps.md) that will guide you through the hardest parts.

**Install & configure 4 PIVX masternodes:**
**Install & configure 4 TWINS masternodes with IPv6 support:**

```bash
./install.sh -p pivx -c 4
./install.sh -p twins -c 4 -n 6
```

**Update daemon of previously installed PIVX masternodes:**
**Update daemon of previously installed TWINS masternodes to the latest version:**

```bash
./install.sh -p pivx -u
./install.sh -p twins -u
```

**Install 6 PIVX masternodes with the git release tag "tags/v3.0.5.1"**
**Install 6 TWINS masternodes with the git release tag "tags/v3.2.2.2"**

```bash
./install.sh -p pivx -c 6 -r "tags/v3.0.5.1"
./install.sh -p twins -c 6 -r "tags/v3.2.2.2"
```

**Wipe all PIVX masternode data:**
**Wipe all TWINS masternode data:**

```bash
./install.sh -p pivx -w
./install.sh -p twins -w
```

**Install 2 PIVX masternodes and configure sentinel monitoring:**
**Install 2 TWINS masternodes and configure sentinel monitoring:**

```bash
./install.sh -p pivx -c 2 -s
./install.sh -p twins -c 2 -s
```

## Options
Expand All @@ -105,9 +105,9 @@ The _install.sh_ script support the following parameters:

| Long Option | Short Option | Values | description |
| :----------- | :----------- | ------------------- | ------------------------------------------------------------------- |
| --project | -p | project, e.g. "pix" | shortname for the project |
| --project | -p | project,e.g."twins" | shortname for the project |
| --net | -n | "4" / "6" | ip type for masternode. (ipv)6 is default |
| --release | -r | e.g. "tags/v3.0.4" | a specific git tag/branch, defaults to latest tested |
| --release | -r | e.g. "tags/v3.2.0.6"| a specific git tag/branch, defaults to latest tested |
| --count | -c | number | amount of masternodes to be configured |
| --update | -u | -- | update specified masternode daemon, combine with -p flag |
| --sentinel | -s | -- | install and configure sentinel for node monitoring |
Expand All @@ -117,10 +117,10 @@ The _install.sh_ script support the following parameters:

## Troubleshooting the masternode on the VPS

If you want to check the status of your masternode, the best way is currently running the cli e.g. for $MUE via
If you want to check the status of your masternode, the best way is currently running the cli e.g. for TWINS via

```
/usr/local/bin/mue-cli -conf=/etc/masternodes/mue_n1.conf getinfo
/usr/local/bin/twins-cli -conf=/etc/masternodes/twins_n1.conf getinfo

{
"version": 1000302,
Expand Down Expand Up @@ -162,12 +162,12 @@ The management script release will follow within the next couple of days.

| command | description |
| :------------------------------------ | -------------------------------------------- |
| nodemaster start pivx (all\|number) | start all or a specific pivx masternode(s) |
| nodemaster restart pivx (all\|number) | stop all or a specific pivx masternode(s) |
| nodemaster stop pivx (all\|number) | restart all or a specific pivx masternode(s) |
| nodemaster cleanup pivx (all\|number) | delete chain data for all pivx masternodes |
| nodemaster status pivx (all\|number) | systemd process status for a pivx masternode |
| nodemaster tail pivx (all\|number) | tail debug logs for a pivx masternode |
| nodemaster start twins (all\|number) | start all or a specific twins masternode(s) |
| nodemaster restart twins (all\|number) | stop all or a specific twins masternode(s) |
| nodemaster stop twins (all\|number) | restart all or a specific twins masternode(s) |
| nodemaster cleanup twins(all\|number) | delete chain data for all twins masternodes |
| nodemaster status twins (all\|number) | systemd process status for a twins masternode |
| nodemaster tail twins (all\|number) | tail debug logs for a twins masternode |

# Todo

Expand Down
Binary file added assets/fix.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/twins.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions config/dogec/dogec.compile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
chmod u+x share/genbuild.sh
chmod u+x src/leveldb/build_detect_platform
chmod u+x ./autogen.sh && ./autogen.sh
./configure --disable-dependency-tracking --enable-tests=no --without-gui --without-miniupnpc
make
make install
8 changes: 8 additions & 0 deletions config/dogec/dogec.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CODENAME=dogec
MNODE_DAEMON=${MNODE_DAEMON:-/usr/local/bin/dogecashd}
MNODE_INBOUND_PORT=${MNODE_INBOUND_PORT:-56740}
GITHUB_REPO="dogecash/dogecash"
GITHUB_URL="https://github.com/${GITHUB_REPO}"
GIT_URL="${GITHUB_URL}.git"
RELEASE_URL=$(curl -Ls -o /dev/null -w %{url_effective} ${GITHUB_URL}/releases/latest)
SCVERSION="tags/${RELEASE_URL##*/}"
7 changes: 7 additions & 0 deletions config/fix/fix.compile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
chmod u+x share/genbuild.sh
chmod u+x src/leveldb/build_detect_platform
chmod u+x ./autogen.sh && ./autogen.sh
./configure --disable-dependency-tracking --enable-tests=no --without-gui --without-miniupnpc
make
make install
8 changes: 8 additions & 0 deletions config/fix/fix.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CODENAME=fix
MNODE_DAEMON=${MNODE_DAEMON:-/usr/local/bin/fixd}
MNODE_INBOUND_PORT=${MNODE_INBOUND_PORT:-17464}
GITHUB_REPO="NewCapital/FIX-Core"
GITHUB_URL="https://github.com/${GITHUB_REPO}"
GIT_URL="${GITHUB_URL}.git"
RELEASE_URL=$(curl -Ls -o /dev/null -w %{url_effective} ${GITHUB_URL}/releases/latest)
SCVERSION="tags/${RELEASE_URL##*/}"
7 changes: 7 additions & 0 deletions config/twins/twins.compile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
chmod u+x share/genbuild.sh
chmod u+x src/leveldb/build_detect_platform
chmod u+x ./autogen.sh && ./autogen.sh
./configure --disable-dependency-tracking --enable-tests=no --without-gui --without-miniupnpc
make
make install
8 changes: 8 additions & 0 deletions config/twins/twins.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CODENAME=twins
MNODE_DAEMON=${MNODE_DAEMON:-/usr/local/bin/twinsd}
MNODE_INBOUND_PORT=${MNODE_INBOUND_PORT:-37817}
GITHUB_REPO="NewCapital/TWINS-Core"
GITHUB_URL="https://github.com/${GITHUB_REPO}"
GIT_URL="${GITHUB_URL}.git"
RELEASE_URL=$(curl -Ls -o /dev/null -w %{url_effective} ${GITHUB_URL}/releases/latest)
SCVERSION="tags/${RELEASE_URL##*/}"
87 changes: 87 additions & 0 deletions docker/TWINS/Dockerfile_TWINS
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#
# Dockerfile for a TWINS masternode
# usage: docker run marsmensch/masternode-twins:latest
#
# how to work with the container
#
# 1) build the container (checkout desired git revision first)
# docker build -t "marsmensch/masternode-twins:latest" -f docker/Dockerfile_TWINS .
#
# 2) start the container
# docker run -p ${NODE_PORT}:${NODE_PORT} $(PWD)/config/twins/twinsd.conf:/opt/data "marsmensch/masternode-twins:latest"
#
# 3) start the container interactively
# docker run --interactive --tty --entrypoint=/bin/bash "marsmensch/masternode-twins:latest"
#
# 4) standard help
# docker run -v $(PWD)/config/twins:/opt/data "marsmensch/masternode-twins:latest"

FROM ubuntu:xenial
MAINTAINER Florian Maier <[email protected]>

ENV CONTAINER_USER masternode
ENV PROJECT twins
ENV GIT_URL git://github.com/NewCapital/TWINS-Core.git
ENV SVC_VERSION tags/twins_v3.2.0.4
ENV HOME_DIR /usr/local/bin
ENV NODE_PORT 37817
ENV REFRESHED_AT 2019-01-24

# add unprivileged user
RUN adduser --shell /bin/bash --disabled-password \
--disabled-login --gecos '' ${CONTAINER_USER}

# install system packages and compile
RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get -y install --no-install-recommends build-essential libtool autotools-dev \
libcurl4-openssl-dev libboost-all-dev libssl-dev libdb++-dev make autoconf automake \
libtool git apt-utils libprotobuf-dev pkg-config libboost-filesystem-dev libboost-chrono-dev \
libevent-dev libboost-program-options-dev libgmp-dev libboost-test-dev libboost-thread-dev \
&& mkdir -p /opt/code/ && cd /opt/code/ && git clone ${GIT_URL} ${PROJECT} \
&& cd /opt/code/${PROJECT} && git checkout ${SVC_VERSION} \
&& ./autogen.sh && ./configure --enable-tests=no --with-incompatible-bdb \
--enable-glibc-back-compat --with-gui=no \
CFLAGS="-march=native" LIBS="-lcurl -lssl -lcrypto -lz" \
&& make && make install \
# remove unneeded stuff
&& apt-get -y remove build-essential \
libboost-all-dev libboost-atomic-dev libboost-atomic1.58-dev \
libboost-chrono-dev libboost-chrono1.58-dev \
libboost-context-dev libboost-context1.58-dev \
libboost-coroutine-dev libboost-coroutine1.58-dev \
libboost-date-time-dev libboost-date-time1.58-dev \
libboost-dev libboost-exception-dev libboost-exception1.58-dev \
libboost-filesystem-dev libboost-filesystem1.58-dev \
libboost-graph-dev libboost-graph-parallel-dev \
libboost-graph-parallel1.58-dev libboost-graph1.58-dev \
libboost-iostreams-dev libboost-iostreams1.58-dev libboost-locale-dev \
libboost-locale1.58-dev libboost-log-dev \
libboost-log1.58-dev libboost-log1.58.0 libboost-math-dev \
libboost-math1.58-dev libboost-math1.58.0 libboost-mpi-dev \
libboost-mpi-python-dev libboost-mpi-python1.58-dev \
libboost-mpi1.58-dev libboost-program-options-dev \
libboost-program-options1.58-dev libboost-python-dev \
libboost-python1.58-dev libboost-random-dev libboost-random1.58-dev \
libboost-regex-dev libboost-regex1.58-dev libboost-serialization-dev \
libboost-serialization1.58-dev libboost-signals-dev libboost-signals1.58-dev \
libboost-system-dev libboost-system1.58-dev libboost-test-dev libboost-test1.58-dev \
libboost-thread-dev libboost-thread1.58-dev libboost-timer-dev libboost-timer1.58-dev \
libboost-tools-dev libboost-wave-dev libboost-wave1.58-dev libboost1.58-dev \
libboost1.58-tools-dev libc6-dev libdb5.3++-dev libdb5.3-dev libevent-dev \
libexpat1-dev libgmp-dev libibverbs-dev libicu-dev libltdl-dev libnuma-dev \
libopenmpi-dev libprotobuf-dev libpython-dev libpython2.7-dev libssl-dev \
mpi-default-dev python-dev python2.7-dev zlib1g-dev \
&& apt -y autoremove \
&& rm -rf /opt/code \
&& rm -rf /var/lib/apt/lists/*

# EXPOSE the masternode port
EXPOSE ${NODE_PORT}

RUN chown -R ${CONTAINER_USER} ${HOME_DIR}
USER ${CONTAINER_USER}
WORKDIR ${HOME_DIR}

# start command
CMD ["/usr/local/bin/twinsd", "--help"]