docs: cloud testnet guide (#467)
* push node to testnet doc * minor change * ssh version * Change to ssh way of doing it * address comments * missed change * merge docs * npm updates Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
This commit is contained in:
parent
33de0ca1f4
commit
23b3cbfd6c
@ -6,8 +6,9 @@ parent:
|
|||||||
|
|
||||||
# Guides
|
# Guides
|
||||||
|
|
||||||
This section contains different guides to use polular Ethereum tools with Ethermint.
|
This section contains different guides to use popular Ethereum tools with Ethermint.
|
||||||
|
|
||||||
1. [Truffle](./truffle.md)
|
1. [Truffle](./truffle.md)
|
||||||
2. [Metamask](./metamask.md)
|
2. [Metamask](./metamask.md)
|
||||||
3. [Remix](./remix.md)
|
3. [Remix](./remix.md)
|
||||||
|
4. [Deploy Testnet on Cloud Provider](./cloud_testnet.md)
|
||||||
|
88
docs/guides/cloud_testnet.md
Normal file
88
docs/guides/cloud_testnet.md
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<!--
|
||||||
|
order: 4
|
||||||
|
-->
|
||||||
|
|
||||||
|
# Deploy Testnet on Cloud Provider
|
||||||
|
|
||||||
|
Learn how to deploy testnet to different cloud providers. {synopsis}
|
||||||
|
|
||||||
|
## Pre-requisite Readings
|
||||||
|
|
||||||
|
- [Testnet Quickstart](./../quickstart/testnet.md) {prereq}
|
||||||
|
|
||||||
|
## Digital Ocean
|
||||||
|
|
||||||
|
### Account Setup
|
||||||
|
|
||||||
|
Head over to [Digital Ocean](https://www.digitalocean.com/) and create an account.
|
||||||
|
|
||||||
|
DigitalOcean will want a public key that it can place on any Droplets we start, so that we can access them with a key that we know only we have.
|
||||||
|
|
||||||
|
Let's create an SSH keypair now using `ssh-keygen -t rsa -b 4096`
|
||||||
|
|
||||||
|
This will ask you for a file where you want to save the key which you can call something like - `digital-ocean-key`.
|
||||||
|
|
||||||
|
It'll also ask for a passphrase - feel free to set one if you wish or you could leave it empty. If you created it in the same folder as we've been working out of, you'll see two files - one called `digital-ocean-key` and one called `digital-ocean-key.pub` - these are respectively your private and public keys.
|
||||||
|
|
||||||
|
In your DigitalOcean account, on the bottom left hand side, there is a link for `'Security'`. Follow this link, and the next page will have an option to add an SSH key
|
||||||
|
|
||||||
|
Click `'Add an SSH key'` and you'll be presented with a dialog to enter your key. Simply copy the contents of your `digital-ocean-key.pub` into the large text box (you can get the contents printed to the terminal with `cat digital-ocean-key.pub`).
|
||||||
|
|
||||||
|
### Create Droplet
|
||||||
|
|
||||||
|
Once you've added your SSH key. click on the `'Droplets'` link on the left, and then on the next page click `'Create Droplet'`.
|
||||||
|
|
||||||
|
On this page, you'll be presented with a number of options for configuring your DigitalOcean Droplet, including the distribution, the plan, the size/cost per month, region, and authentication. Feel free to choose whichever settings work best for you.
|
||||||
|
|
||||||
|
Under `'Authentication'`, select `'SSH Key'`, and select which keys you would like to use (like the one you created in the last step). You can also name your Droplet if you wish. When you're finished, click `'Create Droplet'` at the bottom.
|
||||||
|
|
||||||
|
Wait a minute for your Droplet to start up. It'll appear under the `'Droplets'` panel with a green dot next to it when it is up and ready. At this point, we're ready to connect to it.
|
||||||
|
|
||||||
|
### Deploy to Droplet
|
||||||
|
|
||||||
|
#### Connect to Droplet
|
||||||
|
|
||||||
|
Click on the started Droplet, and you'll see details about it. At the moment, we're interested in the IP address - this is the address that the Droplet is at on the internet.
|
||||||
|
|
||||||
|
To access it, we'll need to connect to it using our previously created private key. From the same folder as that private key, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ssh -i digital-ocean-key root@<DROPLET_IP_ADDRESS>
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you are connected to the droplet.
|
||||||
|
|
||||||
|
#### Install Ethermint
|
||||||
|
|
||||||
|
Clone and build Ethermint in the droplet using `git`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
go install https://github.com/ChainSafe/ethermint.git
|
||||||
|
```
|
||||||
|
|
||||||
|
Check that the binaries have been successfuly installed:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ethermintd -h
|
||||||
|
ethermintcli -h
|
||||||
|
```
|
||||||
|
|
||||||
|
### Copy the Genesis File
|
||||||
|
|
||||||
|
To connect the node to the existing testnet, fetch the testnet's `genesis.json` file and copy it into the new droplets config directory (i.e `$HOME/.ethermintd/config/genesis.json`).
|
||||||
|
|
||||||
|
To do this ssh into both the testnet droplet and the new node droplet.
|
||||||
|
|
||||||
|
On your local machine copy the genesis.json file from the testnet droplet to the new droplet using:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
scp -3 root@<TESTNET_IP_ADDRESS>:$HOME/.ethermintd/config/genesis.json root@<NODE_IP_ADDRESS>:$HOME/.ethermintd/config/genesis.json
|
||||||
|
```
|
||||||
|
|
||||||
|
### Start the Node
|
||||||
|
|
||||||
|
Once the genesis file is copied over run `ethermind start` inside the node droplet.
|
||||||
|
|
||||||
|
## Next {hide}
|
||||||
|
|
||||||
|
Follow [Deploy node to public testnet](./deploy_node_on_public_testnet.md)
|
12
docs/package-lock.json
generated
12
docs/package-lock.json
generated
@ -3295,9 +3295,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"serialize-javascript": {
|
"serialize-javascript": {
|
||||||
"version": "3.1.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz",
|
||||||
"integrity": "sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==",
|
"integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"randombytes": "^2.1.0"
|
"randombytes": "^2.1.0"
|
||||||
}
|
}
|
||||||
@ -9996,9 +9996,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"serialize-javascript": {
|
"serialize-javascript": {
|
||||||
"version": "3.1.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz",
|
||||||
"integrity": "sha512-JIJT1DGiWmIKhzRsG91aS6Ze4sFUrYbltlkg2onR5OrnNM02Kl/hnY/T4FN2omvyeBbQmMJv+K4cPOpGzOTFBg==",
|
"integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"randombytes": "^2.1.0"
|
"randombytes": "^2.1.0"
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,6 @@
|
|||||||
"watchpack": "^1.7.2"
|
"watchpack": "^1.7.2"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"serialize-javascript": "^3.1.0"
|
"serialize-javascript": "^4.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user