Skip to content

Commit

Permalink
Merge pull request #6 from inv4fee2020/selectnet
Browse files Browse the repository at this point in the history
Selectnet
  • Loading branch information
inv4fee2020 authored Oct 19, 2023
2 parents 626b22d + e2c6f59 commit 4de546f
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 82 deletions.
7 changes: 0 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/notes
/notes/**
bash_menu.sh
file_restore.sh
node_backup.sh
node_backup2.sh
#sample_bkup.vars
setup_backups.sh
#_plinode_setup_bkup.sh
.DS_Store
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# pli2vn
Modular scripts for @GoPlugin 2.0 Validator Node setup & maintenance.

__** NOTE: This deployment script is for Apothem testnet only**__


> **NOTE: All values used in this code are for test purposes only & deployed to a test environment that is regularly deleted.**
> **NOTE: Please ensure that you update with your own values as necessary.**
Expand Down Expand Up @@ -46,7 +43,8 @@ to successfully deploy the node.

The scripts has a number of functions, one of which must be passed to run the scripts

> fullnode
> mainnet
> apothem
> keys
> logrotate
> address
Expand All @@ -59,15 +57,22 @@ The scripts has a number of functions, one of which must be passed to run the sc

where {function} is one of the following;

fullnode == deploys the full node incl. external initiator & exports the node keys
mainnet == deploys the full Mainnet node & exports the node keys
apothem == deploys the full Apothem node & exports the node keys
keys == extracts the node keys from DB and exports to json file
logrotate == implements the logrotate conf file
address == displays the local nodes address (after fullnode deploy) - required for the 'Fulfillment Request' remix step
node-gui == displays the local nodes full GUI URL to copy and paste to browser

### Function: fullnode
### Function: mainnet

As the name suggest, this executes all code to provision a full working node, on the _*Mainnet*_ chain, ready for the contract & jobs creation on remix.
This function calls all other function as part of deploying the full node.


### Function: apothem

As the name suggest, this executes all code to provision a full working node ready for the contract & jobs creation on remix.
As the name suggest, this executes all code to provision a full working node, on the _*Apothem*_ chain, ready for the contract & jobs creation on remix.
This function calls all other function as part of deploying the full node.


Expand Down Expand Up @@ -144,7 +149,7 @@ This script resets your VPS to a pre-deployment state, allowing you to re-instal
---


## base_sys_setup.sh (_Optional - Recommended_)
## base_sys_setup.sh

Updated to use modular functions allowing for individial functions to be run or
You can reveiw the 'sample.vars' file for the full list of VARIABLES.
Expand Down
38 changes: 19 additions & 19 deletions base_sys_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ FUNC_VARS(){

FUNC_VALUE_CHECK(){

echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}"
echo -e "${GREEN} GoPlugin 2.0 Validator Node Deployment Script - Pre Checks"
echo -e "${GREEN}"
echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################${NC}"
echo -e "${GREEN}#########################################################################${NC}"
echo
echo -e "${GREEN} GoPlugin 2.0 Validator Node Deployment Script - Pre Checks${NC}"
echo
echo -e "${GREEN}#########################################################################${NC}"
echo -e "${GREEN}#########################################################################${NC}"



echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################${NC}"
echo
echo -e "${GREEN}## CONFIRM SCRIPTS VARIABLE DEFINITIONS HAVE BEEN UPDATED...${NC}"
echo
Expand All @@ -54,7 +54,7 @@ FUNC_VALUE_CHECK(){

FUNC_PKG_CHECK(){

echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################${NC}"
echo
echo -e "${GREEN}## CHECK NECESSARY PACKAGES HAVE BEEN INSTALLED...${NC}"
echo
Expand Down Expand Up @@ -84,7 +84,7 @@ FUNC_SETUP_OS(){
#echo -e "${GREEN}#########################################################################${NC}"


echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################${NC}"
echo
echo -e "${GREEN}## Base Setup: System updates...${NC}"
echo
Expand All @@ -104,7 +104,7 @@ FUNC_SETUP_OS(){

FUNC_SETUP_USER(){

echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################${NC}"
echo
echo -e "${GREEN}## Base Setup: Add new local admin account with sudo access...${NC}"
echo
Expand All @@ -114,7 +114,7 @@ FUNC_SETUP_USER(){
# root@plitest:/#

sleep 1s
echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################${NC}"
echo
echo -e "${GREEN}## Provide user details...${NC}"
echo
Expand All @@ -125,7 +125,7 @@ FUNC_SETUP_USER(){
encVAR_PASSWORD=$(mkpasswd -m sha256crypt $VAR_PASSWORD)

sleep 2s
echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################${NC}"
echo
echo -e "${GREEN}## Base Setup: Creating the new acc user & group & adds to sudoers...${NC}"
echo
Expand All @@ -146,7 +146,7 @@ FUNC_SETUP_USER(){

echo
echo
echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################${NC}"
echo
echo -e "${GREEN}## Base Setup: Creating SSH keys for new acc user ${NC}"
echo
Expand Down Expand Up @@ -191,7 +191,7 @@ FUNC_SETUP_USER(){
FUNC_SETUP_UFW_PORTS(){
echo
echo
echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################${NC}"
echo
echo -e "${GREEN}## Base Setup: Configure Firewall...${NC}"
echo
Expand All @@ -216,7 +216,7 @@ FUNC_ENABLE_UFW(){

echo
echo
echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################${NC}"
echo
echo -e "${GREEN}## Base Setup: Change UFW logging to ufw.log only${NC}"
echo
Expand All @@ -226,7 +226,7 @@ FUNC_ENABLE_UFW(){

echo
echo
echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################${NC}"
echo
echo -e "${GREEN}## Setup: Enable Firewall...${NC}"
echo
Expand All @@ -242,7 +242,7 @@ FUNC_ENABLE_UFW(){
FUNC_SETUP_SECURE_SSH(){
echo
echo
echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################${NC}"
echo
echo -e "${GREEN}## Base Setup: Change SSH port & Secure Authentication methods...${NC}"
echo
Expand All @@ -261,14 +261,14 @@ FUNC_SETUP_SECURE_SSH(){

echo
echo
echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################${NC}"
echo
echo -e "${GREEN}## Base Setup: Add new SSH port to firewall...${NC}"
echo
sudo ufw allow $PLI_SSH_NEW_PORT/tcp

echo
echo -e "${GREEN}#########################################################################"
echo -e "${GREEN}#########################################################################${NC}"
echo
echo -e "${GREEN}## Base Setup: Restart SSH service for port change to take effect...${NC}"
echo
Expand Down
Loading

0 comments on commit 4de546f

Please sign in to comment.