Unverified Commit 8dd9b626 authored by Waqar Ahmed's avatar Waqar Ahmed Committed by GitHub

Merge pull request #109 from truenas/NAS-111692

Add official machinaris application
parents 49e4b8f2 3663e227
# 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
\ No newline at end of file
apiVersion: v1
appVersion: v0.5.1
dependencies:
- name: common
repository: file://../../../library/common/2105.0.0
version: 2105.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.0.0
Machinaris
=====
[MACHINARIS](https://github.com/guydavis/machinaris) is an easy-to-use WebUI for Chia plotting and farming. Includes Chia, Plotman, MadMax, Chiadog, and Flax in a single Docker image.
Introduction
------------
This chart bootstraps MACHINARIS deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
Machinaris
=====
[MACHINARIS](https://github.com/guydavis/machinaris) is an easy-to-use WebUI for Chia plotting and farming. Includes Chia, Plotman, MadMax, Chiadog, and Flax in a single Docker image.
image:
pullPolicy: IfNotPresent
repository: ghcr.io/guydavis/machinaris
tag: v0.5.1
updateStrategy: Recreate
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"
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: 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: 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: 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
dependencies:
- name: common
repository: file://../../../library/common/2105.0.0
version: 2105.0.0
digest: sha256:11522ab36487826700d7ad0f86f713a4bb5d35248014bcef690fe94acbc09ef6
generated: "2021-05-17T18:26:46.201544+05:00"
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 "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 }}
ports:
- name: chia-network
protocol: TCP
containerPort: 8444
hostPort: 8444
- name: machinaris-ui
protocol: TCP
containerPort: 8926
{{ $envList := (default list .Values.environmentVariables) }}
{{ $envList = mustAppend $envList (dict "name" "TZ" "value" $.Values.timezone) }}
{{ include "common.containers.allEnvironmentVariables" (dict "environmentVariables" $envList) | nindent 10 }}
volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
{{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
- name: extrappvolume-{{ $index }}
hostPath:
path: {{ $hostPathConfiguration.hostPath }}
{{ end }}
{{ $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 }}
appVolumeMounts:
config:
emptyDir: true
mountPath: /data
plots:
emptyDir: true
mountPath: /plots
timezone: 'America/Edmonton'
image:
pullPolicy: IfNotPresent
repository: ghcr.io/guydavis/machinaris
tag: v0.5.1
updateStrategy: Recreate
machinaris_ui_port: 31003
categories:
- storage
- crypto
icon_url: https://raw.githubusercontent.com/guydavis/machinaris/main/web/static/favicon.ico
{"filename": "ix_values.yaml", "keys": ["image"], "test_filename": "test_values.yaml"}
#!/usr/bin/python3
import json
import sys
from catalog_update.upgrade_strategy import semantic_versioning
def newer_mapping(image_tags):
key = list(image_tags.keys())[0]
tags = {t.strip('v').replace('_', '.'): t for t in image_tags[key]}
version = semantic_versioning(image_tags[key])
if not version:
return {}
return {
'tags': {key: tags[version]},
'app_version': tags[version],
}
if __name__ == '__main__':
if len(sys.argv) != 2:
exit(1)
print(json.dumps(newer_mapping(json.loads(sys.argv[1]))))
# 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
\ No newline at end of file
apiVersion: v1
appVersion: v0.5.1
dependencies:
- name: common
repository: file://../../../library/common/2105.0.0
version: 2105.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.0.0
Machinaris
=====
[MACHINARIS](https://github.com/guydavis/machinaris) is an easy-to-use WebUI for Chia plotting and farming. Includes Chia, Plotman, MadMax, Chiadog, and Flax in a single Docker image.
Introduction
------------
This chart bootstraps MACHINARIS deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
Machinaris
=====
[MACHINARIS](https://github.com/guydavis/machinaris) is an easy-to-use WebUI for Chia plotting and farming. Includes Chia, Plotman, MadMax, Chiadog, and Flax in a single Docker image.
image:
pullPolicy: IfNotPresent
repository: ghcr.io/guydavis/machinaris
tag: v0.5.1
updateStrategy: Recreate
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"
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: 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: 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: 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
dependencies:
- name: common
repository: file://../../../library/common/2105.0.0
version: 2105.0.0
digest: sha256:11522ab36487826700d7ad0f86f713a4bb5d35248014bcef690fe94acbc09ef6
generated: "2021-05-17T18:26:46.201544+05:00"
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 "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 }}
ports:
- name: chia-network
protocol: TCP
containerPort: 8444
hostPort: 8444
- name: machinaris-ui
protocol: TCP
containerPort: 8926
{{ $envList := (default list .Values.environmentVariables) }}
{{ $envList = mustAppend $envList (dict "name" "TZ" "value" $.Values.timezone) }}
{{ include "common.containers.allEnvironmentVariables" (dict "environmentVariables" $envList) | nindent 10 }}
volumes: {{ include "common.storage.configureAppVolumes" .Values | nindent 8 }}
{{ range $index, $hostPathConfiguration := .Values.extraAppVolumeMounts }}
- name: extrappvolume-{{ $index }}
hostPath:
path: {{ $hostPathConfiguration.hostPath }}
{{ end }}
{{ $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 }}
appVolumeMounts:
config:
emptyDir: true
mountPath: /data
plots:
emptyDir: true
mountPath: /plots
timezone: 'America/Edmonton'
image:
pullPolicy: IfNotPresent
repository: ghcr.io/guydavis/machinaris
tag: v0.5.1
updateStrategy: Recreate
machinaris_ui_port: 31003
categories:
- storage
- crypto
icon_url: https://raw.githubusercontent.com/guydavis/machinaris/main/web/static/favicon.ico
{"filename": "ix_values.yaml", "keys": ["image"], "test_filename": "test_values.yaml"}
#!/usr/bin/python3
import json
import sys
from catalog_update.upgrade_strategy import semantic_versioning
def newer_mapping(image_tags):
key = list(image_tags.keys())[0]
tags = {t.strip('v').replace('_', '.'): t for t in image_tags[key]}
version = semantic_versioning(image_tags[key])
if not version:
return {}
return {
'tags': {key: tags[version]},
'app_version': tags[version],
}
if __name__ == '__main__':
if len(sys.argv) != 2:
exit(1)
print(json.dumps(newer_mapping(json.loads(sys.argv[1]))))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment