All Projects → renproject → darknode-cli

renproject / darknode-cli

Licence: GPL-3.0 license
Tool for deploying and managing Darknodes

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to darknode-cli

DigitalOcean-SDK
A Digital Ocean SDK for iOS and OSX -- Unit tests pass locally!
Stars: ✭ 13 (-75.93%)
Mutual labels:  digital-ocean
republic-go
An official reference implementation of Republic Protocol, written in Go
Stars: ✭ 58 (+7.41%)
Mutual labels:  ren
offensive-docker-vps
Create a VPS on Google Cloud Platform or Digital Ocean easily with Offensive Docker included to launch assessment to the targets.
Stars: ✭ 66 (+22.22%)
Mutual labels:  digital-ocean
data-processing-pipeline
Real-Time Data Processing Pipeline & Visualization with Docker, Spark, Kafka and Cassandra
Stars: ✭ 79 (+46.3%)
Mutual labels:  digital-ocean
vps
A laravel 5 package to easily create and maintain vps on digital ocean
Stars: ✭ 59 (+9.26%)
Mutual labels:  digital-ocean
doclt
Digital Ocean Command Line Tool
Stars: ✭ 43 (-20.37%)
Mutual labels:  digital-ocean
GameHer
Gameher is a French association aspiring to develop gender diversity in the fields of video games, esport and streaming. We want to give players the tools they need to flourish and evolve in the fields of video games, esport and streaming.
Stars: ✭ 35 (-35.19%)
Mutual labels:  digital-ocean
digital-ocean
Idiomatic Clojure client for Digital Ocean that makes it easy to boot virtual servers from your REPL
Stars: ✭ 34 (-37.04%)
Mutual labels:  digital-ocean
metadata-one-liners
retrive metadata endpoint data with these one liners.
Stars: ✭ 38 (-29.63%)
Mutual labels:  digital-ocean
CodingWithMitch-Blog-Course
Web development with Django (Python) for Beginners
Stars: ✭ 148 (+174.07%)
Mutual labels:  digital-ocean
DigitalOceanApp
Admin Console for Digital Ocean
Stars: ✭ 55 (+1.85%)
Mutual labels:  digital-ocean
next
(Work in progress) The rewritten version of the original PizzaQL 🍕
Stars: ✭ 45 (-16.67%)
Mutual labels:  digital-ocean
DigitalOceanFlask
installing a Flask webapp on a Digital Ocean (or Linode, etc.) Ubuntu box
Stars: ✭ 42 (-22.22%)
Mutual labels:  digital-ocean
dots
digital ocean api typescript/javascript wrapper
Stars: ✭ 65 (+20.37%)
Mutual labels:  digital-ocean
digitalocean
Scala wrapper around Digital Ocean's API, version 2
Stars: ✭ 28 (-48.15%)
Mutual labels:  digital-ocean
Hacktoberfest-2k19
A Repository for Micro Club members dedicated for Hacktoberfest 6th edition (2k19). The purpose of this repo is getting MC members into the open source community and help them develop and share projects and knowledge with other students, profesionals and open source enthousiasts while having a fun challenge !!
Stars: ✭ 16 (-70.37%)
Mutual labels:  digital-ocean
tls certificate generation
Use temporary Amazon EC2 / Digital Ocean cloud machines to get / renew letsencrypt certificates
Stars: ✭ 28 (-48.15%)
Mutual labels:  digital-ocean

Darknode CLI

The Darknode CLI is a command-line interface for managing Darknodes on Ren. It is installed on your local workspace, and will automatically create and update machines for you. Currently it supports macOS, Linux and Window(see Windows Instructions).

Getting Started on AWS

To jump straight into running your first Darknode on AWS, checkout our Getting Started on AWS tutorial.

Getting Started on Digital Ocean

Checkout the instructions for Creating a Personal Access Token on Digital Ocean.

Installing the tool

To download and install the Darknode CLI, open a terminal and run:

curl https://www.github.com/renproject/darknode-cli/releases/latest/download/install.sh -sSfL | sh

This will download the required binaries and install them to the $HOME/.darknode directory. Open a new terminal to begin using the Darknode CLI.

Updating the tool

Before updating the Darknode CLI, please make sure you do not have the CLI running in any terminal.

To update your Darknode CLI, open a terminal and run:

curl https://www.github.com/renproject/darknode-cli/releases/latest/download/update.sh -sSfL | sh

Note: make sure you are using Terraform version 0.12! To upgrade Terraform, download the executable for your operating system from https://www.terraform.io/downloads.html and copy it to $HOME/.darknode/bin/terraform.

This will update your Darknode CLI to the latest version without affecting any of your deployed nodes.

Usage

Here there be dragons!

These guidelines are for advanced users. If you just want to see what deploying a Testnet Darknode is like, checkout our Getting Started on AWS tutorial.

Deploy a Darknode

AWS

To deploy a Darknode on AWS, open a terminal and run:

darknode up --name my-first-darknode --aws --aws-access-key YOUR-AWS-ACCESS-KEY --aws-secret-key YOUR-AWS-SECRET-KEY

The Darknode CLI will automatically use the credentials available at $HOME/.aws/credentials if you do not explicitly set the --access-key and --secret-key arguments. By default it will use the credentials of default profile,but you can specify which profile you want to use for deployment by:

darknode up --name my-first-darknode --aws --aws-profile PROFILE-NAME

You can also specify the region and instance type you want to use for the Darknode:

darknode up --name my-first-darknode --aws --aws-access-key YOUR-AWS-ACCESS-KEY --aws-secret-key YOUR-AWS-SECRET-KEY --aws-region eu-west-1 --aws-instance t2.small

The default instance type is t3.micro and region will be random. You can find all available regions and instance types at AWS.

Digital Ocean

Follow the steps in the tutorial to create a API token. To deploy a Darknode on Digital Ocean, open a terminal and run:

darknode up --name my-first-darknode --do --do-token YOUR-API-TOKEN

You can also specify the region and droplet size you want to use for the Darknode:

darknode up --name my-first-darknode --do --do-token YOUR-API-TOKEN --do-region nyc1 --do-droplet s-2vcpu-2gb

The default droplet size is s-1vcpu-1gb and region will be random. Be aware some region and droplet size are not available to all users.

You can find all available regions and droplet size slug by using the digital ocean API.

Showing register page

The darknode-cli will show a link for registering your darknode after finish deploying. Don't panic if you lose the url. Simply run

darknode register YOUR-DARKNODE-NAME

which prints the registering link in the terminal and tries to open the url using your default browser.

Destroy a Darknode

WARNING: Before destroying a Darknode make sure you have de-registered it, and withdrawn all fees earned! You will not be able to destroy your darknode if it's not fully deregistered. The CLI will guide you to the page where you can deregister your node

Destroying a Darknode will turn it off and tear down all resources allocated by the cloud provider. To destroy a Darknode, open a terminal and run:

darknode destroy my-first-darknode

To avoid the command-line prompt confirming the destruction, use the --force argument:

darknode destroy my-first-darknode --force

We do not recommend using the --force argument unless you are developing custom tools that manage your Darknodes automatically.

Resize a Darknode

To resize the instance type your Darknode is using, open a terminal and run:

darknode resize YOUR-DARKNODE-NAME NEW_INSTANCE_TYPE

If you are using AWS, you will need to replace the NEW_INSTANCE_TYPE field with the AWS EC2 instance type you wish to use, e.g. t3.micro or t2.medium."

darknode resize YOUR-DARKNODE-NAME t3.small

You can find all available instance types at AWS.

If you are using DigitalOcean, you will need to replace the NEW_INSTANCE_TYPE field with the DigitalOcean droplet slug you wish to use, e.g. s-1vcpu-2gb or s-1vcpu-1gb.

darknode resize YOUR-DARKNODE-NAME s-1vcpu-2gb

Changing droplet size will not change the storage volume of the instance, this allows user to resize down to a lower plan in the future. You can find all available droplet slugs at Digital Ocean Standard plans and DigitalOcean API Slugs

If you accidentally try to resize to a invalid instance, the darknode will be stopped. You need to run the command again with a valid instance type to restart the darknode.

List all Darknodes

The Darknode CLI supports deploying multiple Darknodes. To list all available Darknodes, open a terminal and run:

darknode list

Start/Stop/Restart Darknode

To turn off your darknode, open a terminal and run:

darknode stop my-first-darknode

Note this won't shut down the cloud instance so you will still be charged by your cloud provider. If it is already off, stop will do nothing.

To turn on your darknode, open a terminal and run:

darknode start my-first-darknode

If it is already on, start will do nothing.

To restart your darknode, open a terminal and run:

darknode restart my-first-darknode

SSH into Darknode

To access your Darknode using SSH, open a terminal and run:

darknode ssh my-first-darknode

Update a Darknode

To update your Darknode to the latest stable version, open a terminal and run:

darknode update YOUR-DARKNODE-NAME

To update the configuration of your darknode, first edit the local version of config, by running:

nano $HOME/.darknode/darknodes/YOUR-DARKNODE-NAME/config.json

and now run:

darknode update my-first-darknode --config

Withdraw balance from the Darknode

To withdraw any ETH left in the darknode address, open a terminal and run:

darknode withdraw YOUR-DARKNODE-NAME --address RECEIVER-ETHEREUM-ADDRESS

Note: This will also withdraw any REN in the darknode address. Keep in mind this will only withdraw the ETH and REN the address holds directly, not the rewards it receives by matching orders.

Running commands(script) on your darknode

If you want to run a specific command on your darknode. open a terminal and run:

darknode exec YOUR-DARKNODE-NAME --script "whoami"

or a script file

darknode exec YOUR-DARKNODE-NAME --file test.sh

Github rate limiting

You can set the GITHUB_TOKEN environment variable to increase your github rate limit.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].