forked from masternodes/vps
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adapt changes for multi-crypto support
- Loading branch information
Showing
20 changed files
with
656 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.DS_Store* | ||
code/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,16 +36,36 @@ vps:~ su - pivxd | |
``` | ||
|
||
# Todo | ||
<<<<<<< HEAD | ||
* rewrite for config templates and provide my Dockerfile & Vagrantfile | ||
======= | ||
>>>>>>> 71c62b0bdc2ba8772d19c73a3941e06f6f087c7f | ||
* document the vultr signup and setup procedure | ||
* currently not fully idempotent, be careful when running it often | ||
* provide a delete / uninstall flag | ||
* create a logfile | ||
* create a logfile | ||
* instert coin images into readme | ||
* insert vultr signup reflink | ||
* outsource common variables in commin source file | ||
* check if masternode user already exists before creation | ||
* add all flags everywhere ./configure --disable-dependency-tracking --enable-tests=no --without-gui --without-miniupnpc --with-incompatible-bdb CFLAGS="-march=native" LIBS="-lcurl -lssl -lcrypto -lz" | ||
|
||
# Errors | ||
* currently not fully idempotent (cfengine?) | ||
* check if relevant interface already exists (sed) before writing to interfaces file | ||
|
||
|
||
Ping me at [email protected] for questions and send some crypto my way if you are happy. | ||
|
||
**Have fun, this is crypto after all!** | ||
``` | ||
BTC 1PboFDkBsW2i968UnehWwcSrM9Djq5LcLB | ||
<<<<<<< HEAD | ||
PIVX DQS4rk57bteJ42FSNSPpwqHUoNhx4ywfQc | ||
======= | ||
DNET DBGBYLz484dWBb5wtk5gFVdJ8rGFfcob7R | ||
SYNX SSKYwMhQQt9DcWozt7zA1tR3DmRuw1gT6b | ||
DASH Xt1W8cVPxnx9xVmfe1yYM9e5DKumPQHaV5 | ||
MUE 7KV3NUX4g7rgEDHVfBttRWcxk3hrqGR4pH | ||
MOJO MTfuWof2NMDPh57U18yniVzpaS2cq4nFFt | ||
>>>>>>> 71c62b0bdc2ba8772d19c73a3941e06f6f087c7f | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Hi there, | ||
|
||
just doing the first testrun with an initial port of my script for sibcoin. Looks good so far, only a bit here and there left to do. | ||
|
||
As far as i understood you asked for the following tasks: | ||
* 1) port of my script for sibcoin | ||
* 2) documentation for the setup and configuration of my script | ||
* 3) Development of a health check script that restarts masternodes if things go wrong | ||
|
||
Tasks 1+2 are clear and i can deliver that in the next days. Task 3 could be more detailed in regards what you need exactly. Feel free | ||
to ping me with any more details like "automatic health check every 30 minutes, mail notifications" if you have any. | ||
|
||
I have a first version ready for testing. The script runs on a vultr Ubuntu 16.04 (only this version) VM and does the following: | ||
* installs 1 preconfigured sibcoin masternode (you will only need to provide the masternode key) | ||
* Compilation is currently from source for the desired git repo tag (v0.16.1.1 / stable) | ||
* Some security hardening is done, including firewalling and a separate user | ||
* Automatic startup for all masternode daemons | ||
* It's ipv6 enabled | ||
|
||
As i already wrote yesterday, i prefer to receive the amount to be paid in the crypto i am developing for, ideally enough collateral for ONE masternode. | ||
|
||
Here is a link for the current (alpha-quality) implementation: | ||
https://gist.githubusercontent.com/marsmensch/01c1ce9fccc250e05ee4063af23c0f48/raw/3b07d981911636e01d675521fd3e45f260443674/%2520sibcoin_masternodes.sh | ||
|
||
Please give the script above a shot on a Ubuntu 16.04 LTS Vultr VM and let me know what's missing. There will definitely be broken things and wrong config at this point and without further testing/review, but the daemon compiles and everything looks good. | ||
I will implement all desired changes after we agreed on the scope and payment. | ||
|
||
Best wishes | ||
|
||
|
||
Florian | ||
|
||
Run this command as root on a newly installed Ubuntu 16.04 LTS VM: | ||
apt-get update && apt-get -y upgrade && wget https://gist.githubusercontent.com/marsmensch/01c1ce9fccc250e05ee4063af23c0f48/raw/3b07d981911636e01d675521fd3e45f260443674/%2520sibcoin_masternodes.sh && bash sibcoin_masternodes.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
./autogen.sh | ||
./configure --disable-dependency-tracking --enable-tests=no --without-gui --without-miniupnpc CFLAGS="-march=native" LIBS="-lcurl -lssl -lcrypto -lz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CODENAME=bitsend | ||
SETUP_MNODES_COUNT=${SETUP_MNODES_COUNT:-1} | ||
MNODE_DAEMON=${MNODE_DAEMON:-/usr/local/bin/bitsendd} | ||
GIT_PROJECT=bitsend | ||
NETWORK_BASE_TAG="2001" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
./autogen.sh | ||
./configure --disable-dependency-tracking --enable-tests=no --without-gui --without-miniupnpc CFLAGS="-march=native" LIBS="-lcurl -lssl -lcrypto -lz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CODENAME=dash | ||
SETUP_MNODES_COUNT=${SETUP_MNODES_COUNT:-1} | ||
MNODE_DAEMON=${MNODE_DAEMON:-/usr/local/bin/dashd} | ||
GIT_PROJECT=dash | ||
NETWORK_BASE_TAG="2002" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
SSH_INBOUND_PORT=${SSH_INBOUND_PORT:-22} | ||
SYSTEMD_CONF=${SYSTEMD_CONF:-/etc/systemd/system} | ||
NETWORK_CONFIG=${NETWORK_CONFIG:-/etc/network/interfaces} | ||
ETH_INTERFACE=${ETH_INTERFACE:-ens3} | ||
MNODE_CONF_BASE=${MNODE_CONF_BASE:-/etc/masternodes} | ||
MNODE_DATA_BASE=${MNODE_DATA_BASE:-/var/lib/masternodes} | ||
MNODE_USER=${MNODE_USER:-masternode} | ||
MNODE_HELPER="/usr/local/bin/restart_masternodes.sh" | ||
MNODE_SWAPSIZE=${MNODE_SWAPSIZE:-5000} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
./autogen.sh | ||
./configure --disable-dependency-tracking --enable-tests=no --without-gui --without-miniupnpc --with-incompatible-bdb CFLAGS="-march=native" LIBS="-lcurl -lssl -lcrypto -lz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CODENAME=dnet | ||
SETUP_MNODES_COUNT=${SETUP_MNODES_COUNT:-1} | ||
MNODE_DAEMON=${MNODE_DAEMON:-/usr/local/bin/darknetd} | ||
GIT_PROJECT=darknet | ||
NETWORK_BASE_TAG="2003" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
cd src | ||
make -f makefile.unix USE_UPNP=- | ||
#strip mojocoind | ||
cp mojocoind ${MNODE_DAEMON} | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CODENAME=mojo | ||
SETUP_MNODES_COUNT=${SETUP_MNODES_COUNT:-1} | ||
MNODE_DAEMON=${MNODE_DAEMON:-/usr/local/bin/mojocoind} | ||
GIT_PROJECT=mojo | ||
NETWORK_BASE_TAG="2004" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
./autogen.sh | ||
./configure --disable-dependency-tracking --enable-tests=no --without-gui --without-miniupnpc CFLAGS="-march=native" LIBS="-lcurl -lssl -lcrypto -lz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CODENAME=mue | ||
SETUP_MNODES_COUNT=${SETUP_MNODES_COUNT:-1} | ||
MNODE_DAEMON=${MNODE_DAEMON:-/usr/local/bin/monetaryunitd} | ||
GIT_PROJECT=mue | ||
NETWORK_BASE_TAG="2005" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
./autogen.sh | ||
./configure --disable-dependency-tracking --enable-tests=no --without-gui --without-miniupnpc CFLAGS="-march=native" LIBS="-lcurl -lssl -lcrypto -lz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CODENAME=synx | ||
SETUP_MNODES_COUNT=${SETUP_MNODES_COUNT:-1} | ||
MNODE_DAEMON=${MNODE_DAEMON:-/usr/local/bin/syndicated} | ||
GIT_PROJECT=synx | ||
NETWORK_BASE_TAG="2006" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#!/bin/bash | ||
# | ||
# ███╗ ██╗ ██████╗ ██████╗ ███████╗███╗ ███╗ █████╗ ███████╗████████╗███████╗██████╗ | ||
# ████╗ ██║██╔═══██╗██╔══██╗██╔════╝████╗ ████║██╔══██╗██╔════╝╚══██╔══╝██╔════╝██╔══██╗ | ||
# ██╔██╗ ██║██║ ██║██║ ██║█████╗ ██╔████╔██║███████║███████╗ ██║ █████╗ ██████╔╝ | ||
# ██║╚██╗██║██║ ██║██║ ██║██╔══╝ ██║╚██╔╝██║██╔══██║╚════██║ ██║ ██╔══╝ ██╔══██╗ | ||
# ██║ ╚████║╚██████╔╝██████╔╝███████╗██║ ╚═╝ ██║██║ ██║███████║ ██║ ███████╗██║ ██║ | ||
# ╚═╝ ╚═══╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ | ||
# ╚╗ @marsmensch 2016 ╔╝ | ||
# | ||
# version: 0.3-alpha | ||
# date: 2016-08-20 | ||
# function: part of the masternode scripts, source the proper config file | ||
# | ||
# Twitter: @marsmensch | ||
# | ||
# Instructions: | ||
# Run this script and wait. After a while you should have a working | ||
# masternode setup where only the private keys need to be added. | ||
# | ||
# Platforms: | ||
# - Linux Ubuntu 16.04 LTS ONLY on a Vultr VPS (its by far the cheapest option) | ||
# - Generic Ubuntu support will be added at a later point in time | ||
# | ||
# System requirements: | ||
# - A vultr micro instance works for up to 5 masternodes | ||
# - Activate the free IPv6 option | ||
# | ||
# tips | ||
# BTC 1PboFDkBsW2i968UnehWwcSrM9Djq5LcLB | ||
# DNET DBGBYLz484dWBb5wtk5gFVdJ8rGFfcob7R | ||
# SYNX SSKYwMhQQt9DcWozt7zA1tR3DmRuw1gT6b | ||
# DASH Xt1W8cVPxnx9xVmfe1yYM9e5DKumPQHaV5 | ||
# MUE 7KV3NUX4g7rgEDHVfBttRWcxk3hrqGR4pH | ||
# MOJO MTfuWof2NMDPh57U18yniVzpaS2cq4nFFt | ||
|
||
usage() { | ||
echo `basename $0`: ERROR: $* 1>&2 | ||
echo usage: `basename $0` '[dnet] OR [mojo] OR [mue] OR [synx] OR [dash] OR [bitsend] + HOWMANY' 1>&2 | ||
echo '=> for 5 dnet masternodes run:' `basename $0` 'dnet 5' 1>&2 | ||
echo 'Report bugs to: @marsmensch' | ||
exit 1 | ||
} | ||
|
||
source_config() { | ||
if [ -f ${SETUP_CONF_FILE} ]; then | ||
echo "read default config" | ||
source .config/default.env | ||
echo "apply config file for ${1}" | ||
source "${SETUP_CONF_FILE}" | ||
echo "running installer script" | ||
source .scripts/masternode_install.sh ${1} | ||
else | ||
echo "required file ${SETUP_CONF_FILE} does not exist, abort!" | ||
exit 1 | ||
fi | ||
} | ||
|
||
SETUP_CONF_FILE=".config/${1}/${1}.env" | ||
SETUP_MNODES_COUNT=${2} | ||
|
||
case "${1}" in | ||
dnet) | ||
echo you picked DNET | ||
source_config dnet | ||
;; | ||
mojo) | ||
echo you picked MOJO | ||
source_config mojo | ||
;; | ||
mue) | ||
echo you picked MUE | ||
source_config mue | ||
;; | ||
synx) | ||
echo you picked SYNX | ||
source_config synx | ||
;; | ||
bitsend) | ||
echo you picked BITSEND | ||
source_config bitsend | ||
;; | ||
dash) | ||
echo you picked DASH | ||
source_config dash | ||
;; | ||
* ) usage "bad argument $1" | ||
;; | ||
esac |
Oops, something went wrong.