development_farmers_book #99
4
books/farmers/Makefile
Normal file
4
books/farmers/Makefile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
build:
|
||||||
|
./scripts/generate_wallets.sh
|
||||||
|
./scripts/calculate_marketcap.sh
|
||||||
|
./scripts/calculate_cloud_pricing.sh
|
27
books/farmers/SUMMARY.md
Normal file
27
books/farmers/SUMMARY.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
- [Table of Contents](farmers/farmers.md)
|
||||||
|
- [Build a 3Node](farmers/3node_building/3node_building.md)
|
||||||
|
- [1. Create a Farm](farmers/3node_building/1_create_farm.md)
|
||||||
|
- [2. Create a Zero-OS Bootstrap Image](farmers/3node_building/2_bootstrap_image.md)
|
||||||
|
- [3. Set the Hardware](farmers/3node_building/3_set_hardware.md)
|
||||||
|
- [4. Wipe All the Disks](farmers/3node_building/4_wipe_all_disks.md)
|
||||||
|
- [5. Set the BIOS/UEFI](farmers/3node_building/5_set_bios_uefi.md)
|
||||||
|
- [6. Boot the 3Node](farmers/3node_building/6_boot_3node.md)
|
||||||
|
- [Farming Optimization](farmers/farming_optimization/farming_optimization.md)
|
||||||
|
- [GPU Farming](farmers/3node_building/gpu_farming.md)
|
||||||
|
- [Set Additional Fees](farmers/farming_optimization/set_additional_fees.md)
|
||||||
|
- [Minting Receipts](farmers/3node_building/minting_receipts.md)
|
||||||
|
- [Minting Periods](farmers/farming_optimization/minting_periods.md)
|
||||||
|
- [Room Parameters](farmers/farming_optimization/farm_room_parameters.md)
|
||||||
|
- [Farming Costs](farmers/farming_optimization/farming_costs.md)
|
||||||
|
- [Calculate Your ROI](farmers/farming_optimization/calculate_roi.md)
|
||||||
|
- [Farming Requirements](farmers/farming_optimization/farming_requirements.md)
|
||||||
|
- [Advanced Networking](farmers/advanced_networking/advanced_networking_toc.md)
|
||||||
|
- [Networking Overview](farmers/advanced_networking/networking_overview.md)
|
||||||
|
- [Network Considerations](farmers/advanced_networking/network_considerations.md)
|
||||||
|
- [Network Setup](farmers/advanced_networking/network_setup.md)
|
||||||
|
- [Farmerbot](farmers/farmerbot/farmerbot_intro.md)
|
||||||
|
- [Quick Guide](farmers/farmerbot/farmerbot_quick.md)
|
||||||
|
- [Additional Information](farmers/farmerbot/farmerbot_information.md)
|
||||||
|
- [Minting and the Farmerbot](farmers/farmerbot/farmerbot_minting.md)
|
||||||
|
- [Node Status Bot](farmers/node_status_bot/node_status_bot.md)
|
||||||
|
- [Farming Troubleshooting](farmers/farming_troubleshooting.md)
|
29
books/farmers/scripts/calculate_cloud_pricing.sh
Executable file
29
books/farmers/scripts/calculate_cloud_pricing.sh
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cd ../../collections/manual/values
|
||||||
|
|
||||||
|
value=$(cat tft_value.md)
|
||||||
|
|
||||||
|
CU=$(cat cu_musd_hour.md)
|
||||||
|
CUTFT=$(echo "$CU / $value" | bc -l)
|
||||||
|
printf "%.2f" $CUTFT > cu_mtft_hour.md
|
||||||
|
|
||||||
|
SU=$(cat su_musd_hour.md)
|
||||||
|
SUTFT=$(echo "$SU / $value" | bc -l)
|
||||||
|
printf "%.2f" $SUTFT > su_mtft_hour.md
|
||||||
|
|
||||||
|
NU=$(cat nu_musd_hour.md)
|
||||||
|
NUTFT=$(echo "$NU / $value" | bc -l)
|
||||||
|
printf "%.2f" $NUTFT > nu_mtft_hour.md
|
||||||
|
|
||||||
|
IP=$(cat ip_musd_hour.md)
|
||||||
|
IPTFT=$(echo "$IP / $value" | bc -l)
|
||||||
|
printf "%.2f" $IPTFT > ip_mtft_hour.md
|
||||||
|
|
||||||
|
NAME=$(cat name_musd_hour.md)
|
||||||
|
NAME=$(echo "$NAME / $value" | bc -l)
|
||||||
|
printf "%.2f" $NAME > name_mtft_hour.md
|
||||||
|
|
||||||
|
DNAME=$(cat dname_musd_hour.md)
|
||||||
|
DNAME=$(echo "$DNAME / $value" | bc -l)
|
||||||
|
printf "%.2f" $DNAME > dname_mtft_hour.md
|
18
books/farmers/scripts/calculate_marketcap.sh
Executable file
18
books/farmers/scripts/calculate_marketcap.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
cd ../../collections/manual/values
|
||||||
|
|
||||||
|
coinId="threefold-token"
|
||||||
|
|
||||||
|
url="https://api.coingecko.com/api/v3/simple/price?ids=${coinId}&vs_currencies=usd";
|
||||||
|
|
||||||
|
curl -sL ${url} \
|
||||||
|
-H 'Accept: application/json' | jq '."threefold-token".usd' | xargs printf "%.3f" > tft_value.md
|
||||||
|
|
||||||
|
supply=$(cat tft_supply.md)
|
||||||
|
|
||||||
|
value=$(cat tft_value.md)
|
||||||
|
|
||||||
|
TFT_MARKETCAP=$(echo "$supply * $value" | bc -l)
|
||||||
|
|
||||||
|
printf "%'.0f" $TFT_MARKETCAP > tft_marketcap.md
|
25
books/farmers/scripts/generate_wallets.sh
Executable file
25
books/farmers/scripts/generate_wallets.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
mkdir -p ../../collections/manual/knowledge_base/about/token_overview/special_wallets/wallet_data
|
||||||
|
cd ../../collections/manual/knowledge_base/about/token_overview/special_wallets/wallet_data
|
||||||
|
|
||||||
|
wallets=(
|
||||||
|
GA7OPN4A3JNHLPHPEWM4PJDOYYDYNZOM7ES6YL3O7NC3PRY3V3UX6ANM
|
||||||
|
GDSKFYNMZWTB3V5AN26CEAQ27643Q3KB4X6MY4UTO2LIIDFND4SPQZYU
|
||||||
|
GBQHN7RL4LSRPR2TT74ID2UJPZ2AXCHQY2WKGCTDLJM3NXVJ7GQHUCOD
|
||||||
|
GBTPAXXP6534UPC4MLNGFGJWCD6DNSRVIPPOZWXAQAWI4FKTLOJY2A2S
|
||||||
|
GB2C5HCZYWNGVM6JGXDWQBJTMUY4S2HPPTCAH63HFAQVL2ALXDW7SSJ7
|
||||||
|
GDLVIB44LVONM5K67LUPSFZMSX7G2RLYVBM5MMHUJ4NAQJU7CH4HBJBO
|
||||||
|
GDKXTUYNW4BJKDM2L7B5XUYFUISV52KUU4G7VPNLF4ZSIKBURM622YPZ
|
||||||
|
GDIJY6K2BBRIRX423ZFUYKKFDN66XP2KMSBZFQSE2PSNDZ6EDVQTRLSU
|
||||||
|
GCWHWDRXYPXQAOYMQKB66SZPLM6UANKGMSL4SP7LSOIA6OTTOYQ6HBIH
|
||||||
|
GBV734I2SV4YDDPVJMYXU3IZ2AIU5GEAJRAD4E4BQG7CA2N63NXSPMD6
|
||||||
|
GAI4C2BGOA3YHVQZZW7OW4FHOGGYWTUBEVNHB6MW4ZAFG7ZAA7D5IPC3
|
||||||
|
GCEJ7DMULFTT25UH4FAAGOZ6KER4WXAYQGJUSIITQD527DGTKSXKBQGR
|
||||||
|
GAQXBLFG4BZGIVY6DBJVWE5EAP3UNHMIA2PYCUVLY2JUSPVWPUF36BW4
|
||||||
|
GAUGOSYLCX7JZTQYF2K7RIMHFWKSA3WSI2OQ4IRKXMDMVE6ABJIJMFQR
|
||||||
|
)
|
||||||
|
|
||||||
|
for wallet in "${wallets[@]}"; do
|
||||||
|
curl -sL "https://horizon.stellar.org/accounts/${wallet}" -H 'Accept: application/json' | jq --raw-output '.balances[] | select(.asset_code == "TFT") | .balance' | xargs printf "%.2f" > ${wallet,,}.md
|
||||||
|
done
|
5
books/farmers/sync_production.sh
Executable file
5
books/farmers/sync_production.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
export NAME=farmers
|
||||||
|
hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/manual/heroscript/$NAME
|
||||||
|
rsync -rv ~/hero/www/info/$NAME/ root@info.ourworld.tf:/root/hero/www/info/$NAME/
|
46
heroscript/farmers/book_collections.md
Normal file
46
heroscript/farmers/book_collections.md
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
```js
|
||||||
|
|
||||||
|
!!book.generate name:'farmers' title:'ThreeFold Farmers Manual' printbook:false foldlevel:1
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/books/manual'
|
||||||
|
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/manual'
|
||||||
|
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/dashboard'
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/tfconnect'
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/developers'
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/farmers'
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/system_administrators'
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/threefold_token'
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/faq'
|
||||||
|
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/about'
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/tech'
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/legal'
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/farming'
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/cloud'
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/collaboration'
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/partners_utilization'
|
||||||
|
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/vindo'
|
||||||
|
|
||||||
|
!!doctree.add
|
||||||
|
url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/collections/mkondo'
|
||||||
|
|
||||||
|
```
|
||||||
|
|
11
heroscript/farmers/context.md
Normal file
11
heroscript/farmers/context.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
```js
|
||||||
|
|
||||||
|
!!books.configure
|
||||||
|
buildroot:'~/hero/var/mdbuild'
|
||||||
|
publishroot:'~/hero/www/info'
|
||||||
|
install:true
|
||||||
|
reset:false
|
||||||
|
|
||||||
|
```
|
||||||
|
|
14
heroscript/farmers/sshkey.md
Normal file
14
heroscript/farmers/sshkey.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
```js
|
||||||
|
!!sshagent.key_add
|
||||||
|
name:'books'
|
||||||
|
privkey:'
|
||||||
|
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||||
|
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
||||||
|
QyNTUxOQAAACDXf9Z/2AH8/8a1ppagCplQdhWyQ8wZAieUw3nNcxsDiQAAAIhb3ybRW98m
|
||||||
|
0QAAAAtzc2gtZWQyNTUxOQAAACDXf9Z/2AH8/8a1ppagCplQdhWyQ8wZAieUw3nNcxsDiQ
|
||||||
|
AAAEC+fcDBPqdJHlJOQJ2zXhU2FztKAIl3TmWkaGCPnyts49d/1n/YAfz/xrWmlqAKmVB2
|
||||||
|
FbJDzBkCJ5TDec1zGwOJAAAABWJvb2tz
|
||||||
|
-----END OPENSSH PRIVATE KEY-----
|
||||||
|
'
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user