Skip to content

Commit

Permalink
Merge pull request #41 from FIWARE-Ops/initTIR
Browse files Browse the repository at this point in the history
Fill TIR broker with initial set of dids
  • Loading branch information
pulledtim authored Feb 26, 2024
2 parents 6787a5d + b7d5cf4 commit 75f2afa
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ appVersion: "0.0.1"

dependencies:
- name: trusted-issuers-registry
alias: trustedIssuersRegistry
version: 0.0.3
repository: https://fiware.github.io/helm-charts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{{- $values := .Values -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: dsba-onboarding-tir-participants
data:
import.sh: |-
broker = {{ .Values.trustedIssuersRegistry.tir.ngsiBroker.url}}
{{- range .Values.initialData }}
curl -iX POST '{{ $values.trustedIssuersRegistry.tir.ngsiBroker.url}}ngsi-ld/v1/entities' \
-H 'Content-Type: application/json' \
-d '{
"id": "urn:ngsi-ld:TrustedIssuer:{{ . }}",
"type": "TrustedIssuer",
"issuer": {
"type": "Property",
"value": "{{ . }}"
},
"selfDescription": {
"type": "Property",
"value": {
"id": "{{ . }}",
"type": "gx:LegalParticipant",
"gx:legalName": "SomeName",
"gx:legalRegistrationNumber": {
"gx:vatID": "MYVATID"
},
"gx:headquarterAddress": {
"gx:countrySubdivisionCode": "DE-BER"
},
"gx:legalAddress": {
"gx:countrySubdivisionCode": "DE-BER"
},
"gx-terms-and-conditions:gaiaxTermsAndConditions": "70c1d713215f95191a11d38fe2341faed27d19e083917bc8732ca4fea4976700"
}
}
}'
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: batch/v1
kind: Job
metadata:
name: dsba-onboarding-tir-participants
spec:
template:
spec:
containers:
- name: init
image: quay.io/opencloudio/curl:4.2.0-build.8
command:
- /bin/sh
- /opt/tir/script/import.sh
volumeMounts:
- name: import-config
mountPath: /opt/tir/script
restartPolicy: OnFailure
volumes:
- name: import-config
configMap:
name: dsba-onboarding-tir-participants
backoffLimit: 10
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
trusted-issuers-registry:
initialParticipants:
- did:web:packetdelivery.dsba.fiware.dev:did
- did:web:onboarding.dsba.fiware.dev:did
- did:web:happypets.dsba.fiware.dev:did
trustedIssuersRegistry:
replicaCount: 1
deployment:
image:
Expand All @@ -16,7 +20,6 @@ trusted-issuers-registry:
issuer:
kind: ClusterIssuer
name: letsencrypt-aws-prod

tir:
ngsiBroker:
url: http://dsba-onboarding-portal-orion-ld:1026/
Expand Down

0 comments on commit 75f2afa

Please sign in to comment.