### Dynamic Documentation Query Example Source: https://docs.thorchain.org/thornodes/kubernetes Shows how to perform an HTTP GET request to query documentation dynamically by appending an 'ask' query parameter with a natural language question. ```http GET https://docs.thorchain.org/thornodes/kubernetes.md?ask= ``` -------------------------------- ### Query Documentation Source: https://docs.thorchain.org/thornodes/kubernetes/setup-linode Example of how to query the documentation dynamically using the 'ask' query parameter in an HTTP GET request. ```http GET https://docs.thorchain.org/thornodes/kubernetes/setup-linode.md?ask= ``` -------------------------------- ### Install Prerequisites Source: https://docs.thorchain.org/thornodes/fullnode/midgard-linux Installs necessary packages for building and running Midgard. Run this command as root. ```sh apt install -y --no-install-recommends apt-transport-https gcc gnupg lsb-release postgresql postgresql-common wget ``` -------------------------------- ### Install Helm 3 and Plugins Source: https://docs.thorchain.org/thornodes/deploying Install Helm 3 and necessary plugins if they are not already available on your system. ```bash make helm make helm-plugins ``` -------------------------------- ### Install kubectl Source: https://docs.thorchain.org/thornodes/developing Installs the Kubernetes CLI tool. Ensure you have the latest version for compatibility. ```bash sudo apt update sudo apt install -y apt-transport-https ca-certificates curl sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list sudo apt update sudo apt install -y kubectl ``` -------------------------------- ### Install THORNode Prerequisites Source: https://docs.thorchain.org/thornodes/fullnode/thornode-linux Installs necessary packages for building and configuring the THORNode daemon. Run as root. ```sh apt install -y --no-install-recommends aria2 ca-certificates curl git golang jq make pv ``` -------------------------------- ### Start THORNode Daemon Source: https://docs.thorchain.org/thornodes/fullnode/thornode-linux Starts the THORNode service using systemd. ```sh systemctl start thornode.service ``` -------------------------------- ### Install TimescaleDB and PostgreSQL Client Source: https://docs.thorchain.org/thornodes/fullnode/midgard-linux Updates the local repository list and installs TimescaleDB and the PostgreSQL client. Run this command as root. ```sh apt update sudo apt install timescaledb-2-postgresql-16 postgresql-client-16 ``` -------------------------------- ### Install TimescaleDB Extension Source: https://docs.thorchain.org/thornodes/fullnode/midgard-linux Connects to the Midgard database and enables the TimescaleDB extension. The `\dx` command lists installed extensions. ```sql CREATE EXTENSION IF NOT EXISTS timescaledb; \dx ``` -------------------------------- ### Example Kubectl Version Output Source: https://docs.thorchain.org/thornodes/kubernetes/setup-digital-ocean This is an example of the output you should expect when successfully verifying your kubectl version. ```text $ kubectl version Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-16T06:30:04Z", GoVersion:"go1.14.5", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-15T16:51:04Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"} ``` -------------------------------- ### Install linode-cli Source: https://docs.thorchain.org/thornodes/kubernetes/setup-linode Installs the linode-cli using pip. Ensure you have Python and pip installed. ```bash pip install linode-cli --upgrade ``` -------------------------------- ### Install TimescaleDB GPG Key Source: https://docs.thorchain.org/thornodes/fullnode/midgard-linux Downloads and installs the TimescaleDB GPG key for package verification. Run this command as root. ```sh wget --quiet -O - https://packagecloud.io/timescale/timescaledb/gpgkey | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/timescaledb.gpg ``` -------------------------------- ### Install kubectl on Windows Source: https://docs.thorchain.org/thornodes/kubernetes/setup-linode Installs the Kubernetes CLI (kubectl) on Windows using the Chocolatey package manager. ```bash choco install kubernetes-cli ``` -------------------------------- ### Start Midgard Service Source: https://docs.thorchain.org/thornodes/fullnode/midgard-linux Use this command to start the Midgard daemon as a systemd service. ```sh systemctl start midgard.service ``` -------------------------------- ### Install Nginx Source: https://docs.thorchain.org/thornodes/fullnode/proxy Installs Nginx on Ubuntu 24.04. This is a prerequisite for setting up the reverse proxy. ```sh apt install -y --no-install-recommends nginx ``` -------------------------------- ### Install Ubuntu 20.04 on Bare Metal Server Source: https://docs.thorchain.org/thornodes/kubernetes/setup-hetzner-bare-metal Manually install Ubuntu 20.04 minimal image onto a Hetzner bare metal server using the 'installimage' command. This command configures the system to use NVMe drive 'nvme0n1' for the OS and reserves other drives for Ceph/Rook storage. ```bash installimage -a -r no -i images/Ubuntu-2004-focal-64-minimal.tar.gz -p /:ext4:all -d nvme0n1 -f yes -t yes -n hostname ``` -------------------------------- ### Create Inventory Files Source: https://docs.thorchain.org/thornodes/kubernetes/setup-hetzner-bare-metal Copy example inventory files to create specific deployment configurations for different clusters. ```bash cp hosts.example inventory/production.yml cp hosts.example inventory/test.yml cp hosts.example inventory/environment.yml cp hosts.example inventory/production-01.yml cp hosts.example inventory/production-02.yml cp hosts.example inventory/production-helsinki.yml cp hosts.example inventory/whatever.yml ``` -------------------------------- ### Install wget on Windows Source: https://docs.thorchain.org/thornodes/kubernetes/setup-linode Installs wget on Windows using the Chocolatey package manager. ```bash choco install wget ``` -------------------------------- ### Run PostgreSQL Package Setup Script Source: https://docs.thorchain.org/thornodes/fullnode/midgard-linux Executes the script to set up the PostgreSQL package repository. Run this command as root. ```sh /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh ``` -------------------------------- ### Install Midgard Components Source: https://docs.thorchain.org/thornodes/fullnode/midgard-linux Clones the Midgard repository, sets environment variables, and installs the blockstore, midgard, trimdb, and statechecks binaries. It also creates necessary directories and copies an OpenAPI file. ```sh git clone --branch 2.24.4 https://gitlab.com/thorchain/midgard.git $HOME/build cd $HOME/build export ENV CGO_ENABLED=1 go install -v -installsuffix cgo ./cmd/blockstore/dump go install -v -installsuffix cgo ./cmd/midgard go install -v -installsuffix cgo ./cmd/trimdb go install -v -installsuffix cgo ./cmd/statechecks mkdir -p $HOME/{config,openapi/generated} cp openapi/generated/doc.html $HOME/openapi/generated/ ``` -------------------------------- ### Install wget and jq using Homebrew Source: https://docs.thorchain.org/thornodes/kubernetes/setup-azure Install wget and jq utilities using Homebrew. These tools are often used for downloading files and processing JSON data, respectively. ```bash brew install wget brew install jq ``` -------------------------------- ### Install Azure CLI and Login Source: https://docs.thorchain.org/thornodes/kubernetes/setup-azure Install the Azure CLI using Homebrew and log in to your Azure account. The Azure CLI is essential for managing Azure resources. ```bash brew install azure-cli az login ``` -------------------------------- ### Install THORNode Source: https://docs.thorchain.org/thornodes/deploying Install the THORNode services. Specify the network (mainnet), type (validator or fullnode), and a namespace name. It is crucial to deploy tools first. ```bash NET=mainnet TYPE= NAME= make install e.g. NET=mainnet TYPE=validator NAME=thornode make install ``` -------------------------------- ### Example Kubectl Node Status Output Source: https://docs.thorchain.org/thornodes/kubernetes/setup-digital-ocean This is an example of the output you should expect when checking your kubectl nodes. The 'STATUS' column should show 'READY'. ```text kubectl get nodes NAME STATUS ROLES AGE VERSION -pool-5xhc1 READY 6m v1.18.6 ``` -------------------------------- ### THORNode Status Output Example Source: https://docs.thorchain.org/thornodes/joining An example of the output from the `make status` command, showing node details, synchronization status, and preflight checks. Pay attention to the 'STATUS' and 'PREFLIGHT' sections. ```text ________ ______ ___ _ __ __ /_ __/ // / __ \/ _ \/ |/ /__ ___/ /__ / / / _ / /_/ / , _/ / _ \/ _ / -_) /_/ /_//_/\____/_/|_/_/|_/\___/\_,_ /__/ ADDRESS thor13hh6qyj0xgw0gv7qpay8thfucxw8hqkved9vr2 IP VERSION 0.0.0 STATUS Unknown BOND 0.00 REWARDS 0.00 SLASH 0 PREFLIGHT { "status": "Standby", "reason": "node account has invalid registered IP address", "code": 1 } API http://:1317/thorchain/doc/ RPC http://:26657 MIDGARD http://:8080/v2/doc CHAIN SYNC BLOCKS THOR 55.250% 37,097/67,144 BTC 2.399% 227,986/678,340 ETH 7.764% 947,182/12,199,994 LTC 0.012% 6,526/1,818,000 BCH 2.293% 197,340/682,404 ``` -------------------------------- ### Install THORNode Binary Source: https://docs.thorchain.org/thornodes/developing Clones the THORNode repository, checks out the develop branch, and installs the THORNode binary for the stagenet environment. ```bash git clone git@gitlab.com:thorchain/thornode.git cd thornode git checkout develop TAG=stagenet make install ``` -------------------------------- ### Setup Node Keys Source: https://docs.thorchain.org/thornodes/joining Execute this command to provide THORChain with your node's public keys for signing sessions. ```bash make set-node-keys ``` -------------------------------- ### Install Docker Source: https://docs.thorchain.org/thornodes/fullnode/midgard-docker Installs the Docker engine on Ubuntu 24.04. Ensure you are running as root or use sudo. ```sh apt install -y --no-install-recommends docker.io ``` -------------------------------- ### Start Minikube Cluster Source: https://docs.thorchain.org/thornodes/developing Starts a Minikube cluster with specific configurations for CPU, memory, Kubernetes version, network plugin, addons, and disk size, tailored for a custom stagenet environment. ```bash minikube start --cpus 8 --memory 32768 \ --kubernetes-version=v1.31.1 \ --network-plugin=cni --cni=cilium \ -p custom-stagenet \ --addons default-storageclass storage-provisioner volumesnapshots csi-hostpath-driver \ --extra-config=kubelet.cgroup-driver=systemd \ --extra-config=kubelet.max-pods=50 \ --disk-size=256gb \ --extra-config=kubeadm.pod-network-cidr=10.244.0.0/16 minikube profile custom-stagenet ``` -------------------------------- ### Install Kubernetes CLI (kubectl) using Homebrew Source: https://docs.thorchain.org/thornodes/kubernetes/setup-azure Install the Kubernetes command-line tool (kubectl) using Homebrew. kubectl is used to interact with your Kubernetes cluster. ```bash brew install kubernetes-cli ``` -------------------------------- ### Install THORNode Dependencies Source: https://docs.thorchain.org/thornodes/fullnode/thornode-docker Installs necessary packages for running and configuring the THORNode container. Ensure you are running as root or use sudo. ```sh apt install -y --no-install-recommends aria2 curl docker.io jq pv ``` -------------------------------- ### Install Hetzner Cloud CLI Source: https://docs.thorchain.org/thornodes/kubernetes/setup-hcloud Install the Hetzner Cloud CLI using Homebrew and create a new context for your project. This CLI is used to manage Hetzner Cloud resources. ```bash brew install hcloud hcloud context create ``` -------------------------------- ### Install Minikube Source: https://docs.thorchain.org/thornodes/developing Installs Minikube, a tool that runs a single-node Kubernetes cluster inside a VM on your local machine, useful for local development. ```bash curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 sudo install minikube-linux-amd64 /usr/local/bin/minikube ``` -------------------------------- ### Install Google Cloud SDK on Linux/Mac Source: https://docs.thorchain.org/thornodes/kubernetes/setup-google-cloud Install the Google Cloud SDK using Homebrew. This SDK is required to manage GCP services and interact with your cloud environment. ```bash brew install google-cloud-sdk ``` -------------------------------- ### Query Documentation via GET Request Source: https://docs.thorchain.org/understanding-thorchain/roles/liquidity-providers Use this GET request to query the documentation index with a specific question. The response will contain a direct answer and relevant excerpts. ```http GET https://docs.thorchain.org/technical-documentation/understanding-thorchain/roles/liquidity-providers.md?ask= ``` -------------------------------- ### Dynamic Documentation Query Source: https://docs.thorchain.org/technical-documentation/thorchain-finance/trade-assets Perform an HTTP GET request to query documentation dynamically by appending an 'ask' query parameter with your question. ```http GET https://docs.thorchain.org/technical-documentation/thorchain-finance/trade-assets.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.thorchain.org/thornodes/managing To get information not explicitly present on a page, make an HTTP GET request to the page URL with an 'ask' query parameter containing your question. ```http GET https://docs.thorchain.org/thornodes/managing.md?ask= ``` -------------------------------- ### Install wget on macOS Source: https://docs.thorchain.org/thornodes/kubernetes/setup-linode Installs wget on macOS using the Homebrew package manager. ```bash brew install wget ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.thorchain.org/thornodes/fullnode/thornode-kubernetes To get additional information not present on the page, perform an HTTP GET request to the current page URL with the 'ask' query parameter. The question should be specific and self-contained. ```http GET https://docs.thorchain.org/thornodes/fullnode/thornode-kubernetes.md?ask= ``` -------------------------------- ### Initialize THORNode Configuration Source: https://docs.thorchain.org/thornodes/fullnode/thornode-linux Initializes the THORNode configuration files and directory layout. Run as the 'thornode' user. ```sh $HOME/go/bin/thornode init thornode --overwrite --chain-id thorchain-1 ``` -------------------------------- ### Install Project Dependencies Source: https://docs.thorchain.org/thornodes/kubernetes/setup-hetzner-bare-metal Install Python packages and Ansible Galaxy roles required for the project. ```bash pip install -r requirements.python.txt ansible-galaxy install -r requirements.ansible.yml ``` -------------------------------- ### Initialize linode-cli Source: https://docs.thorchain.org/thornodes/kubernetes/setup-linode Initiates the linode-cli configuration. You will be prompted to enter your Linode API token. ```bash linode-cli ``` -------------------------------- ### Install Helm Source: https://docs.thorchain.org/thornodes/developing Installs Helm, a package manager for Kubernetes, to simplify deployment and management of applications. ```bash curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash ``` -------------------------------- ### Create Midgard Configuration Directory Source: https://docs.thorchain.org/thornodes/fullnode/midgard-linux Run this command as the `midgard` user to create the necessary directory for configuration files. ```sh mkdir $HOME/config ``` -------------------------------- ### Initialize THORNode Configuration Source: https://docs.thorchain.org/thornodes/developing Initializes the THORNode configuration with a custom profile, setting the home directory for configuration files. ```bash thornode init custom --home ~/.thornode ``` -------------------------------- ### THORName Registration Example Memo Source: https://docs.thorchain.org/technical-documentation/technical-deep-dive/thorchain-name-service An example of a memo string used to register a THORName. This format is used in MsgDeposit transactions. ```text ~:ODIN:BTC:bc1Address:thorAddress:BTC.BTC:1231231 ``` -------------------------------- ### Start Additional Validator Nodes and Deposit Source: https://docs.thorchain.org/thornodes/developing Commands to start supplementary validator nodes and make a deposit to the network using RUNE. ```bash docker compose --profile validator-1 up ``` ```bash thornode tx thorchain deposit 30000000000000 rune "BOND:" --from faucet --chain-id thorchain --node http://localhost:27147 ``` -------------------------------- ### Initialize gcloud CLI and Enable APIs Source: https://docs.thorchain.org/thornodes/kubernetes/setup-google-cloud Initialize the gcloud CLI, log in to your GCP account, and enable the Compute Engine and Kubernetes Engine APIs. This step configures authentication and necessary services for resource provisioning. ```bash gcloud init gcloud auth application-default login gcloud services enable compute.googleapis.com gcloud services enable container.googleapis.com ``` -------------------------------- ### Instantiate Servers with Ansible Source: https://docs.thorchain.org/thornodes/kubernetes/setup-hetzner-bare-metal Execute an Ansible playbook to instantiate servers after they have been reset and bootstrapped. ```bash ansible-playbook server.instantiate.yml -i inventory/environment.yml ``` -------------------------------- ### Install AWS IAM Authenticator (Linux/Mac) Source: https://docs.thorchain.org/thornodes/kubernetes/setup-aws Install the AWS IAM Authenticator tool using Homebrew. This tool is necessary for authenticating with your EKS cluster. ```bash brew install aws-iam-authenticator ``` -------------------------------- ### Deploy Tools Source: https://docs.thorchain.org/thornodes/deploying Deploy essential tools for metrics, logs management, and the Kubernetes Dashboard. ```bash make tools ``` -------------------------------- ### Swap Example Comparison Source: https://docs.thorchain.org/technical-documentation/technical-deep-dive/thorchain-name-service Compares the length of transaction memos for cross-chain swaps with and without using THORNames. THORNames significantly reduce memo length. ```text Without: "=:BTC.BTC:bc1fx6fsev97atsm5j62kgecpslv6vx2nffv0qq2q:2117277:0500:bc1q6ptu8zayukjz3ag4d4pnjjhtxwd4jckh9gufwu" With: "=:BTC.BTC:ODIN:2117277:0500:ORION" 107 characters without THORNames, 33 characters with THORNames. ``` -------------------------------- ### Install Terraform using Homebrew Source: https://docs.thorchain.org/thornodes/kubernetes/setup-azure Install the Terraform CLI using the Homebrew package manager. Terraform is used for provisioning and managing infrastructure as code. ```bash brew install terraform ``` -------------------------------- ### Repository Structure for Multiple Nodes Source: https://docs.thorchain.org/thornodes/kubernetes Demonstrates how to organize repositories for running multiple THORNodes to prevent catastrophic mistakes, suggesting separate machines or user profiles. ```bash ./thornode-ops |./cluster-launcher |./node-launcher ./thornode-ops2 |./cluster-launcher |./node-launcher ``` -------------------------------- ### Query Documentation Index Source: https://docs.thorchain.org/thorchain-finance/continuous-liquidity-pools Perform an HTTP GET request to the documentation index with the 'ask' parameter to get a direct answer to a question and relevant excerpts. ```HTTP GET https://docs.thorchain.org/technical-documentation/thorchain-finance/continuous-liquidity-pools.md?ask= ``` -------------------------------- ### Query Documentation via API Source: https://docs.thorchain.org/thornodes/kubernetes/setup-google-cloud Demonstrates how to query the documentation dynamically by making an HTTP GET request to the page URL with an 'ask' query parameter. ```http GET https://docs.thorchain.org/thornodes/kubernetes/setup-google-cloud.md?ask= ``` -------------------------------- ### Install Thornode Fullnode on Kubernetes Source: https://docs.thorchain.org/thornodes/fullnode/thornode-kubernetes Use this command to install Thornode as a fullnode on Kubernetes. Ensure you set TYPE to 'fullnode' and specify the desired network and name. ```sh NET=mainnet TYPE=fullnode NAME=thornode make install ``` -------------------------------- ### Query Midgard Documentation Dynamically Source: https://docs.thorchain.org/technical-documentation/technology/midgard To get information not directly on the page, perform an HTTP GET request with the 'ask' query parameter. The question should be specific and self-contained. ```http GET https://docs.thorchain.org/technical-documentation/technology/midgard.md?ask= ``` -------------------------------- ### Install and Authenticate Doctl Source: https://docs.thorchain.org/thornodes/kubernetes/setup-digital-ocean Install the Digital Ocean Control tool (doctl) using Homebrew. Authenticate doctl with your Digital Ocean account and retrieve account details. ```bash brew install doctl doctl auth init --context doctl auth switch --context doctl account get ``` -------------------------------- ### Install Python and Ansible Dependencies Source: https://docs.thorchain.org/thornodes/kubernetes/setup-hcloud Install Python dependencies using pip and Ansible Galaxy requirements. This ensures all necessary libraries and roles are available for the deployment process. ```bash (cd hcloud && pip install -r ansible/requirements.txt) ``` ```bash (cd hcloud && ansible-galaxy install -r ansible/requirements.yml) ```