From dde05fc30e128c3f3d3e02c984e32a88f9ce1154 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Mon, 10 May 2021 00:14:37 +0500 Subject: [PATCH] Add chia to test train --- test/chia/1.0.0/.helmignore | 23 +++++ test/chia/1.0.0/Chart.yaml | 18 ++++ test/chia/1.0.0/README.md | 8 ++ test/chia/1.0.0/app-readme.md | 4 + test/chia/1.0.0/charts/common-2104.0.0.tgz | Bin 0 -> 4287 bytes test/chia/1.0.0/default_values.yaml | 17 ++++ test/chia/1.0.0/ix_values.yaml | 8 ++ test/chia/1.0.0/questions.yaml | 81 ++++++++++++++++++ test/chia/1.0.0/requirements.lock | 6 ++ test/chia/1.0.0/templates/deployment.yaml | 28 ++++++ .../1.0.0/templates/generate-mnemonic.yaml | 30 +++++++ .../1.0.0/templates/mnemonic-configmap.yaml | 14 +++ test/chia/1.0.0/test_values.yaml | 16 ++++ test/chia/1.0.0/values.yaml | 0 test/chia/item.yaml | 4 + 15 files changed, 257 insertions(+) create mode 100644 test/chia/1.0.0/.helmignore create mode 100644 test/chia/1.0.0/Chart.yaml create mode 100755 test/chia/1.0.0/README.md create mode 100644 test/chia/1.0.0/app-readme.md create mode 100644 test/chia/1.0.0/charts/common-2104.0.0.tgz create mode 100644 test/chia/1.0.0/default_values.yaml create mode 100644 test/chia/1.0.0/ix_values.yaml create mode 100644 test/chia/1.0.0/questions.yaml create mode 100644 test/chia/1.0.0/requirements.lock create mode 100644 test/chia/1.0.0/templates/deployment.yaml create mode 100644 test/chia/1.0.0/templates/generate-mnemonic.yaml create mode 100644 test/chia/1.0.0/templates/mnemonic-configmap.yaml create mode 100644 test/chia/1.0.0/test_values.yaml create mode 100644 test/chia/1.0.0/values.yaml create mode 100644 test/chia/item.yaml diff --git a/test/chia/1.0.0/.helmignore b/test/chia/1.0.0/.helmignore new file mode 100644 index 0000000000..a9fe727881 --- /dev/null +++ b/test/chia/1.0.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 \ No newline at end of file diff --git a/test/chia/1.0.0/Chart.yaml b/test/chia/1.0.0/Chart.yaml new file mode 100644 index 0000000000..ad2b94a969 --- /dev/null +++ b/test/chia/1.0.0/Chart.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +description: Global, Versioned, peer-to-peer filesystem. +name: chia +version: 1.0.0 +appVersion: 1.1.4 +keywords: +- storage +- crypto +- blockchain +home: https://www.chia.net/ +icon: https://www.chia.net/img/chia_logo.svg +sources: +- https://github.com/Chia-Network/chia-blockchain +- https://github.com/orgs/chia-network/packages/container/package/chia +dependencies: + - name: common + repository: file://../../../library/common/2104.0.0 + version: 2104.0.0 diff --git a/test/chia/1.0.0/README.md b/test/chia/1.0.0/README.md new file mode 100755 index 0000000000..d93ffcf19f --- /dev/null +++ b/test/chia/1.0.0/README.md @@ -0,0 +1,8 @@ +Chia Network +===== + +[CHIA](https://www.chia.net/) is a new blockchain and smart transaction platform that is easier to use, more efficient, and secure. +Introduction +------------ + +This chart bootstraps CHIA deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. diff --git a/test/chia/1.0.0/app-readme.md b/test/chia/1.0.0/app-readme.md new file mode 100644 index 0000000000..6ab946dd9e --- /dev/null +++ b/test/chia/1.0.0/app-readme.md @@ -0,0 +1,4 @@ +Chia Network +===== + +[CHIA](https://www.chia.net/) is a new blockchain and smart transaction platform that is easier to use, more efficient, and secure. diff --git a/test/chia/1.0.0/charts/common-2104.0.0.tgz b/test/chia/1.0.0/charts/common-2104.0.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..83d4f734c9cb497b62f758d4e60ba089837585c8 GIT binary patch literal 4287 zc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K;RT zb$$H$_1P($p1(aixqkh}%a?()JX6BU{RtvAA~6iGyu;XBetP>K;y=f1 zV(*O+5d^^%p)m#oDbvvp^8$t}P1&99Bb0gIgpDWm*yalfRdQvX*ZAL_zTUIh<3;S(59J zja^W4`HhXt2si5@S#*rk408c@V-k-cMzpxqNis&d+7jr003nDjhp}g literal 0 HcmV?d00001 diff --git a/test/chia/1.0.0/default_values.yaml b/test/chia/1.0.0/default_values.yaml new file mode 100644 index 0000000000..3019cf582f --- /dev/null +++ b/test/chia/1.0.0/default_values.yaml @@ -0,0 +1,17 @@ +image: + repository: ghcr.io/chia-network/chia + tag: 1.1.4 + pullPolicy: IfNotPresent +updateStrategy: Recreate +environmentVariables: + - name: "keys" + value: "/plots/keyfile" + +appVolumeMounts: + staging: + emptyDir: true + mountPath: "/plots" + data: + emptyDir: true + mountPath: "/root/.chia" + diff --git a/test/chia/1.0.0/ix_values.yaml b/test/chia/1.0.0/ix_values.yaml new file mode 100644 index 0000000000..1cbd7c5739 --- /dev/null +++ b/test/chia/1.0.0/ix_values.yaml @@ -0,0 +1,8 @@ +image: + repository: ghcr.io/chia-network/chia + tag: 1.1.4 + pullPolicy: IfNotPresent +updateStrategy: Recreate +environmentVariables: + - name: "keys" + value: "/plots/keyfile" diff --git a/test/chia/1.0.0/questions.yaml b/test/chia/1.0.0/questions.yaml new file mode 100644 index 0000000000..94b89a084e --- /dev/null +++ b/test/chia/1.0.0/questions.yaml @@ -0,0 +1,81 @@ +groups: + - name: "Storage" + description: "Configure Storage for Chia" + +questions: + - variable: appVolumeMounts + label: "Chia 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: false + default: "/root/.chia" + - variable: hostPathEnabled + label: "Enable Custom Host Path for Chia Configuration Volume" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for Chia 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 Chia Plots Volume" + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: hostPath + label: "Host Path for Chia Plots Volume" + schema: + type: hostpath + required: true diff --git a/test/chia/1.0.0/requirements.lock b/test/chia/1.0.0/requirements.lock new file mode 100644 index 0000000000..5c4530719f --- /dev/null +++ b/test/chia/1.0.0/requirements.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../../../library/common/2104.0.0 + version: 2104.0.0 +digest: sha256:f0aa221073aafcc5e1602c2a9acb1a508ce72f6847c33dd4a9f9fe10017d5009 +generated: "2021-04-08T16:09:30.006044+05:00" diff --git a/test/chia/1.0.0/templates/deployment.yaml b/test/chia/1.0.0/templates/deployment.yaml new file mode 100644 index 0000000000..abd836d571 --- /dev/null +++ b/test/chia/1.0.0/templates/deployment.yaml @@ -0,0 +1,28 @@ +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 }} + {{ include "common.storage.allContainerVolumeMounts" .Values | nindent 10 }} + ports: + - name: chia-network + protocol: TCP + containerPort: 8444 + hostPort: 8444 +{{ include "common.containers.allEnvironmentVariables" .Values | nindent 10 }} +{{ include "common.storage.allAppVolumes" .Values | nindent 6 }} diff --git a/test/chia/1.0.0/templates/generate-mnemonic.yaml b/test/chia/1.0.0/templates/generate-mnemonic.yaml new file mode 100644 index 0000000000..1f3575ec84 --- /dev/null +++ b/test/chia/1.0.0/templates/generate-mnemonic.yaml @@ -0,0 +1,30 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: "pre-install" + annotations: + "helm.sh/hook": pre-install + "helm.sh/hook-weight": "1" + "helm.sh/hook-delete-policy": hook-succeeded +spec: + template: + metadata: + name: "pre-upgrade-hook2" + spec: + restartPolicy: Never + containers: + - name: {{ .Chart.Name }}-generate-mnemonic + {{ include "common.containers.imageConfig" .Values.image | nindent 8 }} + volumeMounts:{{ include "common.storage.configureAppVolumeMountsInContainer" .Values | nindent 10 }} + + - name: generate-mnemonic-configmap + mountPath: /generate_entrypoint.sh + readOnly: true + subPath: entrypoint.sh + command: + - "/generate_entrypoint.sh" + volumes: {{- include "common.storage.configureAppVolumes" .Values | nindent 8 -}} + - name: generate-mnemonic-configmap + configMap: + defaultMode: 0700 + name: "generate-mnemonic-config-map" diff --git a/test/chia/1.0.0/templates/mnemonic-configmap.yaml b/test/chia/1.0.0/templates/mnemonic-configmap.yaml new file mode 100644 index 0000000000..3158c85014 --- /dev/null +++ b/test/chia/1.0.0/templates/mnemonic-configmap.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: "generate-mnemonic-config-map" + annotations: + "helm.sh/hook": pre-install + "helm.sh/hook-weight": "-1" + "helm.sh/hook-delete-policy": hook-succeeded +data: + entrypoint.sh: |- + #!/bin/sh + if [ ! -e /plots/keyfile ]; then + /chia-blockchain/venv/bin/python3 -c "from chia.util.keychain import generate_mnemonic;print(generate_mnemonic())" > /plots/keyfile; + fi diff --git a/test/chia/1.0.0/test_values.yaml b/test/chia/1.0.0/test_values.yaml new file mode 100644 index 0000000000..ed048e39f3 --- /dev/null +++ b/test/chia/1.0.0/test_values.yaml @@ -0,0 +1,16 @@ +image: + repository: ghcr.io/chia-network/chia + tag: 1.1.4 + pullPolicy: IfNotPresent +updateStrategy: Recreate +environmentVariables: + - name: "keys" + value: "/plots/keyfile" + +appVolumeMounts: + staging: + emptyDir: true + mountPath: "/plots" + data: + emptyDir: true + mountPath: "/root/.chia" diff --git a/test/chia/1.0.0/values.yaml b/test/chia/1.0.0/values.yaml new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/chia/item.yaml b/test/chia/item.yaml new file mode 100644 index 0000000000..866ba5655f --- /dev/null +++ b/test/chia/item.yaml @@ -0,0 +1,4 @@ +categories: + - storage + - crypto +icon_url: https://www.chia.net/img/chia_logo.svg