diff --git a/test/machinaris/1.1.0/.helmignore b/test/machinaris/1.1.0/.helmignore new file mode 100644 index 0000000000..46fd899656 --- /dev/null +++ b/test/machinaris/1.1.0/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +# OWNERS file for Kubernetes +OWNERS diff --git a/test/machinaris/1.1.0/Chart.yaml b/test/machinaris/1.1.0/Chart.yaml new file mode 100644 index 0000000000..109a60a63a --- /dev/null +++ b/test/machinaris/1.1.0/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +appVersion: v0.6.7 +dependencies: +- name: common + repository: file://../../../library/common/2112.0.0 + version: 2112.0.0 +description: Global, Versioned, peer-to-peer filesystem. +home: https://github.com/guydavis/machinaris +icon: https://raw.githubusercontent.com/guydavis/machinaris/main/web/static/favicon.ico +keywords: +- storage +- crypto +- blockchain +name: machinaris +sources: +- https://github.com/guydavis/machinaris +version: 1.1.0 diff --git a/test/machinaris/1.1.0/README.md b/test/machinaris/1.1.0/README.md new file mode 100755 index 0000000000..a505c78690 --- /dev/null +++ b/test/machinaris/1.1.0/README.md @@ -0,0 +1,71 @@ +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. + +Introduction +------------ + +This chart bootstraps MACHINARIS deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. + +# Machinaris Defaults +This section contains information about the defaults of Machinaris application for visibility. + +## 1. Environment Variables +Following are the default environment variables for Machinaris main node and the coin forks. + +### Machinaris Node +Machinaris main node comes with following default environment variables: + +| Variable | Default Value | Description | +| ---------------- | ----------------------------------------------------- | --------------------- | +| TZ | Same as to User selected Timezone | Timezone information | +| worker_address | Same as to LAN IP address | Worker Address | +| blockchains | chia | Block Chain | +| plots_dir | Same as to User selected plots volume | Plots Directory | +| mode | fullnode | Machinaris Mode | + +These values can be overridden while configuring Machinaris application. + +### Coin Forks +Coin forks also come with a set of default environment variables: + +| Variable | Default Value | Description | +| ---------------- | ----------------------------------------------------- | --------------------- | +| TZ | Same as to User selected Timezone | Timezone information | +| worker_address | Same as to LAN IP address | Worker Address | +| blockchains | chia | BlockChain | +| plots_dir | Same as to User selected plots volume | Plots Directory | +| mode | fullnode | Machinaris Mode | +| controller_host| Same as to LAN IP address | Controller Host | +| worker_api_port| Coin's Workload REST API Port | Worker API Port | + +These defaults can be overridden for each coin fork when you enable them through Machinaris application configuration. + +## 2. Volumes + +Before getting to defaults, please take the following note: +> +>If Custom Host Path is not enabled for a Volume Configuration then, application will use ix-volumes and create datasets inside for Host Path by default. +> +>The path for ix-volumes has the following composition: +>``` +>/mnt//ix-applications/releases//volumes/ix-volumes/ +>``` +>And with the dataset inside, would be like: +>``` +>/mnt//ix-applications/releases//volumes/ix-volumes/> +>``` +> +Following are the Volume Configurations for Machinaris main node & the coin-forks by default: + +| Volume | hostPath (default value) | mountPath in container | Description | +| ---------------------- | ----------------------------------------------------- | ----------------------- | ----------------------------------------------- | +| `config` | `/config` | `/root/.chia` | Chia config for main node | +| `plots` | `/plots` | `/plots` | Plots volume for main node & coin forks | +| `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 ]`. diff --git a/test/machinaris/1.1.0/app-readme.md b/test/machinaris/1.1.0/app-readme.md new file mode 100644 index 0000000000..d8bfc3c15f --- /dev/null +++ b/test/machinaris/1.1.0/app-readme.md @@ -0,0 +1,66 @@ +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. + +# Machinaris Defaults +This section contains information about the defaults of Machinaris application for visibility. + +## 1. Environment Variables +Following are the default environment variables for Machinaris main node and the coin forks. + +### Machinaris Node +Machinaris main node comes with following default environment variables: + +| Variable | Default Value | Description | +| ---------------- | ----------------------------------------------------- | --------------------- | +| TZ | Same as to User selected Timezone | Timezone information | +| worker_address | Same as to LAN IP address | Worker Address | +| blockchains | chia | Block Chain | +| plots_dir | Same as to User selected plots volume | Plots Directory | +| mode | fullnode | Machinaris Mode | + +These values can be overridden while configuring Machinaris application. + +### Coin Forks +Coin forks also come with a set of default environment variables: + +| Variable | Default Value | Description | +| ---------------- | ----------------------------------------------------- | --------------------- | +| TZ | Same as to User selected Timezone | Timezone information | +| worker_address | Same as to LAN IP address | Worker Address | +| blockchains | chia | BlockChain | +| plots_dir | Same as to User selected plots volume | Plots Directory | +| mode | fullnode | Machinaris Mode | +| controller_host| Same as to LAN IP address | Controller Host | +| worker_api_port| Coin's Workload REST API Port | Worker API Port | + +These defaults can be overridden for each coin fork when you enable them through Machinaris application configuration. + +## 2. Volumes + +Before getting to defaults, please take the following note: +> +>If Custom Host Path is not enabled for a Volume Configuration then, application will use ix-volumes and create datasets inside for Host Path by default. +> +>The path for ix-volumes has the following composition: +>``` +>/mnt//ix-applications/releases//volumes/ix-volumes/ +>``` +>And with the dataset inside, would be like: +>``` +>/mnt//ix-applications/releases//volumes/ix-volumes/> +>``` +> +Following are the Volume Configurations for Machinaris main node & the coin-forks by default: + +| Volume | hostPath (default value) | mountPath in container | Description | +| ---------------------- | ----------------------------------------------------- | ----------------------- | ----------------------------------------------- | +| `config` | `/config` | `/root/.chia` | Chia config for main node | +| `plots` | `/plots` | `/plots` | Plots volume for main node & coin forks | +| `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 ]`. diff --git a/test/machinaris/1.1.0/charts/common-2112.0.0.tgz b/test/machinaris/1.1.0/charts/common-2112.0.0.tgz new file mode 100644 index 0000000000..b59d12bcec Binary files /dev/null and b/test/machinaris/1.1.0/charts/common-2112.0.0.tgz differ diff --git a/test/machinaris/1.1.0/ix_values.yaml b/test/machinaris/1.1.0/ix_values.yaml new file mode 100644 index 0000000000..d60613761b --- /dev/null +++ b/test/machinaris/1.1.0/ix_values.yaml @@ -0,0 +1,180 @@ +image: + pullPolicy: IfNotPresent + repository: ghcr.io/guydavis/machinaris + tag: v0.6.7 +updateStrategy: Recreate + +ports: + - name: chia-network + protocol: TCP + containerPort: 8444 + hostPort: 8444 + - name: machinaris-ui + protocol: TCP + containerPort: 8926 + - name: machinaris-api + protocol: TCP + containerPort: 8927 + hostPort: 8927 + - protocol: TCP + containerPort: 8447 + hostPort: 8447 + +coins: + - cactus + - chives + - cryptodoge + - flax + - flora + - hddcoin + - maize + - nchain + - staicoin + - stor + - btcgreen + +cactus: + apiPort: 8936 + ports: + - name: api + protocol: TCP + containerPort: 8936 + hostPort: 8936 + - name: blockchain + protocol: TCP + containerPort: 11444 + hostPort: 11444 + - name: farming + protocol: TCP + containerPort: 11447 + hostPort: 11447 + +chives: + apiPort: 8931 + ports: + - name: api + protocol: TCP + containerPort: 8931 + - name: blockchain + protocol: TCP + containerPort: 9699 + - name: farming + protocol: TCP + containerPort: 9647 + +cryptodoge: + apiPort: 8937 + ports: + - name: api + protocol: TCP + containerPort: 8937 + - name: blockchain + protocol: TCP + containerPort: 15994 + - name: farming + protocol: TCP + containerPort: 16895 + +flax: + apiPort: 8928 + ports: + - name: api + protocol: TCP + containerPort: 8928 + - name: blockchain + protocol: TCP + containerPort: 6888 + - name: farming + protocol: TCP + containerPort: 6885 + +flora: + apiPort: 8932 + ports: + - name: api + protocol: TCP + containerPort: 8932 + - name: blockchain + protocol: TCP + containerPort: 18644 + - name: farming + protocol: TCP + containerPort: 18647 + +hddcoin: + apiPort: 8930 + ports: + - name: api + protocol: TCP + containerPort: 8930 + - name: blockchain + protocol: TCP + containerPort: 28444 + - name: farming + protocol: TCP + containerPort: 28447 + +maize: + apiPort: 8933 + ports: + - name: api + protocol: TCP + containerPort: 8933 + - name: blockchain + protocol: TCP + containerPort: 8644 + - name: farming + protocol: TCP + containerPort: 8647 + +nchain: + apiPort: 8929 + ports: + - name: api + protocol: TCP + containerPort: 8929 + - name: blockchain + protocol: TCP + containerPort: 58445 + - name: farming + protocol: TCP + containerPort: 38447 + +staicoin: + apiPort: 8934 + ports: + - name: api + protocol: TCP + containerPort: 8934 + - name: blockchain + protocol: TCP + containerPort: 1999 + - name: farming + protocol: TCP + containerPort: 1692 + +stor: + apiPort: 8935 + ports: + - name: api + protocol: TCP + containerPort: 8935 + - name: blockchain + protocol: TCP + containerPort: 8668 + - name: farming + protocol: TCP + containerPort: 8337 + +btcgreen: + apiPort: 8938 + ports: + - name: api + protocol: TCP + containerPort: 8938 + - name: blockchain + protocol: TCP + containerPort: 9282 + - name: farming + protocol: TCP + containerPort: 18655 diff --git a/test/machinaris/1.1.0/questions.yaml b/test/machinaris/1.1.0/questions.yaml new file mode 100644 index 0000000000..808666a084 --- /dev/null +++ b/test/machinaris/1.1.0/questions.yaml @@ -0,0 +1,1614 @@ +groups: + - name: "Networking" + description: "Configure Networking for Machinaris" + - name: "Machinaris Configuration" + description: "Machinaris configuration" + - name: "Storage" + description: "Configure Storage for Machinaris" + - name: "Machinaris Environment Variables" + description: "Set the environment that will be visible to the container" + - name: "Resource Limits" + description: "Set CPU/memory limits for Kubernetes Pod" + - name: "Configure Coins" + description: "Configure different coins" + +portals: + web_portal: + protocols: + - "http" + host: + - "$node_ip" + ports: + - "$variable-machinaris_ui_port" + +questions: + - variable: timezone + label: "Configure timezone" + group: "Machinaris Configuration" + description: "Configure timezone for machinaris" + schema: + type: string + $ref: + - "definitions/timezone" + + - variable: nodeIP + description: "LAN IP address of your TrueNAS server" + group: "Machinaris Configuration" + label: "Worker Address" + schema: + type: string + $ref: + - "definitions/nodeIP" + + - variable: machinaris_ui_port + label: "Machinaris Web UI" + group: "Networking" + description: "Web UI Port for Machinaris" + schema: + type: int + min: 9000 + max: 65535 + default: 9003 + - variable: machinarisApiPort + label: "Machinaris API port" + group: "Networking" + description: "API port for Machinaris" + schema: + editable: false + hidden: true + type: int + default: 8927 + - variable: appVolumeMounts + label: "Machinaris Storage" + group: "Storage" + 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: "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: true + default: "/root/.chia" + - variable: hostPathEnabled + label: "Enable Custom Host Path for Machinaris Configuration Volume" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for Machinaris Configuration Volume" + schema: + type: hostpath + required: true + - variable: plots + label: "Plot Volume" + schema: + type: dict + attrs: + - variable: datasetName + label: "Plots Volume Name" + schema: + type: string + hidden: true + $ref: + - "normalize/ixVolume" + show_if: [["hostPathEnabled", "=", false]] + default: "plots" + editable: false + - variable: mountPath + label: "Plots Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + hidden: true + editable: false + default: "/plots" + - variable: hostPathEnabled + label: "Enable Custom Host Path for Machinaris Plots Volume" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for Machinaris Plots Volume" + schema: + type: hostpath + required: true + - variable: plotting + label: "Plotting Temp Volume" + schema: + type: dict + attrs: + - variable: datasetName + label: "Plotting Volume Name" + schema: + type: string + hidden: true + $ref: + - "normalize/ixVolume" + show_if: [["hostPathEnabled", "=", false]] + default: "plotting" + editable: false + - variable: mountPath + label: "Plotting Mount Path" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + hidden: true + editable: false + default: "/plotting" + - variable: hostPathEnabled + label: "Enable Custom Host Path for Machinaris Plotting Temp Volume" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for Machinaris Plotting Volume" + schema: + type: hostpath + required: true + + - variable: extraAppVolumeMounts + label: "Machinaris Extra Host Path Volumes" + group: "Storage" + schema: + type: list + items: + - variable: extraAppVolume + label: "Machinaris Host Path Volume" + description: "Add an extra host path volume for machinaris application" + schema: + type: dict + attrs: + - variable: mountPath + label: "Mount Path in Pod" + description: "Path where the volume will be mounted inside the pod" + schema: + type: path + required: true + - variable: hostPath + label: "Host Path" + description: "Host path" + schema: + type: hostpath + required: true + + - variable: environmentVariables + label: "Environment Variables for Machinaris" + group: "Machinaris 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 + + - variable: enableResourceLimits + label: "Enable Pod resource limits" + group: "Resource Limits" + schema: + type: boolean + - variable: cpuLimit + label: "CPU limit" + group: "Resource Limits" + schema: + type: string + show_if: [["enableResourceLimits", "=", true]] + valid_chars: "^\\d+(?:\\.\\d+(?!.*m$)|m?$)" + - variable: memLimit + label: "Memory limit" + group: "Resource Limits" + schema: + type: string + show_if: [["enableResourceLimits", "=", true]] + valid_chars: "^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$" + + # Cactus Configurations + - variable: cactusEnabled + label: "Enable Cactus" + group: "Configure Coins" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: cactus + label: "Configure Cactus" + schema: + type: dict + 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: "cactus-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 + + # Chives Configurations + - variable: chivesEnabled + label: "Enable Chives" + group: "Configure Coins" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: chives + label: "Configure Chives" + schema: + type: dict + 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: "chives-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 + + # Cryptodoge Configurations + - variable: cryptodogeEnabled + label: "Enable Cryptodoge" + group: "Configure Coins" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: cryptodoge + label: "Configure Cryptodoge" + schema: + type: dict + 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: "cryptodoge-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 + + # Flax Configurations + - variable: flaxEnabled + label: "Enable Flax" + group: "Configure Coins" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: flax + label: "Configure Flax" + schema: + type: dict + 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: "flax-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 + + # Flora Configurations + - variable: floraEnabled + label: "Enable Flora" + group: "Configure Coins" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: flora + label: "Configure Flora" + schema: + type: dict + 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: "flora-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 + + # HDDCoin Configurations + - variable: hddcoinEnabled + label: "Enable HDDCoin" + group: "Configure Coins" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hddcoin + label: "Configure HDDCoin" + schema: + type: dict + 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: "hddcoin-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 + + # Maize Configurations + - variable: maizeEnabled + label: "Enable Maize" + group: "Configure Coins" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: maize + label: "Configure Maize" + schema: + type: dict + 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: "maize-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 + + # N-Chain Configurations + - variable: nchainEnabled + label: "Enable N-Chain" + group: "Configure Coins" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: nchain + label: "Configure N-Chain" + schema: + type: dict + 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: "nchain-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 + +# Staicoin Configurations + - variable: staicoinEnabled + label: "Enable Staicoin" + group: "Configure Coins" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: staicoin + label: "Configure Staicoin" + schema: + type: dict + 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: "staicoin-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 + + # Stor Configurations + - variable: storEnabled + label: "Enable Stor" + group: "Configure Coins" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: stor + label: "Configure Stor" + schema: + type: dict + show_if: [["storEnabled", "=", 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: "stor-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 + +# BTCGreen Configurations + - variable: btcgreenEnabled + label: "Enable BTCGreen" + group: "Configure Coins" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: btcgreen + label: "Configure BTCGreen" + schema: + type: dict + show_if: [["btcgreenEnabled", "=", 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: "btcgreen-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/test/machinaris/1.1.0/requirements.lock b/test/machinaris/1.1.0/requirements.lock new file mode 100644 index 0000000000..c555ad2636 --- /dev/null +++ b/test/machinaris/1.1.0/requirements.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../../../library/common/2112.0.0 + version: 2112.0.0 +digest: sha256:47115d9b91afe42c8537dcf0fd8224f2f7d1c775f9ff860efa68a6b57d17d1c0 +generated: "2021-12-06T19:55:04.707082+05:00" diff --git a/test/machinaris/1.1.0/templates/_helpers.tpl b/test/machinaris/1.1.0/templates/_helpers.tpl new file mode 100644 index 0000000000..52c11e849b --- /dev/null +++ b/test/machinaris/1.1.0/templates/_helpers.tpl @@ -0,0 +1,40 @@ +{{/* +Init container for coin deployments +*/}} +{{- define "initContainers" -}} +{{- $values := . -}} +{{- $machinarisApiUrl := (printf "http://%v:%v/" $values.nodeIP $values.apiPort) -}} +initContainers: + - name: init-{{ $values.coinName }} + image: curlimages/curl:7.80.0 + command: ['sh', '-c', 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' {{ $machinarisApiUrl }})" != "200" ]]; do echo "Machinaris is offline. Retrying in 2 seconds.." && sleep 2; done'] +{{- end -}} + + +{{/* +Evironment variables (support for overrides) +*/}} +{{- define "allEnvironmentVariables" -}} +{{- $finalEnvironmentVariables := .defaultEnv -}} +{{- range $env := .environmentVariables -}} + {{- $_ := set $finalEnvironmentVariables $env.name $env.value -}} +{{- end -}} +env: +{{- range $envVariableName := keys $finalEnvironmentVariables }} + - name: {{ $envVariableName | quote }} + value: {{ (get $finalEnvironmentVariables $envVariableName) | quote }} +{{- end -}} +{{- end -}} + + +{{/* +Resource limits +*/}} +{{- define "resourceLimits" -}} +{{- if .Values.enableResourceLimits -}} +resources: + limits: + cpu: {{ .Values.cpuLimit }} + memory: {{ .Values.memLimit }} +{{- end -}} +{{- end -}} diff --git a/test/machinaris/1.1.0/templates/coins-deployment.yaml b/test/machinaris/1.1.0/templates/coins-deployment.yaml new file mode 100644 index 0000000000..237f8d7eaf --- /dev/null +++ b/test/machinaris/1.1.0/templates/coins-deployment.yaml @@ -0,0 +1,46 @@ +{{- $ref := . }} +{{- range $coinName := $ref.Values.coins }} +{{- $coinEnabled := get $ref.Values (printf "%vEnabled" $coinName) }} +{{- if $coinEnabled }} +{{- $coin := get $ref.Values $coinName }} +{{- $_ := set $ref "common" (dict "nameSuffix" $coinName) }} +{{- $_ := set $coin.volumeMounts "plots" $ref.Values.appVolumeMounts.plots }} +{{- $_ := set $coin.volumeMounts "plotting" $ref.Values.appVolumeMounts.plotting }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" $ref }} +kind: Deployment +metadata: + name: {{ template "common.names.fullname" $ref }} + labels: {{ include "common.labels" $ref | nindent 4 }} +spec: + strategy: + type: {{ $ref.Values.updateStrategy }} + selector: + matchLabels: {{ include "common.labels.selectorLabels" $ref | nindent 6 }} + template: + metadata: + name: {{ template "common.names.fullname" $ref }} + labels: {{ include "common.labels.selectorLabels" $ref | nindent 8 }} + spec: + hostNetwork: true + {{- include "initContainers" (dict "nodeIP" $ref.Values.nodeIP "apiPort" $ref.Values.machinarisApiPort "coinName" $coinName ) | nindent 6 }} + containers: + - name: {{ $ref.Chart.Name }} + {{- include "resourceLimits" $ref | nindent 10 }} + tty: true + {{ include "common.containers.imageConfig" (dict "repository" $ref.Values.image.repository "tag" $ref.Values.image.tag "pullPolicy" $ref.Values.image.pullPolicy "postfix" $ref.common.nameSuffix) | nindent 10 }} + {{ include "common.containers.configurePorts" $coin | nindent 10 }} + volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" (dict "appVolumeMounts" $coin.volumeMounts "ixVolumes" $ref.Values.ixVolumes) | nindent 12 }} + {{ range $index, $hostPathConfiguration := $ref.Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + mountPath: {{ $hostPathConfiguration.mountPath }} + {{ end }} + {{ include "allEnvironmentVariables" (dict "defaultEnv" (dict "TZ" $ref.Values.timezone "worker_address" $ref.Values.nodeIP "controller_host" $ref.Values.nodeIP "worker_api_port" $coin.apiPort "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 }} + hostPath: + path: {{ $hostPathConfiguration.hostPath }} + {{ end }} +--- +{{- end }} +{{- end }} diff --git a/test/machinaris/1.1.0/templates/deployment.yaml b/test/machinaris/1.1.0/templates/deployment.yaml new file mode 100644 index 0000000000..b56fd6f640 --- /dev/null +++ b/test/machinaris/1.1.0/templates/deployment.yaml @@ -0,0 +1,38 @@ +{{- if hasKey . "common" }} +{{- $_ := unset .common "nameSuffix" }} +{{- end }} +apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: {{ template "common.names.fullname" . }} + labels: {{ include "common.labels" . | nindent 4 }} +spec: + strategy: + type: {{ .Values.updateStrategy }} + selector: + matchLabels: {{ include "common.labels.selectorLabels" . | nindent 6 }} + template: + metadata: + name: {{ template "common.names.fullname" . }} + labels: {{ include "common.labels.selectorLabels" . | nindent 8 }} + spec: + # FIXME: Let's please remove hostnetwork when upstream hostport issue is sorted out with kube-router + hostNetwork: true + containers: + - name: {{ .Chart.Name }} + {{- include "resourceLimits" . | nindent 10 }} + tty: true + {{ include "common.containers.imageConfig" .Values.image | nindent 10 }} + volumeMounts: {{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 12 }} + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + mountPath: {{ $hostPathConfiguration.mountPath }} + {{ end }} + {{ include "common.containers.configurePorts" .Values | nindent 10 }} + {{ include "allEnvironmentVariables" (dict "defaultEnv" (dict "TZ" .Values.timezone "worker_address" .Values.nodeIP "blockchains" "chia" "plots_dir" .Values.appVolumeMounts.plots.mountPath "mode" "fullnode") "environmentVariables" .Values.environmentVariables) | nindent 10 }} + volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }} + {{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }} + - name: extrappvolume-{{ $index }} + hostPath: + path: {{ $hostPathConfiguration.hostPath }} + {{ end }} diff --git a/test/machinaris/1.1.0/templates/service.yaml b/test/machinaris/1.1.0/templates/service.yaml new file mode 100644 index 0000000000..bc10f57869 --- /dev/null +++ b/test/machinaris/1.1.0/templates/service.yaml @@ -0,0 +1,6 @@ +{{ $svc := .Values }} +{{ $ports := list }} +{{ $ports = mustAppend $ports (dict "name" "pms" "port" $svc.machinaris_ui_port "nodePort" $svc.machinaris_ui_port "targetPort" "machinaris-ui") }} +{{ $params := . }} +{{ $_ := set $params "commonService" (dict "ports" $ports "type" "NodePort" ) }} +{{ include "common.classes.service" $params }} diff --git a/test/machinaris/1.1.0/templates/tests/cactus-check.yaml b/test/machinaris/1.1.0/templates/tests/cactus-check.yaml new file mode 100644 index 0000000000..775061f346 --- /dev/null +++ b/test/machinaris/1.1.0/templates/tests/cactus-check.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ .Release.Name }}-cactus-deployment-test" + annotations: + "helm.sh/hook": test +spec: + hostNetwork: true + restartPolicy: Never + containers: + - name: {{ .Release.Name }}-cactus-deployment-test + image: busybox + # Note: Adding sleep 15, as even when cactus pod status is ready, I've seen API + # taking a few seconds to be live and running. + command: ['sh', '-c', 'sleep 30 && nc -vz {{ .Values.nodeIP }} {{ .Values.cactus.apiPort }}'] diff --git a/test/machinaris/1.1.0/templates/tests/machinaris-check.yaml b/test/machinaris/1.1.0/templates/tests/machinaris-check.yaml new file mode 100644 index 0000000000..29b612245e --- /dev/null +++ b/test/machinaris/1.1.0/templates/tests/machinaris-check.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ .Release.Name }}-machinaris-deployment-test" + annotations: + "helm.sh/hook": test +spec: + hostNetwork: true + restartPolicy: Never + containers: + - name: {{ .Release.Name }}-machinaris-deployment-test + image: busybox + command: ['sh', '-c', 'nc -vz {{ .Values.nodeIP }} {{ .Values.machinarisApiPort }}'] diff --git a/test/machinaris/1.1.0/test_values.yaml b/test/machinaris/1.1.0/test_values.yaml new file mode 100644 index 0000000000..efd86a0ff3 --- /dev/null +++ b/test/machinaris/1.1.0/test_values.yaml @@ -0,0 +1,78 @@ +image: + pullPolicy: IfNotPresent + repository: ghcr.io/guydavis/machinaris + tag: v0.6.7 + +machinaris_ui_port: 31003 +machinarisApiPort: 8927 + +ports: + - name: chia-network + protocol: TCP + containerPort: 8444 + hostPort: 8444 + - name: machinaris-ui + protocol: TCP + containerPort: 8926 + - name: machinaris-api + protocol: TCP + containerPort: 8927 + hostPort: 8927 + - protocol: TCP + containerPort: 8447 + hostPort: 8447 + +timezone: America/Edmonton +updateStrategy: Recreate +nodeIP: 127.0.0.1 + +appVolumeMounts: + config: + emptyDir: true + mountPath: /root/.chia + plots: + emptyDir: true + mountPath: /plots + plotting: + emptyDir: true + mountPath: /plotting + +environmentVariables: + - name: mode + value: fullnode + +coins: + - cactus + +cactusEnabled: true +cactus: + apiPort: 8936 + ports: + - name: api + protocol: TCP + containerPort: 8936 + hostPort: 8936 + - name: blockchain + protocol: TCP + containerPort: 11444 + hostPort: 11444 + - name: farming + protocol: TCP + containerPort: 11447 + hostPort: 11447 + volumeMounts: + cactus-config: + emptyDir: true + mountPath: /root/.chia + mnemonic: + emptyDir: true + mountPath: /root/.chia/mnemonic.txt + readOnly: true + subPath: mnemonic.txt + environmentVariables: + - name: mode + value: plotter + +enableResourceLimits: true +cpuLimit: 0.5 +memLimit: 1G