Skip to content

Commit

Permalink
updating ergo/cardano guides
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroWa3l committed Nov 1, 2023
1 parent ef1db77 commit 3b26e62
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 38 deletions.
32 changes: 31 additions & 1 deletion docs/ergo-developer-guides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,34 @@ A really simple and nice option is to just use [Satergo](https://satergo.com/) f

You can just download and run it, batteries included. If you don't have the computer memory storage, you can reference a "remote" full node.

This is a great option, plus the UI/UX is beautiful.
This is a great option, plus the UI/UX is beautiful.

## Special Thanks
Appreciate the help from the following folks and resources!
- [Ergo Platform](https://twitter.com/Ergo_Platform) Documentation, tutorial, and chatbot
- [Eeysirhc](https://twitter.com/Eeysirhc) for an awesome [ergo-rpi tutorial](https://github.com/Eeysirhc/ergo-rpi) that was easy to follow and really helped
- [Wael](https://twitter.com/Piada_stakePool) Teaching me to tmux
- [WCat of Star Forge Stake Pool ](https://twitter.com/Star_Forge_Pool) for continuous education in all things sysadmin & prepping :)
- [Reqlez ($psiloblox)](https://twitter.com/PSILOBLOX) for ergo.conf configuration file help & the Rosen Bridge early adopters invitation
- [ErgOne](https://twitter.com/Erg0ne) & [koukarin4](https://twitter.com/koukarin4) for the encouragement of a helpful tutorial
- [Armada Alliance](https://twitter.com/alliance_armada) for the community of ARM builders continusouly educating and amazing [documentation resources](https://armada-alliance.com/docs/)
- [Satergo Project](https://twitter.com/SatergoWallet) for an awesome full node ergo wallet and ergonodes.net platform
- [Ergo Foundation](https://twitter.com/ErgoFoundation) for the continuous AMA's teaching grassroot decentralization matters
- [Kushti](https://twitter.com/chepurnoy) for relentless unstoppable building

-------------

## Donations or Staking

If you find this tutorial helpful, here's my donation tip jar! #Ergo2Top10

![donations-qr-code](../../static/ergo-images/wallet-qr-code.jpeg)

```bash
9htXsxhTNpt8LaSdLF5PDqNe99RaXmMRTAJu3iTB57ivxx3UNFa
```

Or better yet, if an $ADA hodler too, Stake to [BALNC Pool](https://pool.pm/a43ceac028a673e9f8611de0f683c70fdcadde560f28c2fb8cfabc81)! We provide high quality on-chain analysis and data visualization using Svelte: https://www.balanceanalytics.io/. Cheers!

## Questions?
Feel free to jump into our [Ergo - BALANCE](https://matrix.to/#/#ergo:forum.balanceanalytics.io) room to chat and ask questions. This chat is in the Matrix.org open source commmunication protocol, we recommend using the Element Client.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ User =pi
Type =simple

#note path/to/ergo-node in this tutorial is /mnt/hd1/ergo-node but in general =/path/to/ergo-node
WorkingDirectory =/mnt/hd1/ergo-node
WorkingDirectory =/path/to/ergo-node

#update the version!!!
ExecStart =/usr/bin/java -jar -Xmx2g ergo-<VERSION>.jar --mainnet -c ergo.conf
Expand Down
57 changes: 35 additions & 22 deletions docs/ergo-developer-guides/part1-raspi-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,41 +27,45 @@ Time Allotment:
# Setup & Configuration


## SD Card Flashing Setup
This part covers "flashing" (writing) the SD Card with the Operating System (OS) into firmware memory.
## Operating System (OS) Flashing Setup

Download the [Raspberry Pi Imager](https://www.raspberrypi.com/software/) (I used macbook pro which has an SD Flash drive).
This part covers "flashing" (writing) the raspberry pi Operating System (OS) into firmware memory.

You could follow the [Raspberry Pi Documentation: Installing the Operating System](https://www.raspberrypi.com/documentation/computers/getting-started.html#installing-the-operating-system), however I found watching the following youtube video much more helpful and easier:
*💡 HEADS-UP: The first tutorial trials flashed the OS right to the SD Card. It quickly became apparent the RAM & Log storage filled up the SD Card memory (30MB). In fact, you can actually flash and boot up right into the external USB storage drive, no mounting required either!*

[Youtube: Headless Raspberry Pi Zero Setup](https://youtu.be/wQJqwGVNHTM?si=GzJZh4_am2cLS1gL)
Download the [Raspberry Pi Imager](https://www.raspberrypi.com/software/).

- Choose Raspberry Pi OS **Lite** 32bit under "Raspberry Pi OS (other)"
- 64-bit is faster and is also a good option. Just not tested.
You could follow the [Raspberry Pi Documentation: Installing the Operating System](https://www.raspberrypi.com/documentation/computers/getting-started.html#installing-the-operating-system), however I found watching the following youtube video much more helpful and easier to get an idea of what we're doing: [Youtube: Headless Raspberry Pi Zero Setup](https://youtu.be/wQJqwGVNHTM?si=GzJZh4_am2cLS1gL).

- Open the Raspberry Pi Imager GUI
- Choose Raspberry Pi OS **Lite** 64bit under "Raspberry Pi OS (other)"
- 32-bit is the safe option. Seems 64bit OS is compatible and tested with the 3b+
- Lite for headless (no Desktop GUIs)
- Choose SD Card to write to
- Plug in the external USB storage drive
- Choose the external memory to write to in the rpi GUI
- Bottom right click gear for advanced settings options
- Set hostname, rename raspberrypi to **"headless"**
- you can use your own username but the headless is used in this tutorial
- Yes Enable SSH
- Yes "Use password authentication"
- Fill in username and password to login to the rpi.
- Update username to **"pi"**
- Update username to **"pi"** (or whatever name you want but pi is used here)
- Yes Enable it to connec to the wifi
- Note SSID is "wifi name"
- Note SSID is home "wifi name"
- Type in the password
- Save
- Write

The first time takes a few minutes
The first time takes a few minutes, grab a coffee ☕

### Hardware Assembly & Checking Pi IP Address
Assembly the rpi and connect it to your router. Trust me this saves time because you'll check your router for headless.local IP address.
Assembly the rpi and connect it to your router. Trust me this saves time because you'll check your router for headless.local IP address.

However, upon boot up it should connect on your wifi, and from your router page, you should be able to find it connected. (Type in your router 192.168.XXX.YYY into your browser).

**⚠️ WARNING: For external SSD USB storage, do not plug it in yet, it freezes your pi on power up. Setup for this is later.**
- Put the pi in the case
- Put the micro SD card in in rpi
- Connect it to power
- Connect the flashed memory into in rpi
- Connect the rpi to power
- Connect it to your Internet Router hardlined via ethernet connection (easier to troubleshoot, can do wifi later)
- Put the SSD Drive into the case, but do not connect it to the rpi yet!
- Pi takes about 5 minutes to boot up. Wait 5 minutes before trying to ssh in.
Expand Down Expand Up @@ -116,18 +120,28 @@ This is where most of the configuration is done for the rpi. Feel free to explor
sudo raspi-config
```

## External Hardware Mounting
Congrats! That's it (much easier to boot right from the external memory, already mounted and partitioned).

---------------------


## External Hardware Mounting if booting from the SD Card

***IF*** you chose the hard route, flashing and booting from the SD Card and using a separate external USB memory storage, you'll have to perform these steps.

This is to allow the external SSD drive memory to be attached and not freeze the rpi. This does not come default in Lite.

You'll probably notice your rpi did not boot up if you booted from the SD Card and have the external memory already connected.

You'll need to reboot (remove power) and disconnect the USB memory. Then start up.

This is a little involved so prepare yourself for battle!

=====Mounting Hard Drive====

#### Find the external drive device name

**Plug in the SSD External Hard Drive!**

lists all memory disks and partitions. More on [fdisk](https://wiki.archlinux.org/title/Fdisk).
Lists all memory disks and partitions. More on [fdisk](https://wiki.archlinux.org/title/Fdisk).

```bash
sudo fdisk -l
Expand All @@ -138,10 +152,9 @@ The SATA SSD external memory here is `Disk /dev/sda: 931.51 GiB`. It is identifi
It is by default listed with two partitions:

Device Start End Sectors Size Type
/dev/sda1 40 409639 409600 200M EFI System
/dev/sda2 409640 1953525127 1953115488 931.3G Apple APFS
/dev/sda 409640 1953525127 1953115488 931.3G ext4

Now we need to delete the partitions and create a new one with a desirable file storage type ext4
Now we need to delete the partitions and create a new one with a desirable file storage type ext4 just in case it's not already ext4.

#### delete the default partitions

Expand Down
5 changes: 3 additions & 2 deletions docs/ergo-developer-guides/part2-ergo-full-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ The following steps are a combination of the two great following resources mixed

### Update the Pi & Install Java

**Important:** Start out in the `/mnt/hd1` directory, this is the external ssd hard drive, with the tons of memory for the ergo-node. Else, you will quickly overload your sd card memory and crash the pi soon enough (trust me :)
---
**Important: SKIP This Step UNLESS you boot from the SD Card**: You'll want to start out in the `/mnt/hd1` as your "home" directory, this is the external ssd hard drive, with the tons of memory for the ergo-node. It is not mentioned in the rest of the tutorial because it assumes directly mounting.

```bash
cd /mnt/hd1
```
---

The node is built with Scala but is run by Java, thus we'll need to install package dependencies Java Development Kit.

Expand Down Expand Up @@ -78,7 +80,6 @@ ssh pi@headless.local
Then once inside the rpi, change directory to the external hard drive location **very important** /mnt/hd1 and setup a new ergo folder.

```bash
cd /mnt/hd1
mkdir ergo-node
cd ergo-node
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ ssh pi@headless.local

Type in the password

```bash
cd /mnt/hd1
```


To where we are storing the node mounted on the external SSD drive.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ User =pi
Type =simple

#note path/to/ergo-node in this tutorial is /mnt/hd1/ergo-node but in general =/path/to/ergo-node
WorkingDirectory =/mnt/hd1/ergo-node
WorkingDirectory =/ergo-node

#update the version!!!
ExecStart =/usr/bin/java -jar -Xmx2g ergo-<VERSION>.jar --mainnet -c ergo.conf
Expand Down
1 change: 1 addition & 0 deletions docs/ergo-developer-guides/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ This is a cheat sheet list of references.
- [Ergo Platform Matrix.org Space](https://matrix.to/#/#ergo-platform:matrix.org)
- [Matrix.org](https://www.matrix.org) is a decentralized communication protocol that I highly recommend using. Element App is the best, but there are a ton of other client options. From the Space all the chat rooms are bridged and can join.

- [Ergo - BALANCE](https://matrix.to/#/#ergo:forum.balanceanalytics.io) BALANCE Stake Pool Matrix chat room for Ergo focused topics.

## Explorers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import TabItem from "@theme/TabItem";


:::success
#### Current Official Cardano Node Version: 8.1.1
#### Current Official Cardano Node Version: [8.1.2](https://github.com/input-output-hk/cardano-node)
:::

### Overview 🗒
Expand Down Expand Up @@ -145,12 +145,13 @@ This ensures the system is aware of libsodium (not just at the user level).
Dynamic binaries and Cardano node configuration files provided by [SRN pool ](https://armada-alliance.com/stake-pools/cc1b1c03798884c636703443a23b8d9e827d6c0417921600394198a0):pray: at our [Github repository](https://github.com/armada-alliance/cardano-node-binaries).

```bash title=">_ Terminal"
wget -O cardano-8_1_1-aarch64-ubuntu_2004.zip https://github.com/armada-alliance/cardano-node-binaries/blob/main/dynamic-binaries/8.1.1/cardano-8_1_1-aarch64-ubuntu_2004.zip?raw=true```
wget -O cardano-8_1_2-aarch64-ubuntu_2004.zip https://github.com/armada-alliance/cardano-node-binaries/blob/main/dynamic-binaries/8.1.2/cardano-8_1_2-aarch64-ubuntu_2004.zip?raw=true
```

Extract the content from the zip file.

```bash title=">_ Terminal"
unzip cardano-8_1_1-aarch64-ubuntu_2004.zip
unzip cardano-8_1_2-aarch64-ubuntu_2004.zip
```

### Check if cardano-node is running already
Expand All @@ -177,7 +178,7 @@ If you use Linux's `htop` service just check for a processing running starting w
If you are using the [Pi-Node guide](../pi-pool-tutorial/) and your cardano-node & cli in `~/.local/bin`

```bash title=">_ Terminal"
mv cardano-8_1_1-aarch64-ubuntu_2004/* ~/.local/bin
mv cardano-8_1_2-aarch64-ubuntu_2004/* ~/.local/bin
```

### Check your cardano-node version
Expand All @@ -189,8 +190,8 @@ cardano-node --version
#### Output:

```bash title=">_ Terminal"
cardano-node 8.1.1 - linux-aarch64 - ghc-8.10
git rev 6f79e5c3ea109a70cd01910368e011635767305a
cardano-node 8.1.2 - linux-aarch64 - ghc-8.10
git rev d2d90b48c5577b4412d5c9c9968b55f8ab4b9767
```

### Check your cardano-cli version
Expand All @@ -202,8 +203,8 @@ cardano-cli --version
#### Output:

```bash title=">_ Terminal"
cardano-cli 8.1.1 - linux-aarch64 - ghc-8.10
git rev 6f79e5c3ea109a70cd01910368e011635767305a
cardano-cli 8.1.2 - linux-aarch64 - ghc-8.10
git rev d2d90b48c5577b4412d5c9c9968b55f8ab4b9767
```

### Replace the Cardano node configuration files
Expand Down

0 comments on commit 3b26e62

Please sign in to comment.