mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-25 15:55:18 +00:00
remove deployment from main repo
This commit is contained in:
parent
b04556844f
commit
7257bee903
7
.gitignore
vendored
7
.gitignore
vendored
@ -13,10 +13,3 @@
|
|||||||
|
|
||||||
# Exclude build files
|
# Exclude build files
|
||||||
vendor
|
vendor
|
||||||
|
|
||||||
# Exclude text editor files
|
|
||||||
*.sublime-project
|
|
||||||
*.sublime-workspace
|
|
||||||
|
|
||||||
# Exclude kubernetes secrets
|
|
||||||
deployment/secret*.yml
|
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
To initialise a network:
|
|
||||||
|
|
||||||
- delete everything (including persistant volume claim)
|
|
||||||
- deploy everything except the deployments
|
|
||||||
- wait until the job has finished, then deploy the deployments
|
|
||||||
|
|
||||||
Note on config
|
|
||||||
|
|
||||||
- Secrets and configmaps need to be generated from files
|
|
||||||
- Ideally everything would be in one file but kubectl doesn't scan directories yet: https://github.com/kubernetes/kubernetes/issues/62421
|
|
||||||
- `kubectl create secret generic kava-user-keys --from-file=./init/init-data --dry-run -o yaml > secret-user.yml`
|
|
||||||
- `kubectl create secret generic kava-node-config --from-file=./init/init-data/.kvd/config --dry-run -o yaml > secret-config.yml`
|
|
||||||
|
|
||||||
Examples of using light client with the node:
|
|
||||||
|
|
||||||
- Get the status `kvcli status --node <node's-url>:46657 --chain-id test-kava`
|
|
||||||
- Send coins `kvcli send --name <your-key-name> --to <receiver's-address> --amount 100KVA --node <node's-url>:46657 --chain-id test-kava`
|
|
||||||
- Run the light client daemon `kvcli rest-server --node <node's-url>:46657 --chain-id test-kava`
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
apiVersion: apps/v1beta2
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: kava-d-deployment2
|
|
||||||
labels:
|
|
||||||
app: kava
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
pod: kvd
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: kava
|
|
||||||
pod: kvd
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: kvd
|
|
||||||
image: kava/kava
|
|
||||||
command: ["kvd", "start"]
|
|
||||||
ports:
|
|
||||||
- containerPort: 46656
|
|
||||||
- containerPort: 46657
|
|
||||||
volumeMounts:
|
|
||||||
- name: persistent-storage-kvd
|
|
||||||
mountPath: /root/.kvd
|
|
||||||
volumes:
|
|
||||||
- name: persistent-storage-kvd
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: kava-pvc-kvd2
|
|
@ -1,30 +0,0 @@
|
|||||||
apiVersion: apps/v1beta2
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: kava-lcd-deployment2
|
|
||||||
labels:
|
|
||||||
app: kava
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
pod: kvcli-lcd
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: kava
|
|
||||||
pod: kvcli-lcd
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: kvcli-lcd
|
|
||||||
image: kava/kava
|
|
||||||
command: ["kvcli", "rest-server", "--chain-id=test-kava", "--node=kava-d-service2:46657", "--laddr=tcp://0.0.0.0:1317"]
|
|
||||||
ports:
|
|
||||||
- containerPort: 1317
|
|
||||||
volumeMounts:
|
|
||||||
- name: persistent-storage-kvcli
|
|
||||||
mountPath: /root/.kvcli
|
|
||||||
volumes:
|
|
||||||
- name: persistent-storage-kvcli
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: kava-pvc-kvcli2
|
|
@ -1,5 +0,0 @@
|
|||||||
FROM kava/kava
|
|
||||||
WORKDIR /
|
|
||||||
COPY init.sh ./
|
|
||||||
# Expects init data to be mounted at /init-data
|
|
||||||
CMD ["sh", "init.sh"]
|
|
@ -1,19 +0,0 @@
|
|||||||
# Setup node and light client.
|
|
||||||
echo "This assumes you have wiped old data"
|
|
||||||
|
|
||||||
echo "copying kvd config to the default location ($HOME/.kvd)"
|
|
||||||
initData=./init-data
|
|
||||||
cp -vR $initData/.kvd/. $HOME/.kvd/ # copy contents of .kvd into .kvd, creating dir if necessary
|
|
||||||
|
|
||||||
|
|
||||||
echo "setup validator key from seed"
|
|
||||||
validatorPassword="$(cat $initData/validatorPassword)"
|
|
||||||
echo $validatorPassword
|
|
||||||
validatorBackupPhrase="$(cat $initData/validatorBackupPhrase)"
|
|
||||||
printf "$validatorPassword\n$validatorBackupPhrase\n" | kvcli keys add --recover validator
|
|
||||||
|
|
||||||
|
|
||||||
echo "setup user1 key from seed"
|
|
||||||
user1Password="$(cat ./init-data/user1Password)"
|
|
||||||
user1BackupPhrase="$(cat ./init-data/user1BackupPhrase)"
|
|
||||||
printf "$user1Password\n$user1BackupPhrase\n" | kvcli keys add --recover user1
|
|
@ -1,36 +0,0 @@
|
|||||||
apiVersion: batch/v1
|
|
||||||
kind: Job
|
|
||||||
metadata:
|
|
||||||
name: kava-init-data2
|
|
||||||
labels:
|
|
||||||
app: kava
|
|
||||||
spec:
|
|
||||||
template:
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: run-init
|
|
||||||
image: kava/kava-init
|
|
||||||
volumeMounts:
|
|
||||||
- name: kava-persistent-storage-kvd
|
|
||||||
mountPath: /root/.kvd
|
|
||||||
- name: kava-persistent-storage-kvcli
|
|
||||||
mountPath: /root/.kvcli
|
|
||||||
- name: user-keys
|
|
||||||
mountPath: /init-data/
|
|
||||||
- name: node-config
|
|
||||||
mountPath: /init-data/.kvd/config/
|
|
||||||
restartPolicy: Never
|
|
||||||
volumes:
|
|
||||||
- name: kava-persistent-storage-kvd
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: kava-pvc-kvd2
|
|
||||||
- name: kava-persistent-storage-kvcli
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: kava-pvc-kvcli2
|
|
||||||
- name: user-keys
|
|
||||||
secret:
|
|
||||||
secretName: kava-user-keys
|
|
||||||
- name: node-config
|
|
||||||
secret:
|
|
||||||
secretName: kava-node-config
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: kava-d-service2
|
|
||||||
labels:
|
|
||||||
app: kava
|
|
||||||
spec:
|
|
||||||
type: LoadBalancer
|
|
||||||
ports:
|
|
||||||
- name: rpc
|
|
||||||
port: 46657
|
|
||||||
protocol: TCP
|
|
||||||
targetPort: 46657
|
|
||||||
- name: p2p
|
|
||||||
port: 46656
|
|
||||||
protocol: TCP
|
|
||||||
targetPort: 46656
|
|
||||||
selector:
|
|
||||||
pod: kvd
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: kava-lcd-service2
|
|
||||||
labels:
|
|
||||||
app: kava
|
|
||||||
spec:
|
|
||||||
type: LoadBalancer
|
|
||||||
ports:
|
|
||||||
- name: rest-server
|
|
||||||
port: 1317
|
|
||||||
protocol: TCP
|
|
||||||
targetPort: 1317
|
|
||||||
selector:
|
|
||||||
pod: kvcli-lcd
|
|
@ -1,26 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: kava-pvc-kvd2
|
|
||||||
labels:
|
|
||||||
app: kava
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 8Gi
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: kava-pvc-kvcli2
|
|
||||||
labels:
|
|
||||||
app: kava
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 8Gi
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user