Skip to content

Commit 6fc34f4

Browse files
feat(substrate): refactor codebase for effective deployment
This PR improves Substrate DLT deployment using code from the main branch. Changes: - Updated the Vault-Auth path for pods to match the expected Vault Authentication Engine in Vault. - Updated the Storage-class name for pods to match the name of the expected storage-class. fixes #quick-fix Signed-off-by: saurabhkumarkardam <saurabh.kumar.kardam@accenture.com>
1 parent 00d0170 commit 6fc34f4

File tree

12 files changed

+33
-26
lines changed

12 files changed

+33
-26
lines changed

platforms/substrate/configuration/roles/create/helm_component/templates/dscp_ipfs_node.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,6 @@ spec:
6969
vault:
7070
address: {{ vault.url }}
7171
role: vault-role
72-
authpath: substrate{{ name }}
72+
authpath: {{ network.env.type }}{{ name }}
7373
serviceaccountname: vault-auth
7474
certsecretprefix: {{ vault.secret_path | default('secretsv2') }}/data/{{ name }}/{{ peer.name }}

platforms/substrate/configuration/roles/create/helm_component/templates/genesis_job.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
vault:
3030
address: {{ vault.url }}
3131
role: vault-role
32-
authpath: substrate{{ name }}
32+
authpath: {{ network.env.type }}{{ name }}
3333
serviceaccountname: vault-auth
3434
certsecretprefix: {{ vault.secret_path | default('secretsv2') }}/{{ name }}
3535
chain: {{ network.config.chain }}

platforms/substrate/configuration/roles/create/helm_component/templates/node_substrate.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,6 @@ spec:
111111
vault:
112112
address: {{ vault.url }}
113113
secretPrefix: {{ vault.secret_path | default('secretsv2') }}/data/{{ name }}
114-
authPath: substrate{{ name }}
114+
authPath: {{ network.env.type }}{{ name }}
115115
appRole: vault-role
116116
image: ghcr.io/hyperledger/alpine-utils:1.0

platforms/substrate/configuration/roles/create/helm_component/templates/substrate_keys_job.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ spec:
3232
vault:
3333
address: {{ vault.url }}
3434
role: vault-role
35-
authpath: substrate{{ name }}
35+
authpath: {{ network.env.type }}{{ name }}
3636
serviceaccountname: vault-auth
3737
certsecretprefix: {{ vault.secret_path | default('secretsv2') }}/data/{{ name }}

platforms/substrate/configuration/roles/create/ipfs_bootnode/tasks/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
vars:
1212
component_name: "{{ peer.name }}-ipfs-node"
1313
type: "dscp_ipfs_node"
14-
storageclass_name: "{{ item.name | lower }}-bevel-storageclass"
14+
storageclass_name: "{{ name }}-bevel-storageclass"
1515
external_url: "{{ item.external_url_suffix }}"
1616
git_url: "{{ item.gitops.git_url }}"
1717
git_branch: "{{ item.gitops.branch }}"

platforms/substrate/configuration/roles/create/member_node/tasks/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
vars:
1212
component_name: "{{ name }}{{ peer.name }}membernode"
1313
type: "node_substrate"
14-
storageclass_name: "{{ item.name | lower }}-bevel-storageclass"
14+
storageclass_name: "{{ name }}-bevel-storageclass"
1515
external_url: "{{ item.external_url_suffix }}"
1616
vault: "{{ item.vault }}"
1717
git_url: "{{ item.gitops.git_url }}"
@@ -35,7 +35,7 @@
3535
vars:
3636
component_name: "{{ peer.name }}-ipfs-node"
3737
type: "dscp_ipfs_node"
38-
storageclass_name: "{{ item.name | lower }}-bevel-storageclass"
38+
storageclass_name: "{{ name }}-bevel-storageclass"
3939
external_url: "{{ item.external_url_suffix }}"
4040
git_url: "{{ item.gitops.git_url }}"
4141
git_branch: "{{ item.gitops.branch }}"

platforms/substrate/configuration/roles/create/validator_node/tasks/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
vars:
1212
component_name: "{{ name }}{{ peer.name }}validatornode"
1313
type: "node_substrate"
14-
storageclass_name: "{{ item.cloud_provider }}storageclass"
14+
storageclass_name: "{{ name }}-bevel-storageclass"
1515
external_url: "{{ item.external_url_suffix }}"
1616
vault: "{{ item.vault }}"
1717
git_url: "{{ item.gitops.git_url }}"

platforms/substrate/configuration/roles/delete/vault_secrets/tasks/main.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#############################################################################################
1010

1111
#############################################################################################
12+
1213
# Delete the Docker credentials
1314
- name: Delete docker creds
1415
k8s:
@@ -37,8 +38,8 @@
3738
# Delete Peer Crypto material
3839
- name: Delete Peer Crypto material
3940
shell: |
40-
vault kv delete {{ item.vault.secret_path | default('secretsv2') }}/{{ item.name }}/{{ peer.name }}/substrate
41-
vault kv delete {{ item.vault.secret_path | default('secretsv2') }}/{{ item.name }}/{{ peer.name }}/ipfs
41+
vault kv delete {{ item.vault.secret_path | default('secretsv2') }}/{{ org_name }}/{{ peer.name }}/substrate
42+
vault kv delete {{ item.vault.secret_path | default('secretsv2') }}/{{ org_name }}/{{ peer.name }}/ipfs
4243
environment:
4344
VAULT_ADDR: "{{ item.vault.url }}"
4445
VAULT_TOKEN: "{{ item.vault.root_token }}"

platforms/substrate/configuration/samples/network-sample.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ network:
2121
# These ports are enabled per cluster, so if you have multiple clusters you do not need so many ports
2222
# This sample uses a single cluster, so we have to open 4 ports for each Node. These ports are again specified for each organization below
2323
ambassadorPorts: # Any additional Ambassador ports can be given here, this is valid only if proxy='ambassador'
24-
portRange: # For a range of ports
25-
from: 15010
26-
to: 15043
24+
# Specify a list of individual ports to use
25+
ports: [15010, 15023, 15024, 15025, 15033, 15034, 15035, 15043, 15044, 15045]
26+
# Alternatively, specify a range of ports to use all ports within the specified range
27+
# portRange:
28+
# from: 15010 # Starting port of the range
29+
# to: 15045 # Ending port of the range
2730
# ports: 15020,15021 # For specific ports
2831
retry_count: 20 # Retry count for the checks on Kubernetes cluster
2932
external_dns: enabled # Should be enabled if using external-dns for automatic route configuration
@@ -32,9 +35,9 @@ network:
3235
# Please ensure all required images are built and stored in this registry.
3336
# Do not check-in docker_password.
3437
docker:
35-
url: "ghcr.io"
36-
#username: "docker_username"
37-
#password: "docker_password"
38+
url: "docker.io"
39+
username: "docker_username"
40+
password: "docker_password"
3841

3942
# Following are the configurations for the common Substrate network
4043
config:

platforms/substrate/configuration/samples/network-substrate.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,17 @@ network:
1717
#Environment section for Kubernetes setup
1818
env:
1919
type: "substratedev" # tag for the environment. Important to run multiple flux on single cluster
20-
proxy: ambassador # value has to be 'ambassador' as 'haproxy' has not been implemented for Substrate
20+
proxy: ambassador # value has to be 'ambassador' as 'haproxy' has not been implemented for Substrate
21+
proxy_namespace: "ambassador" # Namespace for the proxy
2122
# These ports are enabled per cluster, so if you have multiple clusters you do not need so many ports
2223
# This sample uses a single cluster, so we have to open 4 ports for each Node. These ports are again specified for each organization below
2324
ambassadorPorts: # Any additional Ambassador ports can be given here, this is valid only if proxy='ambassador'
24-
portRange: # For a range of ports
25-
from: 15010
26-
to: 15043
25+
# Specify a list of individual ports to use
26+
ports: [15010, 15023, 15024, 15025, 15033, 15034, 15035, 15043, 15044, 15045]
27+
# Alternatively, specify a range of ports to use all ports within the specified range
28+
# portRange:
29+
# from: 15010 # Starting port of the range
30+
# to: 15045 # Ending port of the range
2731
# ports: 15020,15021 # For specific ports
2832
retry_count: 20 # Retry count for the checks on Kubernetes cluster
2933
external_dns: enabled # Should be enabled if using external-dns for automatic route configuration
@@ -59,7 +63,7 @@ network:
5963
name: carrier
6064
type: superuser
6165
external_url_suffix: subs.example.com # This is the url suffix that will be added in DNS recordset. Must be different for different clusters
62-
cloud_provider: gcp # Options: aws, azure, gcp
66+
cloud_provider: aws # Options: aws, azure, gcp
6367
aws:
6468
access_key: "AWS_ACCESS_KEY" # AWS Access key, only used when cloud_provider=aws
6569
secret_key: "AWS_SECRET_KEY" # AWS Secret key, only used when cloud_provider=aws

0 commit comments

Comments
 (0)