diff --git a/README.md b/README.md index 5372525f..ee6cef31 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 | @@ -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, @@ -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 diff --git a/assets/fix.jpg b/assets/fix.jpg new file mode 100644 index 00000000..c69ef897 Binary files /dev/null and b/assets/fix.jpg differ diff --git a/assets/twins.jpg b/assets/twins.jpg new file mode 100644 index 00000000..20071d54 Binary files /dev/null and b/assets/twins.jpg differ diff --git a/config/dogec/dogec.compile b/config/dogec/dogec.compile new file mode 100755 index 00000000..9513e69c --- /dev/null +++ b/config/dogec/dogec.compile @@ -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 diff --git a/config/dogec/dogec.env b/config/dogec/dogec.env new file mode 100644 index 00000000..dd72d463 --- /dev/null +++ b/config/dogec/dogec.env @@ -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##*/}" diff --git a/config/fix/fix.compile b/config/fix/fix.compile new file mode 100755 index 00000000..471c85fc --- /dev/null +++ b/config/fix/fix.compile @@ -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 \ No newline at end of file diff --git a/config/fix/fix.env b/config/fix/fix.env new file mode 100644 index 00000000..aa7cf0b6 --- /dev/null +++ b/config/fix/fix.env @@ -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##*/}" diff --git a/config/twins/twins.compile b/config/twins/twins.compile new file mode 100755 index 00000000..471c85fc --- /dev/null +++ b/config/twins/twins.compile @@ -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 \ No newline at end of file diff --git a/config/twins/twins.env b/config/twins/twins.env new file mode 100644 index 00000000..fedb5b00 --- /dev/null +++ b/config/twins/twins.env @@ -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##*/}" diff --git a/docker/TWINS/Dockerfile_TWINS b/docker/TWINS/Dockerfile_TWINS new file mode 100644 index 00000000..c22ee4cb --- /dev/null +++ b/docker/TWINS/Dockerfile_TWINS @@ -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 + +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"]