Skip to content

TommyNS97/Cosmic_OverlayV2

Repository files navigation

Cosmic_Overlay V2 - OriginTrail v5 Multichain Supported!


The Cosmic Overlay is a general purpose tool used to streamline the interaction between an OriginTrail node. The overlay assumes your container and node configuration are the defaults established by Trace Labs. Supports V5 Testnet and Mainnet

Before running the overlay, please read and follow the requirements and configuration sections.

To Start Run:

  1. cd Cosmic_OverlayV2
  2. sudo node start_overlay.js
This project is independently maintained and is not affiliated with TraceLabs or OriginTrail.
Donations are always welcome. Thank you!
Ethereum/xDAi: 0x514a264512EB9297aAB63e79b000E0bd26EE0734

--------------------------------------------------------------Requirements:--------------------------------------------------------------------

Install nodejs, npm, jq, curl, docker, and zip

  • Run: sudo apt install nodejs -y
  • Run: sudo apt install npm -y
  • Run: sudo apt install jq -y
  • Run: sudo apt install curl -y
  • Run: sudo apt install docker.io -y
  • Run: sudo apt-get install zip unzip -y
  • Run: sudo apt-get install git -y

Required for automated scripts:
Telegram bot token : add @botfather on telegram. Follow the instructions to create your own chat bot.
Telegram chat ID: add @myidbot to telegram. Type /start. It will tell you your chat ID.

Required for installing a new node:
Operational wallet must have the following funds for EACH blockchain they are utilizing on their node:

  • Ethereum Blockchain: 3k TRAC and enough ETH to pay for 2 blockchain transactions
  • Starfleet Blockchain: 3k sTRAC and enough sTRAC to pay for 2 blockchain transactions
  • xDai Blockchain: 3k xTRAC and enough xDai to pay for 2 blockchain transactions
  • Rinkeby Blockchain: 3k aTRAC and enough rinkeby ETH to pay for 2 blockchain transactions on 2 different operational wallets

Required for aws s3 features:
Create an https://aws.amazon.com/s3/ account and create a new api access key and secret if you want to configure the overlay to interact with aws s3 storage.

Always check your arangodb and compare the arangodb size of a new backup to an old backup before deleting the old backup.

Never delete your backups on aws until you have successfully uploaded a back up from your migrated node AND the arandoDB sizes match.

Never destroy/wipe your old server before testing that the migrated node is working properly.

-----------------------------------------------------------Configuration:------------------------------------------------------------

  1. Open terminal
  2. Run: sudo apt update -y && sudo apt upgrade -y
  3. Run: sudo git clone https://github.com/CosmiCloud/Cosmic_OverlayV2.git

Configuring your node

  1. Run: cd Cosmic_OverlayV2/configurations
  2. Rename the example-node_config.json (or tstexample-node_config.json for testnet) file in this directory to node_config.json. Replace the ** content with your information. MAKE SURE TO REMOVE ANY BLOCKCHAIN IMPLEMENTATION YOU ARENT STAKING ON. FOR EXAMPLE, REMOVE ETHEREUM IF YOU ARE ONLY RUNNING ON XDAI.
    Note: This configuration should match the .origintrail_noderc file of your actual node. It is required to fill this configuration out for the overlay to function. You cannot change the default directories at this time.

Configuring your overlay

  1. Run: cd Cosmic_OverlayV2/configurations
  2. Rename the example-overlay_config.json file in this directory to overlay_config.json. Replace the ** content with your information. Make sure to change the environment to mainnet if you want to run on mainnet.
    Note: It is required to fill this configuration out for the overlay to function. Misconfiguration could cause some features to fail.

Optional: If don't want to set up cronjobs on your crontab

  1. Run: cd Cosmic_OverlayV2/cron-jobs-node
  2. Run: sudo npm i shelljs
  3. Run: sudo npm i express
  4. Run: sudo npm i node-cron
  5. Run: sudo npm i forever -g
  6. Run: cd ..

----------------------------------------------------------------Features:------------------------------------------------------------------

IMG-20210325-090642-421

Install Menu:

  1. Install a brand new node based off of the configuration in the overlay config.
    Note: This will not let start a node if otnode already exists.
  2. Restore directly from configured aws directory.
    Note: This will not let start a node if otnode already exists or if nothing was downloaded from aws (incorrect config)
  3. Restore directly from a local backup.
    Note: This will not let start a node if otnode already exists.

Backup Menu:

  1. Creates a local back up file on the directory.
  2. Creates back up file and pushes it to configured aws bucket.
  3. Removes local backups.

Scripts Menu:
The menu will display current enabled automations scripts and give you the below commands

  1. Start scripts.
    Note: This will activate your enabled scripts.
  2. Stop scripts.
    Note: This will deactivate your enabled scripts.
  3. Stop scripts.
    Note: This will restart your scripts so any config changes will be picked up.

Log Menu:

  1. Display logs.
  2. Archive logs.
    Note: This will archive (compress) your node logs and store them and then truncate your node logs to 0MB.
  3. Display log file info.
    Note: This will display log file location and size.
  4. Display log archives.
  5. Delete log archives.

Node Controls:

  1. Start node.
  2. Stop node.
  3. Restart node.
  4. Display node credentials.
    Note: If they exist, this will display rinkeby identity, kovan identity, starfleet identity, xDai identity, erc725 id, your node identity, and your houston password.

----------------------------------------------------------------Optional:------------------------------------------------------------------
The overlay uses forever to continuously run an script that triggers the automated scripts based on your configuration. If you would prefer not to run an script with forever, you can create cronjobs in your cron tab that point directly to where the scripts are installed.
The overlay config will still be used for notifications if you decide to go with this option.

Place the following in your crontab and make sure the path to the scripts are correct:

*/5 * * * * root cd /path/to/Cosmic_OverlayV2/scripts/OTLogNotifications && sudo node Notification.js
0 0 1 * * root cd /path/to/Cosmic_OverlayV2/scripts/OTLogArchiving && sudo node archive.js
0 0 * * 0 root cd /path/to/Cosmic_OverlayV2/scripts/OTUpload && sudo node upload.js
***** root cd /path/to/Cosmic_OverlayV2/scripts/OTHeartbeat && sudo node ping.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published