renproject / darknode-cli Goto Github PK
View Code? Open in Web Editor NEWTool for deploying and managing Darknodes
Home Page: https://renproject.io
License: GNU General Public License v3.0
Tool for deploying and managing Darknodes
Home Page: https://renproject.io
License: GNU General Public License v3.0
I tried to install on Raspberry pi, but got an error:
unsupported os type or architecture
I used PI 3 and Ubuntu:
root@DarknodePi:~# uname -a
Linux DarknodePi 5.3.0-1008-raspi2 #9-Ubuntu SMP Fri Oct 18 13:26:35 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux
At the moment the CLI only allows deployments on AWS and DO. As a Google Cloud expert, I'm offering my assistance in integration with GCP. I could not find a branch nor PR relating to GCP deployment of the darknode, so not sure at what stage that development is, since it says "coming soon".
AWS gp3 is newer, cheaper and more performant than gp2.
There are AWS Regions missing from
https://github.com/renproject/darknode-cli/blob/master/cmd/provider/aws.go
af-south-1
ap-east-1
ap-northeast-3
cn-north-1
cn-northwest-1
eu-south-1
me-south-1
When trying to deploy node to digital ocean with cli version 3.0.12 the error "cannot find any stable release" is displayed
darknode up --name dark2 --do --do-token XXX
Initializing the backend...
Initializing provider plugins...
- Finding latest version of hashicorp/digitalocean...
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for
│ provider hashicorp/digitalocean: provider registry
│ registry.terraform.io does not have a provider named
│ registry.terraform.io/hashicorp/digitalocean
│
│ Did you intend to use digitalocean/digitalocean? If so, you
│ must specify that source address in each module which
│ requires that provider. To see which modules are currently
│ depending on hashicorp/digitalocean, run the following
│ command:
│ terraform providers
╵
exit status 1
Is the CLI command using api key the only supported installation method currently or is there any manual installation and setup documentation?
I'm trying to set up a darknode with the latest cli but have runned in a problem.
I have an access key setup on DO and when I follow the instructions for setting up a darknode on DO and run
darknode up --name {darknodename} --do --do-token {do-api-token}
the process exits with the following output:
digitalocean_droplet.darknode (remote-exec): + get_latest_release linux-amd64
digitalocean_droplet.darknode (remote-exec): + + wget -qi -
digitalocean_droplet.darknode (remote-exec): tr -d "
digitalocean_droplet.darknode (remote-exec): + cut -d : -f 2,3
digitalocean_droplet.darknode (remote-exec): + grep browser_download_url.*darknode-linux-amd64.zip
digitalocean_droplet.darknode (remote-exec): + curl -s https://api.github.com/repos/republicprotocol/darknode-cli/releases/latest
digitalocean_droplet.darknode (remote-exec): + mv darknode-linux-amd64.zip darknode.zip
digitalocean_droplet.darknode (remote-exec): mv: cannot stat 'darknode-linux-amd64.zip': No such file or directory
digitalocean_droplet.darknode (remote-exec): + unzip darknode.zip
digitalocean_droplet.darknode (remote-exec): unzip: cannot find or open darknode.zip, darknode.zip.zip or darknode.zip.ZIP.
digitalocean_droplet.darknode (remote-exec): + mkdir -p ./.darknode
digitalocean_droplet.darknode (remote-exec): + mv ./darknode-config.json ./.darknode/config.json
digitalocean_droplet.darknode (remote-exec): + cd darknode
digitalocean_droplet.darknode (remote-exec): /tmp/terraform_1510456658.sh: 21: cd: can't cd to darknode
digitalocean_droplet.darknode (remote-exec): + chmod +x install.sh
Error: Error applying plan:
1 error(s) occurred:
* digitalocean_droplet.darknode: error executing "/tmp/terraform_1510456658.sh": Process exited with status 1
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
exit status 1
I'm on arch linux with manjaro 18.1 if it matters.
Greatful for any help
My darknode name is node1 and later I decided to change it to powernode1.
In the darknode command center it looks correct and showing my newly renamed node.
However when I withdraw my eth through terminal and run this:
darknode withdraw powernode1 --address myaddress
I get this error:
node with the name doesn't exist
By checking my node list, I realize it is still using the original darknode name which was node1.
It should use my new defined name... otherwise I have to remember the first darknode I used when I first register. Its fine for the techy people but not very user friendly for the average Joe.
Support bitlaunch.io cryptocurrency VPS. They allow for deploy on DigitalOcean Vultr and Linode and have a golang package here https://github.com/bitlaunchio/gobitlaunch
I will like to help if this is possibility but I would need help.
The command "curl https://www.github.com/renproject/darknode-cli/releases/latest/download/update.sh -sSfL | sh" to update the darknode CLI (3.0.15 → 3.1.0) I entered, but the error "sh: 150: Syntax error:" ("Unexpected (requires"} ")" is displayed and the CLI cannot be updated. I'm an amateur so I don't have any programming skills.
Please tell me how to resolve.
Old AWS Accounts may not have a default VPC in all regions. See
https://aws.amazon.com/blogs/aws/amazon-ec2-update-virtual-private-clouds-for-everyone/
https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/default-vpc.html
I was able to work around by bringing a node up in a region I've never used before, however, I would like to run nodes in many regions including first and foremost us-east-1. There's no way to convert an account from classic to VPC-only, so I would need to create a new AWS account. Can you add a flag --aws-vpc-id and --aws-subnet-id so that users can specify what VPC to launch their instance into? This makes sense from a security perspective, too, since there might be other stuff running within default VPC which is not properly connected to darknodes.
I cannot find a documentation for "regular installation", that is, one that is not automated.
I would like to install a node on one of my servers, but I want to understand each step involved. That is so I can feel confident about my understand of what is running on my server, also so I can troubleshoot any issues as necessary.
nodectl
I cannot add ETH via the UI.
Whenever I click on Deposit I receive a message that says "Unable to complete transaction: [Chaosnet-production] Invalid ETH amount - please try again"
I wonder does this have anything to do with the fact that Ren VM hasn't released Mainnet yet.
I was just watching an interview on Nuggets News and Loong Wang was saying something about not wanting people to lose their money etc.,
I may be jumping the gun.
I knew I would have an initial waiting period for my darknode to be registered but now it's saying I am registered but it also gives a notification that I have a low gas balance and that the node won't earn fees if it runs out of ETH.
We want to have a test suite build into our CI system which helps us reduce the amount of manual testing. The test suite should cover most of the CLI command and tests on different VPSs and systems.
We should create separate accounts or sub-users of our main account and limit the service access. This ensures the safety of our VPS main account. We also need to make sure the account credential is private. (i.e. set up as Github secrets or environment variables)
CI should be triggered on every new commit. Both CircleCI and GitHub Actions allow you to skip certain commits if you have [skip ci]
in the title or description. source.It should cover both positive and negative test cases. And tests against different VPS should be running parallel if that's possible. It should test the following cases:
up
a couple of nodes with different options and destroy
them with different options.start
, stop
and restart
commands are able to control the darknode status.list
command show the correct info of the darknodeupdate
command is able to compare the versions and do an update when outdated.resize
the darknode to an upper tier and a lower tier and check the darknode statusexec
command with different optionsGithub Actions VS CircleCI
I personally favour CircleCI as we already have everything set up in CircleCI and it has some features which Github Actions doesn't have. Github Action is also good in terms of github integration, the setup should be more easy and friendly than CircleCi. We can achieve the same result with Github Actions, but with more developing time.
Not sure how can we test the ssh
command in CI.
My darknode is functioning correctly according to command center but when I type the command darknode list into terminal on my mac it says command not found... no darknode commands work on terminal and the only files I am able to find are my backup files which are being stored on dropbox.
I am wondering if I should one of the following...
As I mentioned this is currently functioning correctly and accruing rewards, I only discovered this issue because I was trying to withdraw my remaining ETH after the update.
Any help is much appreciated. Thank you.
Some of our dependencies haven't been updated for a long time.
We should update them to newer stable version to include those bug fixes and performance improvement.
urfave/cli
since v2 was still in beta at the time we started. v2 is the recommended version than v1. We should migrate our code from v1 to v2.go-ethereum
to 1.9.15 and update minimum required go versiongo mod tidy
to clean up our go moduleTo check if a darknode is running, we can simply send a queryStat
request to darknode and check the status code in the response. It's a bit heavy for the list
command to check if the darknode is running properly(i.e progress in hyperdrive, participate in execution...). We might need a separate command for that or show these info from via the command centre. The output should be one of Yes
or No
or N/A
(no internet connection)
Current darknode has an issue with its version system, so the CLI uses a version
file inside the darknode instance (~/.darknode/version
) to keep tracking its version. The version file is created when user runs the up
command and successfully deploy a node. The version file will be set to the latest version number when created and will be updated when user runs the update
command.
If we want to implement this issue before the darknode version system gets fixed. We can always rely on the content of the ~/.darknode/version
file.
Nothing we can do if user modifies the version manually.
If we want to wait for a fix of the darknode version system, there are two ways we can get the version from darknode binary.
queryStat
request and extract the version from the response. This approach requires the darknode to be running.~/.darknode/bin/darknode --version
. This approach requires the binary is valid and exists at expect location.The (1) approach is faster than (2) and can get the status information from the same request.
The implementation will depend on which approach we choose(or use both) and whether we want to show the status.
Some things we must have.
darknode up
hits a rate limited github API; I would like to be able to do
export GITHUB_TOKEN=${my_secret_github_token}
and have the CLI use this token if present in the environment so that I get the benefit of a higher rate limit.
$ darknode up --do --do-token ${TOKEN} --do-region $REGION --name ${NAME}
GET https://api.github.com/repos/renproject/darknode-release/releases?per_page=25:
403 API rate limit exceeded for REDACTED.
(But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
[rate reset in 5m46s]
It looks like by convention this token is called GITHUB_TOKEN
, see github docs
Currently when you build and run the source code, some additional steps are required.
Ideally, one should be able to checkout the code and $go run
. Currently, you need to create the ~/.darknode folders and more importantly, manually copy over the shell scripts and terraform templates before the checked-out code can run.
Hi, i noticed the below in the Terraform template:
darknode-cli/cmd/provider/aws_template.go
Lines 78 to 84 in 730376d
If there is no other use apart from the initial setup and maintenance, SSH should not be exposed to the wider internet.
It would be nice to have an option to change that to another custom CIDR block.
Thank you
We'll introduce a new command backup
to backup the current status of a darknode.
It should take a string parameter which is the darknode name and
openssl enc
commandReason we don't use zip is that it's not pre-installed in ubuntu. Source for using openssl
When restoring the backup, we can
up
command.Or
restore
command.We'll introduce a new flag which takes a backup file.
It should
We should also let the user know the darknode will be stopped by running the backup
command.
backup
command? (i.e. allow --tags
option)I have created DarkNode on digitalocean through “darknode up --name wonderreturn --do --do-token ******* ”;how to login the darkNode machine with ssh?
I just tried to install a darknode using digital ocean.
Transcript here:
~ % darknode up --name darknode_1 --do --do-token <MY_TOKEN>
Initializing the backend...
Initializing provider plugins...
The following providers do not have any version constraints in configuration,
so the latest version was installed.
To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.
Warning: registry.terraform.io: This version of Terraform has an outdated GPG key and is unable to verify new provider releases. Please upgrade Terraform to at least 0.12.31 to receive new provider updates. For details see: https://discuss.hashicorp.com/t/hcsec-2021-12-codecov-security-event-and-hashicorp-gpg-key-exposure/23512
Warning: registry.terraform.io: For users on Terraform 0.13 or greater, this provider has moved to digitalocean/digitalocean. Please update your source in required_providers.
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Deploying darknode ...
digitalocean_ssh_key.darknode: Creating...
Error: Provider produced inconsistent result after apply
When applying changes to digitalocean_ssh_key.darknode, provider
"registry.terraform.io/-/digitalocean" produced an unexpected new value for
was present, but now absent.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.
exit status 1
The disk / volume of the t3.micro AWS instance is not encrypted? I guess all REN related data on the disk is encrypted - but why not also encrypt the entire disk? Better safe - than sorry in this crypto world - right?!
If you think it is a good idea - you should update the terraform script and/or add some manually steps to the guide. How to make a snapshot, create a new and encrypted volumen from the snapshot and attach it to the EC2 instance instead of the old one.
Besides this: Thank you for a great idea and Amazon work! Bravo Team REN! 🤓🙌🏼🚀
Hello guys
I'm interesting in deploy a DarkNode but reading the documentation i realized that the "darknode up" command requires an Google Cloud/AWS/Digital Ocean API Key to deploy a darknode. How can i deploy it in my own Generic VPS? Is this possible? Does have a doc/tutorial with the steps for this?
Marc
It is no longer necessary to have Darknodes automatically update themselves. It is now preferable to allow Darknode operators to explicitly decide that they want to accept an update. To this end, the automatic update services have been stripped from the Darknode and we need to add an update
subcommand to the CLI.
It should look like:
$ darknode update -version x.y.z
It should do the following:
-version
option.Getting the following message:
Installing Darknode CLI...
unsupported OS type or architecture
uname -a
Darwin Ivans-MacBook-Air.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May 8 05:10:31 PDT 2021; root:xnu-7195.121.3~9/RELEASE_ARM64_T8101 arm64
I installed Darknode CLI
curl https://www.github.com/renproject/darknode-cli/releases/latest/download/install.sh -sSfL | sh
and saw the green text
export PATH=$PATH:$HOME/ .darknode/bin Done! Restart terminal and run the command below to begin. darknode up --help
I opened new terminal and ran
darknode --version
darknode up --help
getting command not found: darknode
Changes to the way darknode updates are being handled will require the jq
program.
It can be installed using:
sudo apt-get install jq
Deploying dark nodes ...
Error: Missing required argument
on main.tf line 55, in resource "digitalocean_droplet" "darknode":
55: connection {
The argument "host" is required, but no definition was found.
exit status 1
how do i access my darknode from a different client machine than the one i used to create it; in other words, how to connect darknode cli on other client to preexisting darknode?
i still have access to cloud server and api key.
basically, i would like to separate out server management and custody.
thanks.
I use the Digital ocean, but monitoring is not always set with deploy the droplets. I asked my friend from the community, he has the same situation.
See Gopkg.toml
[[constraint]]
name = "github.com/republicprotocol/darknode-go"
branch = "master"
404 when I try to access it. Is this a private repo or something?
To connect back to the already deployed and running darknode (running and fully funded)..
What are the recovery steps for a user to freshly re-build / configure the .darknode folder if it is lost or deleted? SSH URLs and connection files + details about the darknodes should be recovered in some way if the user loses this .darknode folder.
Again, this is assuming the user has already deployed the darknode and later accidentally lost the critical folder to allow the user to connect back to the darknode.
Allow a migration of darknodes across cloud provider regions - this is related to #22 - but staying with the currently selected provider.
darknode migrate YOUR-DARKNODE-NAME --source-aws-region sa-east-1 --target-aws-region eu-west-1
We need a function similar to "resize".
Only difference will be that "migration" - will transfer already registered Darknode, to another provider. Without loss of registration of the dark node. This can be useful if one of the providers is experiencing global problems, for example if AWS has a massive failure (or service degradation) and Darknode owner quickly notices failure, they should be able to migrate the Darknode to another provider.
Examle:
# darknode migrate YOUR-DARKNODE-NAME --do --do-token YOUR-API-TOKEN
or
# darknode migrate YOUR-DARKNODE-NAME --aws --aws-access-key YOUR-AWS-ACCESS-KEY --aws-secret-key YOUR-AWS-SECRET-KEY
This will not only reduce the technical risks, but also protect us from the risks of changing license agreements against cryptocurrencies.
And it would be good if the command "darknode list" showed on what cloud provider Darknode works.
after running "deploying darknode" command
darknode up --network testnet --name my-first-darknode --do --do-token YOUR-API-TOKEN
got error message
"digitalocean_droplet.darknode: Error creating droplet: POST https://api.digitalocean.com/v2/droplets: 422 Region is not available"
solved it by running the next command on the user guide, selecting the region.
using digital ocean with macOSX
Is there a way to add GAS via darknode-cli ???
Using Linux Terminal
Currently, our versioning system does not differentiate between Devnet, Testnet, and Mainnet releases. This has been fine during internal development, but is very likely to cause issues when community members are managing their own Darknodes.
This issue proposes the -devnet
and -testnet
suffixes to versions. For example, running darknode update 0.2.8-devnet4
would look at https://github.com/renproject/darknode-release for a release labelled 0.2.8-devnet4
, download it, and deploy it to the Darknode.
All versions must match the following regex: [0-9]+\.[0-9]+\.[0-9]+(-(devnet|testnet)[0-9]+)?
.
master
branch are allowed to be tagged for stable release.-testnet[0-9]+
suffix are considered to be beta releases that are stable enough for Testnet, but not Mainnet.-devnet[0-9]+
suffix are considered to be alpha releases that are not stable enough for Testnet, or Mainnet, but are stable enough for Devnet.x.y.z
is greater than x.y.z-testnet*
which is greater than x.y.z-devnet*
. The suffix number determines ordering within the -testnet
and -devnet
for the same release version.0.2.8
is stable and usable on Mainnet.0.3.0-testnet1
is the 1st release of 0.3.0
for Testnet0.3.1-devnet4
is the 4th release of 0.3.1
for DevnetCommits in https://github.com/renproject/darknode should be tagged with their release version. This should prompt GitHub Actions to automatically build it, and release it to the https://github.com/renproject/darknode-release repo.
Tagging will be done manually for now, but if this process is working well for the team then we can look into automate it.
Currently if I run darknode stop non-existent-darknode
I get:
failed to systemctl --user stop darknode [non-existent-darknode]: open ~/.darknode/darknodes/non-existent-darknode/ssh_keypair: no such file or directory
open ~/.darknode/darknodes/non-existent-darknode/ssh_keypair: no such file or directory
And if I run darknode ssh non-existent-darknode
I just get:
exit status 1
Might be better to return something like:
[non-existent-darknode] not found
When using darknode up to deploy a new darknode I'm getting the error "context deadline exceeded"
using ver 3.0.15
I'm using digital ocean and I've deployed a darknode before using the same api token
calling the command the same way as instructed https://docs.renproject.io/darknodes/getting-started/digital-ocean-or-how-to-setup-a-darknode/mac-os-and-linux with my own values.
darknode up --name mynode --do --do-token myapitoken
Hey everyone! How i can run darknode on k8s? Is there any docs for run it in a docker container?
This will cause the cli hanging when trying to deploying the node on aws.
Refresh the IAM user access key (which doesn't have forward slash) fixes this.
The forward slash character should be escaped or added to the instruction.
When I deploy a Darknode in DigitalOcean, please will added to installation script, the DO-agent installation. To be able to get good performance graphs
Enable Monitoring on Droplet by installing the DO Agent
curl -sSL https://agent.digitalocean.com/install.sh | sh
How does the Darknode CLI figure out IP+ SSH port per darknode?
I need to change the SSH Port which the CLI is using as my (darknode) server is not using port 22 for SSH. I couldn't find it in the config.json.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.