Skip to content

Commit 693d8fe

Browse files
feat(indy): refactor codebase for effective deployment
This PR enhances our deployment process for the Indy DLT platform by using the Main branch code. Changes: - Updated various tasks and the `Helmrelease` template file. - Added support for the new Indy version 1.12.6. fixes #quick-fix Signed-off-by: saurabhkumarkardam <saurabh.kumar.kardam@accenture.com>
1 parent 5f6ac46 commit 693d8fe

File tree

12 files changed

+79
-29
lines changed

12 files changed

+79
-29
lines changed

platforms/hyperledger-indy/charts/indy-node/templates/statefulset.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ kind: StatefulSet
99
metadata:
1010
name: "{{ $.Values.metadata.name }}"
1111
namespace: "{{ $.Values.metadata.namespace }}"
12+
labels:
13+
app: "{{ $.Values.metadata.name }}"
1214
spec:
1315
serviceName: "{{ $.Values.metadata.name }}"
1416
replicas: 1
@@ -217,7 +219,7 @@ spec:
217219
- containerPort: {{ $.Values.client.port }}
218220
env:
219221
- name: INDY_NODE_NAME
220-
value: "{{ $.Values.node.name }}"
222+
value: "{{ $.Values.vault.nodeId }}"
221223
- name: INDY_NODE_IP
222224
value: "{{ $.Values.node.ip }}"
223225
- name: INDY_NODE_PORT

platforms/hyperledger-indy/configuration/roles/check/k8_component/tasks/main.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
service_account: "{{ component_name }}"
2828
role: "ro"
2929
shell: |
30-
secret="$(KUBECONFIG={{ kubernetes.config_file }} kubectl get serviceaccount {{ service_account }} -n {{ component_ns }} -o go-template={% raw %}'{{ (index .secrets 0).name }}'{% endraw %})"
31-
kube_token="$(KUBECONFIG={{ kubernetes.config_file }} kubectl get secret ${secret} -n {{ component_ns }} -o go-template={% raw %}'{{ .data.token }}'{% endraw %} | base64 -d)"
30+
secret="{{ service_account }}-token"
31+
kube_token=$(kubectl --kubeconfig={{ kubernetes.config_file }} -n {{ component_ns }} get secret ${secret} -o jsonpath="{.data.token}" | base64 --decode)
3232
vault_token=$(curl --request POST --data '{"jwt": "'"$kube_token"'", "role": "{{ role }}"}' {{ vault.url }}/v1/auth/kubernetes-{{ organization }}-bevel-ac-auth/login | jq -j '.auth.client_token')
33-
echo ${vault_token}
33+
echo $vault_token
3434
register: token_output
3535
when: component_type == "GetServiceAccount"
3636

platforms/hyperledger-indy/configuration/roles/create/helm_component/node/templates/node.tpl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,18 @@ spec:
4040
name: {{ component_name }}
4141
repository: {{ network.docker.url }}/bevel-indy-node:{{ network.version }}
4242
node:
43-
name: {{ stewardItem.name }}
43+
name: {{ component_name }}
4444
ip: 0.0.0.0
4545
publicIp: {{ stewardItem.publicIp }}
4646
port: {{ stewardItem.node.port }}
47+
targetPort: {{ stewardItem.node.targetPort }}
4748
ambassadorPort: {{ stewardItem.node.ambassador }}
4849
client:
50+
name: {{ component_name }}
4951
publicIp: {{ stewardItem.publicIp }}
5052
ip: 0.0.0.0
5153
port: {{ stewardItem.client.port }}
54+
targetPort: {{ stewardItem.client.targetPort }}
5255
ambassadorPort: {{ stewardItem.client.ambassador }}
5356
service:
5457
{% if organizationItem.cloud_provider != 'minikube' %}
@@ -99,4 +102,3 @@ spec:
99102
keys:
100103
storagesize: 3Gi
101104
storageClassName: {{ sc_name }}
102-

platforms/hyperledger-indy/configuration/roles/create/k8_component/templates/serviceaccount.tpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@ kind: ServiceAccount
33
metadata:
44
name: {{ component_name }}
55
namespace: {{ component_namespace }}
6+
---
7+
apiVersion: v1
8+
kind: Secret
9+
type: kubernetes.io/service-account-token
10+
metadata:
11+
name: {{ component_name }}-token
12+
namespace: {{ component_namespace }}
13+
annotations:
14+
kubernetes.io/service-account.name: "{{ component_name }}"

platforms/hyperledger-indy/configuration/samples/network-indy-newnode-to-baf-network.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ network:
1515
# Network level configuration specifies the attributes required for each organization
1616
# to join an existing network.
1717
type: indy
18-
version: 1.11.0 # Supported versions 1.11.0 and 1.12.1
18+
version: 1.12.6 # Supported versions 1.11.0, 1.12.1 & 1.12.6
1919

2020
#Environment section for Kubernetes setup
2121
env:
22-
type: indy # tag for the environment. Important to run multiple flux on single cluster
22+
type: indy # tag for the environment. Important to run multiple flux on single cluster
2323
proxy: ambassador # value has to be 'ambassador' as 'haproxy' has not been implemented for Indy
24+
proxy_namespace: "ambassador" # Namespace for the proxy
2425
ambassadorPorts:
2526
portRange: # For a range of ports
2627
from: 9711
@@ -64,6 +65,8 @@ network:
6465
region: "region" # AWS region
6566

6667
publicIps: ["3.221.78.194"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster
68+
azure:
69+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
6770

6871
# Kubernetes cluster deployment variables. The config file path has to be provided in case
6972
# the cluster has already been created.
@@ -178,6 +181,8 @@ network:
178181
region: "region" # AWS region
179182

180183
publicIps: ["3.221.78.194"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster # List of all public IP addresses of each availability zone
184+
azure:
185+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
181186

182187
# Kubernetes cluster deployment variables. The config file path has to be provided in case
183188
# the cluster has already been created.

platforms/hyperledger-indy/configuration/samples/network-indy-newnode-to-non-baf-network.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ network:
1414
# Network level configuration specifies the attributes required for each organization
1515
# to join an existing network.
1616
type: indy
17-
version: 1.11.0 # Supported versions 1.11.0 and 1.12.1
17+
version: 1.12.6 # Supported versions 1.11.0, 1.12.1 & 1.12.6
1818

1919
#Environment section for Kubernetes setup
2020
env:
21-
type: indy # tag for the environment. Important to run multiple flux on single cluster
21+
type: indy # tag for the environment. Important to run multiple flux on single cluster
2222
proxy: ambassador # value has to be 'ambassador' as 'haproxy' has not been implemented for Indy
23+
proxy_namespace: "ambassador" # Namespace for the proxy
2324
ambassadorPorts:
2425
portRange: # For a range of ports
2526
from: 9711
@@ -63,6 +64,8 @@ network:
6364
region: "region" # AWS region
6465

6566
publicIps: ["3.221.78.194"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster # List of all public IP addresses of each availability zone
67+
azure:
68+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
6669

6770
# Kubernetes cluster deployment variables. The config file path has to be provided in case
6871
# the cluster has already been created.

platforms/hyperledger-indy/configuration/samples/network-indyv3-aries.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ network:
1414
# Network level configuration specifies the attributes required for each organization
1515
# to join an existing network.
1616
type: indy
17-
version: 1.11.0 # Supported versions 1.11.0 and 1.12.1
17+
version: 1.12.6 # Supported versions 1.11.0, 1.12.1 & 1.12.6
1818

1919
#Environment section for Kubernetes setup
2020
env:
2121
type: "bevel" # tag for the environment. Important to run multiple flux on single cluster
22-
proxy: ambassador # value has to be 'ambassador' as 'haproxy' has not been implemented for Indy
22+
proxy: ambassador # value has to be 'ambassador' as 'haproxy' has not been implemented for Indy
23+
proxy_namespace: "ambassador" # Namespace for the proxy
2324
# Must be different from all stward ambassador ports specified in the rest of this network yaml
2425
ambassadorPorts: # Any additional Ambassador ports can be given here, this is valid only if proxy='ambassador'
2526
ports: 15010,15023,15024,15025,15033,15034,15035,15043,15044,15045 # Each Client Agent uses 3 ports # Indy does not use a port range as it creates an NLB, and only necessary ports should be opened
@@ -61,6 +62,8 @@ network:
6162
region: "region" # AWS region
6263

6364
publicIps: ["1.1.1.1", "2.2.2.2"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster
65+
azure:
66+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
6467

6568
# Kubernetes cluster deployment variables. The config file path has to be provided in case
6669
# the cluster has already been created.
@@ -114,6 +117,8 @@ network:
114117
region: "region" # AWS region
115118

116119
publicIps: ["192.168.99.173"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster
120+
azure:
121+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
117122

118123
# Kubernetes cluster deployment variables. The config file path has to be provided in case
119124
# the cluster has already been created.

platforms/hyperledger-indy/configuration/samples/network-indyv3.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@ network:
1616
# Network level configuration specifies the attributes required for each organization
1717
# to join an existing network.
1818
type: indy
19-
version: 1.11.0 # Supported versions 1.11.0 and 1.12.1
19+
version: 1.12.6 # Supported versions 1.11.0, 1.12.1 & 1.12.6
2020

2121
#Environment section for Kubernetes setup
2222
env:
23-
type: "dev" # tag for the environment. Important to run multiple flux on single cluster
23+
type: "dev" # tag for the environment. Important to run multiple flux on single cluster
2424
proxy: ambassador # value has to be 'ambassador' as 'haproxy' has not been implemented for Indy
25+
proxy_namespace: "ambassador" # Namespace for the proxy
2526
# Must be different from all other ports specified in the rest of this network yaml
2627
ambassadorPorts: # Any additional Ambassador ports can be given here, this is valid only if proxy='ambassador'
2728
ports: 15010,15023,15024,15025,15033,15034,15035,15043,15044,15045 # Each Client Agent uses 3 ports # Indy does not use a port range as it creates an NLB, and only necessary ports should be opened
@@ -63,6 +64,8 @@ network:
6364
region: "region" # AWS region
6465

6566
publicIps: ["1.1.1.1", "2.2.2.2"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster
67+
azure:
68+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
6669

6770
# Kubernetes cluster deployment variables. The config file path has to be provided in case
6871
# the cluster has already been created.
@@ -116,6 +119,8 @@ network:
116119
region: "region" # AWS region
117120

118121
publicIps: ["3.221.78.194"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster
122+
azure:
123+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
119124

120125
# Kubernetes cluster deployment variables. The config file path has to be provided in case
121126
# the cluster has already been created.
@@ -205,6 +210,8 @@ network:
205210
region: "region" # AWS region
206211

207212
publicIps: ["3.221.78.194"] # List of all public IP addresses of each availability zone from all organizations in the same k8s cluster
213+
azure:
214+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
208215

209216
# Kubernetes cluster deployment variables. The config file path has to be provided in case
210217
# the cluster has already been created.

platforms/hyperledger-indy/configuration/samples/network-minikube-aries.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ network:
1414
# Network level configuration specifies the attributes required for each organization
1515
# to join an existing network.
1616
type: indy
17-
version: 1.11.0 # Supported versions 1.11.0 and 1.12.1
17+
version: 1.12.6 # Supported versions 1.11.0, 1.12.1 & 1.12.6
1818

1919
#Environment section for Kubernetes setup
2020
env:
2121
type: "bevel" # tag for the environment. Important to run multiple flux on single cluster
22-
proxy: none # proxy is none for minikube/single cluster
23-
retry_count: 20 # Retry count for the checks
24-
external_dns: disabled # Should be enabled if using external-dns for automatic route configuration
22+
proxy: none # proxy is none for minikube/single cluster
23+
proxy_namespace: "ambassador" # Namespace for the proxy
24+
retry_count: 20 # Retry count for the checks
25+
external_dns: disabled # Should be enabled if using external-dns for automatic route configuration
2526

2627
# Docker registry details where images are stored. This will be used to create k8s secrets
2728
# Please ensure all required images are built and stored in this registry.
@@ -48,6 +49,8 @@ network:
4849
type: peer
4950
cloud_provider: minikube
5051
publicIps: [] # Public Ips of stewards/nodes [public ip of minikube]
52+
azure:
53+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
5154

5255
# Kubernetes cluster deployment variables. The config file path has to be provided in case
5356
# the cluster has already been created.
@@ -92,6 +95,8 @@ network:
9295
type: peer
9396
cloud_provider: minikube
9497
publicIps: ["192.168.99.173"] # Public Ips of stewards/nodes [public ip of minikube]
98+
azure:
99+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
95100

96101
# Kubernetes cluster deployment variables. The config file path has to be provided in case
97102
# the cluster has already been created.

platforms/hyperledger-indy/configuration/samples/network-minikube.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ network:
1111
# Network level configuration specifies the attributes required for each organization
1212
# to join an existing network.
1313
type: indy
14-
version: 1.11.0 # Supported versions 1.11.0 and 1.12.1
14+
version: 1.12.6 # Supported versions 1.11.0, 1.12.1 & 1.12.6
1515

1616
#Environment section for Kubernetes setup
1717
env:
1818
type: "bevel" # tag for the environment. Important to run multiple flux on single cluster
19-
proxy: none # proxy is none for minikube/single cluster
20-
retry_count: 20 # Retry count for the checks
21-
external_dns: disabled # Should be enabled if using external-dns for automatic route configuration
19+
proxy: none # proxy is none for minikube/single cluster
20+
proxy_namespace: "ambassador" # Namespace for the proxy
21+
retry_count: 20 # Retry count for the checks
22+
external_dns: disabled # Should be enabled if using external-dns for automatic route configuration
2223

2324
# Docker registry details where images are stored. This will be used to create k8s secrets
2425
# Please ensure all required images are built and stored in this registry.
@@ -45,6 +46,8 @@ network:
4546
type: peer
4647
cloud_provider: minikube
4748
publicIps: [] # Public Ips of stewards/nodes [public ip of minikube]
49+
azure:
50+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
4851

4952
# Kubernetes cluster deployment variables. The config file path has to be provided in case
5053
# the cluster has already been created.
@@ -89,6 +92,8 @@ network:
8992
type: peer
9093
cloud_provider: minikube
9194
publicIps: ["192.168.99.173"] # Public Ips of stewards/nodes [public ip of minikube]
95+
azure:
96+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
9297

9398
# Kubernetes cluster deployment variables. The config file path has to be provided in case
9499
# the cluster has already been created.
@@ -165,6 +170,8 @@ network:
165170
type: peer
166171
cloud_provider: minikube
167172
publicIps: ["192.168.99.173"] # Public Ips of stewards/nodes [public ip of minikube]
173+
azure:
174+
node_resource_group: "MC_myResourceGroup_myCluster_westeurope"
168175

169176
# Kubernetes cluster deployment variables. The config file path has to be provided in case
170177
# the cluster has already been created.

0 commit comments

Comments
 (0)