Skip to content

Commit

Permalink
Better support for integrations.
Browse files Browse the repository at this point in the history
  • Loading branch information
guydavis committed Dec 19, 2023
1 parent 9622c0d commit 9fb9c8b
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### Added
- Optionally launch `chia-exporter` [metrics endpoint](https://github.com/Chia-Network/chia-exporter) for Prometheus reporting if env var `chia_exporter=true` is set.
### Changed
- Optionally launch of Gigahorse recompute server when in harvester mode if env var `gigahorse_recompute_server=true` is set.
### Updated
- TBD

## [2.1.3] - 2023-12-19
### Updated
- [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.1.3) to v2.1.3 - fix for unforunate bug CNI released in 2.1.2
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.3
2.1.4
1 change: 1 addition & 0 deletions docker/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ ENV keys="/root/.chia/mnemonic.txt"
ENV plots_dir="/plots"
# One of fullnode, farmer, harvester, plotter, farmer+plotter, harvester+plotter. Default is fullnode
ENV mode="fullnode"
ENV chia_exporter="false"
ENV chives_masternode="false"
ENV gigahorse_recompute_server="false"
# The single blockchain to run: chia, flax, nchain, hddcoin, chives, etc
Expand Down
8 changes: 7 additions & 1 deletion scripts/forks/chia_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if [ -z ${CHIA_BRANCH} ]; then
else
cd /tmp
rm -rf /root/.cache
apt-get update && apt-get install -y dialog apt-utils
apt-get update && apt-get install -y dialog apt-utils ca-certificates curl gnupg
/usr/bin/bash /machinaris/scripts/gpu_drivers_install.sh

git clone --branch ${CHIA_BRANCH} --recurse-submodules=mozilla-ca https://github.com/Chia-Network/chia-blockchain.git /chia-blockchain
Expand All @@ -33,4 +33,10 @@ else
curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.1.3/chia-blockchain-cli_2.1.3-1_arm64.deb
apt-get install ./chia-blockchain-cli*.deb
fi

# Also include "chia-exporter" for Prometheus reporting endpoints.
curl -sL https://repo.chia.net/FD39E6D3.pubkey.asc | sudo gpg --dearmor -o /usr/share/keyrings/chia.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/chia.gpg] https://repo.chia.net/chia-exporter/debian/ stable main" | tee /etc/apt/sources.list.d/chia-exporter.list > /dev/null
apt-get update
apt-get install -y chia-exporter
fi
4 changes: 4 additions & 0 deletions scripts/forks/chia_launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ if [[ ${mode} =~ ^fullnode.* ]]; then
else
chia start farmer
fi
if [[ ${chia_exporter} == "true" ]]; then
echo "Starting Chia Exporter service for Prometheus reporting..."
sleep 20 && /usr/local/bin/chia-exporter serve 2>&1 > /root/.chia/mainnet/log/chia-exporter.log &
fi
if [[ ${mode} =~ .*timelord$ ]]; then
if [ ! -f vdf_bench ]; then
echo "Building timelord binaries..."
Expand Down
4 changes: 4 additions & 0 deletions scripts/forks/gigahorse_launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ elif [[ ${mode} =~ ^harvester.* ]]; then
/chia-gigahorse-farmer/chia.bin configure --set-farmer-peer ${farmer_address}:${farmer_port} 2>&1 >> /root/.chia/mainnet/log/init.log
/chia-gigahorse-farmer/chia.bin configure --enable-upnp false 2>&1 >> /root/.chia/mainnet/log/init.log
/chia-gigahorse-farmer/chia.bin start harvester -r
if [[ ${gigahorse_recompute_server} == "true" ]]; then
echo "Starting Gigahorse recompute_server shortly..."
sleep 20 && /chia-gigahorse-farmer/chia_recompute_server 2>&1 > /root/.chia/mainnet/log/recompute.log &
fi
fi
elif [[ ${mode} == 'plotter' ]]; then
echo "Starting in Plotter-only mode. Run Plotman from either CLI or WebUI."
Expand Down

0 comments on commit 9fb9c8b

Please sign in to comment.