From ee28e96a2a732b500f8804a5d79621d7e08a8716 Mon Sep 17 00:00:00 2001 From: Vincent Chan Date: Sat, 22 Jan 2022 06:45:36 +0800 Subject: [PATCH] Add Shibgreen support and optimize environment variable: "controller_host", "controller_api_port" --- charts/machinaris/1.1.1/README.md | 4 +- charts/machinaris/1.1.1/app-readme.md | 4 +- charts/machinaris/1.1.1/ix_values.yaml | 14 ++ charts/machinaris/1.1.1/questions.yaml | 125 ++++++++++++++++++ .../1.1.1/templates/coins-deployment.yaml | 2 +- 5 files changed, 144 insertions(+), 5 deletions(-) mode change 100755 => 100644 charts/machinaris/1.1.1/README.md diff --git a/charts/machinaris/1.1.1/README.md b/charts/machinaris/1.1.1/README.md old mode 100755 new mode 100644 index a505c78690..5eaca51a69 --- a/charts/machinaris/1.1.1/README.md +++ b/charts/machinaris/1.1.1/README.md @@ -3,7 +3,7 @@ Machinaris [MACHINARIS](https://github.com/guydavis/machinaris) is an easy-to-use WebUI for Chia plotting and farming. This includes Chia, Plotman, MadMax, Chiadog under main node along with various coin-forks which can be enabled conditionally. -Coins include Cactus, Chives, CrypoDoge, Flax, Flora, HDDCoin, Maize, NChain, StaiCoin, Stor and BTCGreen. +Coins include Cactus, Chives, CrypoDoge, Flax, Flora, HDDCoin, Maize, NChain, StaiCoin, Stor, BTCGreen and Shibgreen. Introduction ------------ @@ -68,4 +68,4 @@ Following are the Volume Configurations for Machinaris main node & the coin-fork | `plotting` | `/plotting` | `/plotting` | Plotting temp volume for main node & coin forks | | `-config` | `/-config` | `/root/.chia` | Chia config for each of the coin-fork containers| -Where `` is `/mnt//ix-applications/releases//volumes/ix_volumes/` and `` is one of the following: `[ cactus, chives, crypodoge, flax, flora, hddcoin, maize, nchain, staicoin, stor, btcgreen ]`. +Where `` is `/mnt//ix-applications/releases//volumes/ix_volumes/` and `` is one of the following: `[ cactus, chives, crypodoge, flax, flora, hddcoin, maize, nchain, staicoin, stor, btcgreen, shibgreen ]`. diff --git a/charts/machinaris/1.1.1/app-readme.md b/charts/machinaris/1.1.1/app-readme.md index d8bfc3c15f..e42a2ba7ac 100644 --- a/charts/machinaris/1.1.1/app-readme.md +++ b/charts/machinaris/1.1.1/app-readme.md @@ -3,7 +3,7 @@ Machinaris [MACHINARIS](https://github.com/guydavis/machinaris) is an easy-to-use WebUI for Chia plotting and farming. This includes Chia, Plotman, MadMax, Chiadog under main node along with various coin-forks which can be enabled conditionally. -Coins include Cactus, Chives, CrypoDoge, Flax, Flora, HDDCoin, Maize, NChain, StaiCoin, Stor and BTCGreen. +Coins include Cactus, Chives, CrypoDoge, Flax, Flora, HDDCoin, Maize, NChain, StaiCoin, Stor, BTCGreen and Shibgreen. # Machinaris Defaults This section contains information about the defaults of Machinaris application for visibility. @@ -63,4 +63,4 @@ Following are the Volume Configurations for Machinaris main node & the coin-fork | `plotting` | `/plotting` | `/plotting` | Plotting temp volume for main node & coin forks | | `-config` | `/-config` | `/root/.chia` | Chia config for each of the coin-fork containers| -Where `` is `/mnt//ix-applications/releases//volumes/ix_volumes/` and `` is one of the following: `[ cactus, chives, crypodoge, flax, flora, hddcoin, maize, nchain, staicoin, stor, btcgreen ]`. +Where `` is `/mnt//ix-applications/releases//volumes/ix_volumes/` and `` is one of the following: `[ cactus, chives, crypodoge, flax, flora, hddcoin, maize, nchain, staicoin, stor, btcgreen, shibgreen ]`. diff --git a/charts/machinaris/1.1.1/ix_values.yaml b/charts/machinaris/1.1.1/ix_values.yaml index 3fff630bcb..481930ae3f 100644 --- a/charts/machinaris/1.1.1/ix_values.yaml +++ b/charts/machinaris/1.1.1/ix_values.yaml @@ -53,6 +53,7 @@ coins: - staicoin - stor - btcgreen +- shibgreen cryptodoge: apiPort: 8937 farmerPort: 16895 @@ -178,4 +179,17 @@ stor: - containerPort: 8337 name: farming protocol: TCP +shibgreen: + apiPort: 8939 + farmerPort: 18974 + ports: + - containerPort: 8939 + name: api + protocol: TCP + - containerPort: 7442 + name: blockchain + protocol: TCP + - containerPort: 18974 + name: farming + protocol: TCP updateStrategy: Recreate diff --git a/charts/machinaris/1.1.1/questions.yaml b/charts/machinaris/1.1.1/questions.yaml index 8b926c2d0d..2bd5dba87e 100644 --- a/charts/machinaris/1.1.1/questions.yaml +++ b/charts/machinaris/1.1.1/questions.yaml @@ -1621,3 +1621,128 @@ questions: label: "Value" schema: type: string +# Shibgreen Configurations + - variable: shibgreenEnabled + label: "Enable Shibgreen" + group: "Configure Coins" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: shibgreen + label: "Configure Shibgreen" + schema: + type: dict + additional_attrs: true + attrs: + - variable: volumeMounts + label: "Storage Configurations" + schema: + type: dict + attrs: + - variable: config + label: "Configuration Volume" + schema: + type: dict + attrs: + - variable: datasetName + label: "Configuration Volume Dataset Name" + schema: + type: string + hidden: true + $ref: + - "normalize/ixVolume" + show_if: [["hostPathEnabled", "=", false]] + default: "shibgreen-config" + editable: false + - variable: mountPath + label: "Configuration Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + hidden: true + editable: false + default: "/root/.chia" + - variable: hostPathEnabled + label: "Enable Custom Host Path for Configuration Volume" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for Configuration Volume" + schema: + type: hostpath + required: true + - variable: mnemonic + label: "Mnemonic Volume" + schema: + type: dict + attrs: + - variable: datasetName + label: "Mnemonic Volume Dataset Name" + schema: + type: string + hidden: true + $ref: + - "normalize/ixVolume" + show_if: [["hostPathEnabled", "=", false]] + default: "config" + editable: false + - variable: mountPath + label: "Mnemonic Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + hidden: true + editable: false + default: "/root/.chia/mnemonic.txt" + - variable: subPath + label: "Subpath in the Dataset" + schema: + type: string + hidden: true + show_if: [["hostPathEnabled", "=", false]] + default: "mnemonic.txt" + editable: false + - variable: readOnly + label: "Mode" + description: "Mnemonic file mode" + schema: + type: boolean + hidden: true + editable: false + default: true + - variable: hostPathEnabled + label: "Enable Custom Host Path for Mnemonic Volume" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for Mnemonic Volume" + schema: + type: hostpath + required: true + - variable: environmentVariables + label: "Environment Variables" + schema: + type: list + default: [] + items: + - variable: environmentVariable + label: "Environment Variable" + schema: + type: dict + attrs: + - variable: name + label: "Name" + schema: + type: string + - variable: value + label: "Value" + schema: + type: string diff --git a/charts/machinaris/1.1.1/templates/coins-deployment.yaml b/charts/machinaris/1.1.1/templates/coins-deployment.yaml index 36675675ac..5419441d28 100644 --- a/charts/machinaris/1.1.1/templates/coins-deployment.yaml +++ b/charts/machinaris/1.1.1/templates/coins-deployment.yaml @@ -34,7 +34,7 @@ spec: - name: extrappvolume-{{ $index }} mountPath: {{ $hostPathConfiguration.mountPath }} {{ end }} - {{ include "allEnvironmentVariables" (dict "defaultEnv" (dict "TZ" $ref.Values.timezone "worker_address" $ref.Values.nodeIP "worker_api_port" $coin.apiPort "controller_api_port" $coin.apiPort "farmer_port" $coin.farmerPort "blockchains" $coinName "plots_dir" $ref.Values.appVolumeMounts.plots.mountPath "mode" "fullnode") "environmentVariables" $coin.environmentVariables) | nindent 10 }} + {{ include "allEnvironmentVariables" (dict "defaultEnv" (dict "TZ" $ref.Values.timezone "worker_address" $ref.Values.nodeIP "worker_api_port" $coin.apiPort "controller_host" $ref.Values.nodeIP "controller_api_port" $ref.Values.apiPort "farmer_port" $coin.farmerPort "blockchains" $coinName "plots_dir" $ref.Values.appVolumeMounts.plots.mountPath "mode" "fullnode") "environmentVariables" $coin.environmentVariables) | nindent 10 }} volumes: {{ include "common.storage.configureAppVolumes" (dict "appVolumeMounts" $coin.volumeMounts "ixVolumes" $ref.Values.ixVolumes) | nindent 8 }} {{ range $index, $hostPathConfiguration := $ref.Values.extraAppVolumeMounts }} - name: extrappvolume-{{ $coinName }}-{{ $index }}