From 7257bee903abc9853413eca79f63ebc5ee009356 Mon Sep 17 00:00:00 2001 From: rhuairahrighairigh Date: Tue, 14 Aug 2018 10:06:01 -0400 Subject: [PATCH] remove deployment from main repo --- .gitignore | 7 ----- deployment/README.md | 19 ------------ deployment/deployments/deployment-d.yml | 31 ------------------- deployment/deployments/deployment-lcd.yml | 30 ------------------- deployment/init/Dockerfile | 5 ---- deployment/init/init.sh | 19 ------------ deployment/job.yml | 36 ----------------------- deployment/service.yml | 35 ---------------------- deployment/volume.yml | 26 ---------------- 9 files changed, 208 deletions(-) delete mode 100644 deployment/README.md delete mode 100644 deployment/deployments/deployment-d.yml delete mode 100644 deployment/deployments/deployment-lcd.yml delete mode 100644 deployment/init/Dockerfile delete mode 100644 deployment/init/init.sh delete mode 100644 deployment/job.yml delete mode 100644 deployment/service.yml delete mode 100644 deployment/volume.yml diff --git a/.gitignore b/.gitignore index f2fae544..bf38f2d2 100644 --- a/.gitignore +++ b/.gitignore @@ -13,10 +13,3 @@ # Exclude build files vendor - -# Exclude text editor files -*.sublime-project -*.sublime-workspace - -# Exclude kubernetes secrets -deployment/secret*.yml diff --git a/deployment/README.md b/deployment/README.md deleted file mode 100644 index 7060aa75..00000000 --- a/deployment/README.md +++ /dev/null @@ -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 :46657 --chain-id test-kava` - - Send coins `kvcli send --name --to --amount 100KVA --node :46657 --chain-id test-kava` - - Run the light client daemon `kvcli rest-server --node :46657 --chain-id test-kava` - \ No newline at end of file diff --git a/deployment/deployments/deployment-d.yml b/deployment/deployments/deployment-d.yml deleted file mode 100644 index 500d2866..00000000 --- a/deployment/deployments/deployment-d.yml +++ /dev/null @@ -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 diff --git a/deployment/deployments/deployment-lcd.yml b/deployment/deployments/deployment-lcd.yml deleted file mode 100644 index 8ed5d36f..00000000 --- a/deployment/deployments/deployment-lcd.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/deployment/init/Dockerfile b/deployment/init/Dockerfile deleted file mode 100644 index a1ec8fd3..00000000 --- a/deployment/init/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM kava/kava -WORKDIR / -COPY init.sh ./ -# Expects init data to be mounted at /init-data -CMD ["sh", "init.sh"] diff --git a/deployment/init/init.sh b/deployment/init/init.sh deleted file mode 100644 index de41a45a..00000000 --- a/deployment/init/init.sh +++ /dev/null @@ -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 diff --git a/deployment/job.yml b/deployment/job.yml deleted file mode 100644 index caaa7f20..00000000 --- a/deployment/job.yml +++ /dev/null @@ -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 - diff --git a/deployment/service.yml b/deployment/service.yml deleted file mode 100644 index b345c28c..00000000 --- a/deployment/service.yml +++ /dev/null @@ -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 diff --git a/deployment/volume.yml b/deployment/volume.yml deleted file mode 100644 index de0c970c..00000000 --- a/deployment/volume.yml +++ /dev/null @@ -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 -