-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhl-install.sh
51 lines (41 loc) · 1.14 KB
/
hl-install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Kubernetes Install Script to create a Hyperledger Fabric
# Date : 27-07-2016
# Version 0.1
# Author : James Buckett ([email protected])
# Commissioned by ANZ Bank under direction of Ben Smillie ([email protected])
#!/bin/bash -x
clear
echo "Create hyperleder namespace"
kubectl create -f ns-hl.yml
sleep 5
export CONTEXT=$(kubectl config view | awk '/current-context/ {print $2}')
kubectl config set-context $CONTEXT --namespace=hyperledger
echo "Installing Fabric Services"
echo "The wait is for GKE to assign EXTERNAL-IP"
kubectl create -f svc-hl-vp.yml
sleep 5
kubectl create -f svc-hl-nvp.yml
sleep 5
kubectl create -f svc-hl-nvp-lb.yml
sleep 300
kubectl get services
echo "Installing Validating Peer 0"
kubectl create -f dep-hl-vp0.yml
sleep 120
kubectl get services
kubectl get pods
kubectl get replicasets
echo "Installing Validating Peers VP1-VP3"
kubectl create -f dep-hl-vp1-3.yml
sleep 60
kubectl get services
kubectl get pods
kubectl get replicasets
echo "Installing Non Validating Peers NVP0-NVP3"
kubectl create -f dep-hl-nvp.yml
sleep 60
kubectl get services
kubectl get pods
kubectl get replicasets
./svc-hosts.sh
echo "Done"