twitch-channel-points-miner
by MacroPower
A helm chart for Twitch Channel Points Miner.
About this chart
Twitch Channel Points Miner
A helm chart for Twitch Channel Points Miner.
Configuration
You can configure the application by editing the run.py file, which is mounted
as a ConfigMap, by default created via the configMaps.config value. You can
overwrite with your own configuration, or disable creation in the chart with
configMaps.config.enabled=false.
Important notes regarding configuration, several parameters are required for the application to function correctly:
TwitchChannelPointsMiner(
# ...
username="Cookie", # Username must always be "Cookie", see below.
enable_analytics=True, # Must be set to True for probes to work.
logger_settings=LoggerSettings(
save=False, # If True, you'll have to add another volume at /usr/src/app/logs
# ...
)
# ...
)
# You should also call the analytics function, and ensure that the port is set
# to the same value as the service.main.ports.http.port value (5000 by default).
twitch_miner.analytics(host="0.0.0.0", port=5000, refresh=5, days_ago=7)
# ...
twitch_miner.mine([
# ...
])
Cookies
This container uses a pickled cookie to login to Twitch on your behalf. Interactive login does not work for obvious reasons.
To use this, run the application on your local computer and login interactively.
This will save a cookie for you under cookies/${USER}.pkl.
You can encode this as Base64 and upload it to your secret vault, e.g.:
base64 -i cookies/${USER}.pkl | vault secrets set TWITCH_COOKIE
This cookie is added to the container as Cookie.pkl. Which means you must set
your username as Cookie in your run.py file, which will match that cookie.
Source code
The source code for the application can be found here.
The original source code for the app template chart developed by bjw-s / K8s@Home can be found here.
Deploy twitch-channel-points-miner with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has twitch-channel-points-miner on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the charttwitch-channel-points-miner is pinned at v0.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply