Skip to content

Commit

Permalink
Merge pull request #2605 from saikumarbommakanti/cordaent-2586
Browse files Browse the repository at this point in the history
feat(r3-corda-ent): Enable ansible automation
  • Loading branch information
sownak authored Aug 2, 2024
2 parents 71293c5 + bb9b4d1 commit f899b83
Show file tree
Hide file tree
Showing 64 changed files with 326 additions and 3,364 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ kind: Host
metadata:
name: {{ .Release.Name }}-nms
spec:
hostname: {{ .Values.cenm.prefix }}-nms.{{ .Values.global.proxy.externalUrlSuffix }}
hostname: {{ .Values.prefix }}-nms.{{ .Values.global.proxy.externalUrlSuffix }}
acmeProvider:
authority: none
requestPolicy:
Expand All @@ -64,7 +64,7 @@ metadata:
name: {{ .Release.Name }}-mapping
namespace: {{ .Release.Namespace }}
spec:
host: {{ .Values.cenm.prefix }}-nms.{{ .Values.global.proxy.externalUrlSuffix }}
host: {{ .Values.prefix }}-nms.{{ .Values.global.proxy.externalUrlSuffix }}
prefix: /
service: {{ include "networkmap.name" . }}.{{ .Release.Namespace }}:{{ .Values.global.cenm.networkmap.port }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ metadata:
"helm.sh/hook-weight": "0"
"helm.sh/hook-delete-policy": "before-hook-creation"
labels:
app: "{{ .Release.Name }}"
app.kubernetes.io/name: pre-install-hook
app.kubernetes.io/component: certgen
app.kubernetes.io/part-of: {{ include "cenm.fullname" . }}
Expand All @@ -21,6 +22,7 @@ spec:
template:
metadata:
labels:
app: "{{ .Release.Name }}"
app.kubernetes.io/name: pre-install-hook
app.kubernetes.io/component: certgen
app.kubernetes.io/part-of: {{ include "cenm.fullname" . }}
Expand Down
6 changes: 5 additions & 1 deletion platforms/r3-corda-ent/configuration/cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
- include_role:
name: "delete/vault_secrets"
vars:
org_name: "{{ org.name | lower }}"
gitops: "{{ org.gitops }}"
component_name: "{{ org.name | lower }}-ent"
component_name: "{{ org_name }}-ent"
component_type: "{{ org.type | lower }}"
services: "{{ org.services }}"
kubernetes: "{{ org.k8s }}"
loop: "{{ network['organizations'] }}"
loop_control:
loop_var: org
Expand Down
40 changes: 38 additions & 2 deletions platforms/r3-corda-ent/configuration/deploy-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,15 @@
component_name: "{{ org_name }}-init"
component_ns: "{{ org_name }}-ent"
kubernetes: "{{ org.k8s }}"
init_type: "corda_ent_init"
vault: "{{ org.vault }}"
values_dir: "{{ playbook_dir }}/../../../{{ org.gitops.release_dir }}/{{ org_name }}/build"
charts_dir: "{{ org.gitops.chart_source }}"
loop: "{{ network['organizations'] }}"
loop_control:
loop_var: org
when:
- org.type == 'cenm'

# Setup CENM
- name: "Setup cenm"
Expand All @@ -76,6 +79,11 @@
external_url_suffix: "{{ org.external_url_suffix }}"
charts_dir: "{{ org.gitops.chart_source }}"
values_dir: "{{ playbook_dir }}/../../../{{ org.gitops.release_dir }}/{{ org_name }}/build"
loop: "{{ network['organizations'] }}"
loop_control:
loop_var: org
when:
- org.type == 'cenm'

# Deploy notaries
- name: Deploy notary service
Expand All @@ -97,8 +105,9 @@
loop_control:
loop_var: org
when:
- org.type == 'cenm'
- org.services.notaries is defined

# Setup NETWORK_MAP
- name: "Setup network_map"
include_role:
Expand All @@ -116,7 +125,34 @@
external_url_suffix: "{{ org.external_url_suffix }}"
charts_dir: "{{ org.gitops.chart_source }}"
values_dir: "{{ playbook_dir }}/../../../{{ org.gitops.release_dir }}/{{ org_name }}"

loop: "{{ network['organizations'] }}"
loop_control:
loop_var: org
when:
- org.type == 'cenm'

# Deploy all other nodes
- name: Deploy Corda nodes
include_role:
name: setup/node
vars:
org_name: "{{ org.name | lower }}"
component_name: "{{ org_name }}-node"
component_ns: "{{ org_name }}-ent"
cloud_provider: "{{ org.cloud_provider }}"
external_url_suffix: "{{ org.external_url_suffix }}"
node: "{{ org.services.peers }}"
kubernetes: "{{ org.k8s }}"
vault: "{{ org.vault }}"
gitops: "{{ org.gitops }}"
charts_dir: "{{ org.gitops.chart_source }}"
values_dir: "{{ playbook_dir }}/../../../{{ org.gitops.release_dir }}/{{ component_ns }}"
loop: "{{ network['organizations'] }}"
loop_control:
loop_var: org
when:
- org.type == 'node'
- org.org_status is not defined or org.org_status == 'new'

# These variables can be overriden from the command line
vars:
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit f899b83

Please sign in to comment.