Skip to content

Commit c99fc45

Browse files
authored
Readme for 0.94 NAS Created
1 parent 822f536 commit c99fc45

File tree

1 file changed

+217
-0
lines changed

1 file changed

+217
-0
lines changed

chianas/readme.md

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
<h2 align="center">
2+
<a name="chia_drive_logo" href="https://github.com/rjsears/chia_plot_manager"><img src="https://github.com/rjsears/chia_plot_manager/blob/main/images/chia_plot_manager_new.png" alt="Chia Plot Manager"></a><br>
3+
4+
Chia Plot, Drive Manager, Coin Monitor & Auto Drive (V0.94 - August 8th, 2021)
5+
</h2>
6+
<p align="center">
7+
Multi Server Chia Plot and Drive Management Solution
8+
</p>
9+
10+
<hr><br>
11+
12+
13+
### Basic Installation and Configuration Instructions
14+
15+
It would be virtually impossible to account for every single configuration for each person's server farm setup, but many people are running this code on many different kinds
16+
of configurations. If you have issues, please open an issue and I will try my best to work throught them with you.
17+
18+
In order to run this code, you should start with the main readme one level above this one. It covers things such as the Overview and Theory of operation, how the directory
19+
structories were designed, all of the various command line options and a **lot** of other information about my setup and configuration. This also includes discussions about
20+
network configurations and the like. It really is a **must read** before moving on to this readme.
21+
22+
So on to the **basic** installation and configuration. In order to install the **NAS** portion of this setup (which can be both a NAS and a Plotter if you wish), start with
23+
a fresh installation of Ubuntu 20.04 (or whatever may work for you) and then run the following:
24+
25+
```git clone https://github.com/rjsears/chia_plot_manager.git && mv chia_plot_manager plot_manager && cd plot_manager && chmod +x install.sh && ./install.sh help```<br><br>
26+
27+
This will clone the currnet main branch of my repo, move it into the recommended directory ```(/root/plot_manager)```, set the correct file permissions and then launch the install
28+
script with the `-h` option which will print out the help menu. To run the actual install for the NAS, simply type ```./install.sh nas``` and hit enter. You will be prompted to
29+
answer a series of questions. Read the aformentioned readme to understand these questions, and continue with the install. The install will update your Ubuntu system completely,
30+
install all required dependancies, create the director to hold tha main configuration file ```(plot_manager.yaml)```, create a skel directory structure (if you request it to), and
31+
cleanup after itself. It is **highly** recommended that you do this on a clean system, however it should work on an in-use system as well. I have done a lot of testing on various
32+
production servers and have never had an issue.
33+
34+
Before going further with this, make sure you have your ```Chia``` insalled and configured to your liking. You will need the full path to the logfile as well as the config file.
35+
36+
Remember that you need to configure things like ```postfix``` once you have completed the initial install, otherwise you will not get notification or the daily emailed reports.
37+
Once complete, test it from the command line to make sure you can receive mail. We use the linux mail command to send out all email notifications. Lastly you need to edit your
38+
main configuration file prior to running ```./drive_manager.py``` for the first time. failure to do so will result in an error message telling you to do so!
39+
40+
Some of the entries in the configu file (shown below) you set and some are set by the system. They can be overriden if you know what you are doing, but if not, I would leave them
41+
be. This is a standard YAML file, so leave the formatting as you see it or you will get errors when attempting to run ```drive_manager.py```. Start be setting the following options:
42+
<br>
43+
44+
<ul>
45+
<li><b>configured</b> (set this to <b>true</b>) </li>
46+
<li><b>hostname</b> (set this to the hostname of the system - should match IP address used by all other systems to comunicate to this box)</li>
47+
<li><b>pools</b> (set these setting according to your configuration, see notes) </li>
48+
<li><b>chia_log_file</b> (full path to your chia log file (usually debug.log) (Make sure to set logging level to INFO or DEBIG in your Chia Config)</li>
49+
<li><b>chia_config_file</b> (same as above)</li>
50+
<li><b>remote_harvester_reports</b> (Set according to your configuration. See notes in config file)</li>
51+
<li><b>current_plotting_drive</b> (Generally the first drive you want to store inbound plot on)</li>
52+
<li><b>total_plot_highwater_warning</b> (When you get below this number of available plot space, you will get a warning)</li>
53+
<li><b>offlined_drive</b> (Enter drives here you do not want <b>drive_manager.py</b> to touch or write to)</li>
54+
<li><b>local_plotter</b> (Configure per your setup, see notes in configuration file)</li>
55+
<li><b>notifications</b> (Set according to your preferences)</li>
56+
</ul>
57+
58+
59+
```
60+
# v0.94 2021-08-08
61+
# Once you have made the necessary modifications to this file, change this to
62+
# True.
63+
configured: False
64+
65+
# Enter the hostname of this server:
66+
hostname: chianas01
67+
68+
# Are we plotting for pools? This has nothing to do with the actual plotting of
69+
# plots but rather just naming of the new plots and eventually the replacing of
70+
# old plots with portable plots.
71+
pools:
72+
active: False
73+
# Do we want to replace non-pool plots with new plots
74+
replace_non_pool_plots: True
75+
# Should we fill up empty drive space before replacing old non-pool plots?
76+
fill_empty_drives_first: True
77+
# When we get below this number of plots available on the system
78+
# we will switch to replacing plots. Has no effect is active: False is
79+
# set above
80+
empty_drives_low_water_mark: 100
81+
# How many Portable Plots per day are we generating
82+
current_portable_plots_daily: 0
83+
# What is our Midnight portable plot count?
84+
current_portable_plots_midnight: 1
85+
# What drive are we currently using to replace plots?
86+
current_plot_replacement_drive: /mnt/enclosure0/front/column0/drive4
87+
88+
# Enter Logging Information
89+
logging: True
90+
log_level: DEBUG
91+
92+
93+
# Where is your chia log file located? Remember to set the logging level
94+
# in your chia config to INFO. By default, it is set to WARNING.
95+
chia_log_file: not_set
96+
chia_config_file: not_set
97+
98+
# If you are running multiple remote harvesters, set this to true
99+
# and enter their hostnames below. These hostnames should NOT
100+
# include your local hostname listed above. Also, these hostname
101+
# should be configured for passwordless ssh and should be configured
102+
# such that when you ping the hostname, it goes across the fastest
103+
# interface you have between these harvesters. Set to True if you
104+
# have multiple harvesters and want combined reporting.
105+
remote_harvester_reports:
106+
active: False
107+
remote_harvesters:
108+
- chianas02
109+
- chianas03
110+
111+
# This is the local drive where we store inbound plots from our
112+
# main plotter. Also stores information about our current plots
113+
# on our server. The total plot high water warning is the number
114+
# of plots left when the alert will be sent. When you have LESS
115+
# than this number of plots, you will get an alert.
116+
harvester:
117+
current_plotting_drive: /mnt/enclosure1/front/column1/drive36
118+
current_total_plots_midnight: 1
119+
current_total_plots_daily: 1
120+
total_plot_highwater_warning: 300
121+
total_plots_alert_sent: False
122+
123+
# List of 'offlined' drives that we do not want plots written to
124+
# for any reason. In this case maybe 'drive0' and 'drive1' are our
125+
# OS drives, or maybe they are throwing errors and we don't want to
126+
# use them until they are replaced. If you have no offlined drives,
127+
# this line should look like this: offlined_drives: []
128+
offlined_drives:
129+
- drive0
130+
- drive1
131+
132+
# I use Plotman to do my plotting, but this should work for anything. This
133+
# has NOTHING to do with setting up your plotting configuration and is
134+
# only used for monitoring drive space for notifications. Set to True if
135+
# locally plotting and configure the rest of the settings.
136+
local_plotter:
137+
active: False
138+
139+
# Make sure to use the mountpoint
140+
temp_dirs:
141+
dirs:
142+
- /mnt/nvme_drive0
143+
- /mnt/nvme_drive1
144+
# What critical usage % should we send an error? Do not make this too low
145+
# or you will get nuisance reports.
146+
critical: 99
147+
critical_alert_sent: False
148+
149+
# This is the directory that you are using for your plots. If you will be
150+
# utilizing the integrated 'move_local_plots.py' scripts, this is usually
151+
# just a single drive. The plots are then moved out of this directory to
152+
# their final resting place on the harvester. move_local_plots.py is
153+
# currently only written to support a single drive here.
154+
dst_dirs:
155+
dirs:
156+
- /mnt/enclosure1/rear/column3/drive79
157+
158+
# At what % utilization do we send an error?
159+
critical: 95
160+
critical_alert_sent: False
161+
162+
# This is the current internal drive we are using to stop plots moved off
163+
# of dst_dir above. This is not the same drive we use for storing plots
164+
# coming from an outside plotter. We use a different drive to prevent
165+
# drive IO saturation.
166+
current_internal_drive: /mnt/enclosure1/front/column3/drive59
167+
168+
# During local moves where we are replacing plots, it is very important that
169+
# we stop all local processing if we detect an error, otherwise we could delete
170+
# a bunch of plots without meaning to, each time our script is run. This error is
171+
# set if we encounter an error and must be MANUALLY unset to continue to process
172+
# local plots if you have chosen to replace old plots:
173+
local_move_error: False
174+
# Once we get a local move error, did we send an alert?
175+
local_move_error_alert_sent: False
176+
177+
# This is where we set up our notifications
178+
notifications:
179+
active: True
180+
methods:
181+
pb: False
182+
email: True
183+
sms: False
184+
types:
185+
new_plot_drive: True
186+
daily_update: True
187+
per_plot: False
188+
warnings: True
189+
# What email addresses will get the emails?
190+
emails:
191+
192+
193+
194+
# What phones numbers will received the SMS text messages? Include '+1'
195+
phones:
196+
- '+18584150987'
197+
198+
# These are your notification account settings. For email, you must configure
199+
# your locate MTA. Installer installs Postfix by default. Twilio (SMS) requires
200+
# a paid account, PushBullet is free.
201+
accounts:
202+
twilio:
203+
from: '+18587491119'
204+
account: your_account_key
205+
token: your_account_token
206+
pushBullet:
207+
api: your_account_api
208+
```
209+
210+
<br><br>
211+
212+
Once you have completed all of the configuration changes same the file, switch to ```/root/plot_manager``` and run ```./drive_manager.py -h```
213+
If you get the help screen, it means that we see that you have configured your config file and we are ready to run. Next run it by itself:
214+
```./drive_manager.py```, this will initialize everything and create the necessary files to run the system. If you get any error messages at
215+
this point, you should stop and address them before bringing you plotter online. One of the number one errors is **NOT** running it prior
216+
to starting your plotter process. If you so not run ```./drive_manager.py``` initially, it will **NOT** create the necessary receive scripts
217+
based on your system configuration and will not be able to receive inbound plots from your plotter.

0 commit comments

Comments
 (0)