Update the install to start to use kustomize
This commit is contained in:
parent
987b654900
commit
0a5f0286ca
|
@ -6,26 +6,23 @@ kind delete cluster --name zcash-testnet-in-a-box || true
|
|||
kind create cluster --name zcash-testnet-in-a-box
|
||||
kubectl cluster-info
|
||||
|
||||
kubectl apply -f tekton/releases/tekton-pipelines-v0.13.2.yml
|
||||
kubectl apply -f tekton/releases/tekton-dashboard-v0.7.0.yml
|
||||
kubectl apply -f tekton/serviceAccount.yml
|
||||
kubectl apply -f bases/tekton/releases/tekton-pipelines-v0.13.2.yml
|
||||
kubectl apply -f bases/tekton/releases/tekton-dashboard-v0.7.0.yml
|
||||
|
||||
kubectl create -f tekton/tasks/create-zcashrpc-secret.yml
|
||||
kubectl create -f tekton/tasks/create-monitoring-grafana-admin-secret.yml
|
||||
kubectl apply -k bases/
|
||||
|
||||
kubectl apply -f ipfs/stateful-set.yml
|
||||
kubectl apply -f monitoring/configmap.yml
|
||||
kubectl apply -f monitoring/service.yml
|
||||
kubectl apply -f monitoring/serviceaccount.yml
|
||||
kubectl apply -f monitoring/statefulset.yml
|
||||
## Deploy dashboard
|
||||
kubectl create configmap grafana-dashboard-zcash-tnb --from-file=./bases/monitoring/grafana-dashboard-zcash-tnb.json
|
||||
|
||||
kubectl create configmap grafana-dashboard-zcash-tnb --from-file=./monitoring/grafana-dashboard-zcash-tnb.json
|
||||
# Finish tasks I can't automate yet
|
||||
kubectl create -f taskruns/create-zcashrpc-secret.yml
|
||||
kubectl create -f taskruns/create-monitoring-grafana-admin-secret.yml
|
||||
|
||||
# Populate IPFS
|
||||
kubectl create -f taskruns/import-zcash-params-ipfs.yml
|
||||
kubectl create -f taskruns/import-zcash-tnb-artifacts-ipfs.yml
|
||||
kubectl create -f taskruns/import-zcash-snapshot-ipfs.yml
|
||||
|
||||
kubectl apply -f deploy/configmaps-tnb.yml
|
||||
kubectl apply -f tekton/tasks/ipfs-pin-cid.yml
|
||||
kubectl create -f tekton/tasks/import-zcash-params-ipfs.yml
|
||||
kubectl create -f tekton/tasks/import-zcash-tnb-artifacts-ipfs.yml
|
||||
kubectl create -f tekton/tasks/import-zcash-snapshot-ipfs.yml
|
||||
|
||||
## Watch the taskrun statuses
|
||||
kubectl get taskruns
|
||||
|
|
|
@ -33,11 +33,6 @@ spec:
|
|||
- configMapRef:
|
||||
name: zcashd-testnet-miner-config
|
||||
env:
|
||||
- name: Z_SECRETACCESSKEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: minio-secret-key
|
||||
key: SECRETACCESSKEY
|
||||
- name: ZCASHD_RPCPASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
@ -53,21 +48,20 @@ spec:
|
|||
env | sort
|
||||
mkdir ${HOME}/.zcash
|
||||
cd ${HOME}/.zcash
|
||||
#### Configure the minio client ####
|
||||
mc config host add zcash-in-a-box http://minio:9000 minio ${Z_SECRETACCESSKEY} --api S3v4
|
||||
#### Get zcash network parameters ####
|
||||
mc cp -r zcash-in-a-box/cache/zcash-params/ ${HOME}/.zcash-params/
|
||||
#### Get zcash-tnb-binaries ####
|
||||
#sleep infinity
|
||||
mc cp zcash-in-a-box/binaries/${ARCHIVE_NAME} ${HOME}/zcash-tnb-archive.tgz
|
||||
#mc cp zcash-in-a-box/binaries/${WALLET_NAME} ${HOME}/.zcash/wallet.dat
|
||||
mc cp zcash-in-a-box/cache/${SNAPSHOT_NAME} ${HOME}/zcash-tnb-snapshot.tgz
|
||||
tar zxvf ${HOME}/zcash-tnb-archive.tgz -C ${HOME}
|
||||
tar zxvf ${HOME}/zcash-tnb-snapshot.tgz -C ${HOME}/.zcash/
|
||||
# Get the zcash network parameters
|
||||
ipfs get --api /dns/ipfs-cache/tcp/5001 ${ZCASH_PARAMS_IPFSCID} -o ${HOME}/.zcash-params
|
||||
# Get a zcash blockchain snapshot
|
||||
ipfs get --api /dns/ipfs-cache/tcp/5001 ${SNAPSHOT_IPFSCID} -o snapshot.tgz
|
||||
# Get a some zcash artifacts
|
||||
ipfs get --api /dns/ipfs-cache/tcp/5001 ${ARTIFACTS_IPFSCID} -o artifacts.tgz
|
||||
# Extract before execution
|
||||
tar zxvf artifacts.tgz -C ${HOME}
|
||||
tar zxvf snapshot.tgz -C ${HOME}/.zcash/
|
||||
#### Copy the configmap, because reasons ####
|
||||
cp /workspace/zcashconf/zcash.conf ${HOME}/.zcash/zcash.conf
|
||||
cat ${HOME}/.zcash/zcash.conf
|
||||
sleep 7 # Lucky!
|
||||
# Start zcashd
|
||||
${HOME}/workspace/source/src/zcashd -rpcpassword=${ZCASHD_RPCPASSWORD} -rpcallowip=0.0.0.0/0
|
||||
- name: zcashd-exporter
|
||||
image: electriccoinco/zcashd_exporter:v0.3
|
|
@ -14,7 +14,7 @@ spec:
|
|||
labels:
|
||||
app: ipfs-cache
|
||||
spec:
|
||||
containers:
|
||||
containers:
|
||||
- name: ipfs
|
||||
image: "ipfs/go-ipfs:v0.6.0"
|
||||
resources:
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./tekton/serviceAccount.yml
|
||||
- ./ipfs/stateful-set.yml
|
||||
- ./monitoring/configmap.yml
|
||||
- ./monitoring/service.yml
|
||||
- ./monitoring/serviceaccount.yml
|
||||
- ./monitoring/statefulset.yml
|
||||
- ./deploy/configmaps-tnb.yml
|
||||
- ./tekton/tasks/ipfs-pin-cid.yml
|
||||
- ./deploy/zcash-peers.yml
|
||||
- ./deploy/zcash-tnb-bundle-deploy.yml
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Task
|
||||
metadata:
|
||||
name: ipfs-swarm-connect
|
||||
spec:
|
||||
params:
|
||||
- name: PEER_ADDRESS
|
||||
type: string
|
||||
description: The IPFS Peer Multiaddress for the connection.
|
||||
- name: ipfs-api-service
|
||||
type: string
|
||||
description: The ipfs service dns name
|
||||
default: /dns/ipfs-cache/tcp/5001
|
||||
steps:
|
||||
- name: ipfs-get-cid
|
||||
image: electriccoinco/zcash-in-a-box-runner
|
||||
script: |
|
||||
#!/bin/bash
|
||||
set -exo pipefail
|
||||
|
||||
ipfs --api $(params.ipfs-api-service) \
|
||||
swarm connect \
|
||||
$(params.PEER_ADDRESS)
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
apiVersion: tekton.dev/v1beta1
|
||||
kind: Task
|
||||
metadata:
|
||||
name: ipfs-get-cid
|
||||
spec:
|
||||
params:
|
||||
- name: CID_TO_GET
|
||||
type: string
|
||||
description: The IPFS CID to get.
|
||||
- name: DESTINATION
|
||||
type: string
|
||||
description: Where to save CID_TO_GET
|
||||
- name: ipfs-api-service
|
||||
type: string
|
||||
description: The ipfs service dns name
|
||||
default: /dns/ipfs-cache/tcp/5001
|
||||
workspaces:
|
||||
- name: output
|
||||
mountPath: /workspace/output
|
||||
steps:
|
||||
- name: ipfs-get-cid
|
||||
image: electriccoinco/zcash-in-a-box-runner
|
||||
script: |
|
||||
#!/bin/bash
|
||||
set -exo pipefail
|
||||
|
||||
ipfs --api $(params.ipfs-api-service) \
|
||||
get --output=/workspace/output/$(params.DESTINATION) \
|
||||
/ipfs/$(params.CID_TO_GET)
|
Loading…
Reference in New Issue