forked from eclipse-tractusx/tutorial-resources
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
03c938a
commit 508d9df
Showing
10 changed files
with
243 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# First connector | ||
module "alice-connector" { | ||
depends_on = [module.azurite] | ||
source = "./modules/connector" | ||
humanReadableName = var.alice-humanReadableName | ||
participantId = var.alice-bpn | ||
database-host = local.alice-postgres.database-host | ||
database-name = local.databases.alice.database-name | ||
database-credentials = { | ||
user = local.databases.alice.database-username | ||
password = local.databases.alice.database-password | ||
} | ||
dcp-config = { | ||
id = var.alice-did | ||
sts_token_url = "http://${var.alice-identityhub-host}:7084/api/credentials/token" | ||
sts_client_id = var.alice-did | ||
sts_clientsecret_alias = "participant-alice-sts-client-secret" | ||
} | ||
dataplane = { | ||
privatekey-alias = "${var.alice-did}#signing-key-1" | ||
publickey-alias = "${var.alice-did}#signing-key-1" | ||
} | ||
|
||
azure-account-name = var.alice-azure-account-name | ||
azure-account-key = local.alice-azure-key-base64 | ||
azure-account-key-sas = var.alice-azure-key-sas | ||
azure-url = module.azurite.azurite-url | ||
|
||
ingress-host = var.alice-ingress-host | ||
|
||
minio-config = { | ||
username = module.alice-minio.minio-username | ||
password = module.alice-minio.minio-password | ||
url = module.alice-minio.minio-url | ||
} | ||
} | ||
|
||
module "alice-identityhub" { | ||
depends_on = [module.alice-connector] | ||
|
||
source = "./modules/identity-hub" | ||
database = { | ||
user = local.databases.alice.database-username | ||
password = local.databases.alice.database-password | ||
url = "jdbc:postgresql://${local.alice-postgres.database-host}/${local.databases.alice.database-name}" | ||
} | ||
humanReadableName = var.alice-identityhub-host | ||
namespace = kubernetes_namespace.mxd-ns.metadata.0.name | ||
participantId = var.alice-did | ||
vault-url = "http://alice-vault:8200" | ||
url-path = var.alice-identityhub-host | ||
} | ||
|
||
# alice's catalog server | ||
module "alice-catalog-server" { | ||
depends_on = [module.alice-connector] | ||
|
||
source = "./modules/catalog-server" | ||
humanReadableName = "alice-catalogserver" | ||
serviceName = var.alice-catalogserver-host | ||
namespace = kubernetes_namespace.mxd-ns.metadata.0.name | ||
participantId = var.alice-bpn | ||
vault-url = "http://alice-vault:8200" | ||
bdrs-url = "http://bdrs-server:8082/api/directory" | ||
database = { | ||
user = local.databases.alice-catalogserver.database-username | ||
password = local.databases.alice-catalogserver.database-password | ||
url = "jdbc:postgresql://${local.catalogserver-postgres.database-host}/${local.databases.alice-catalogserver.database-name}" | ||
} | ||
dcp-config = { | ||
id = var.alice-did | ||
sts_token_url = "http://${var.alice-identityhub-host}:7084/api/credentials/token" | ||
sts_client_id = var.alice-did | ||
sts_clientsecret_alias = "participant-alice-sts-client-secret" | ||
} | ||
} | ||
|
||
module "alice-minio" { | ||
source = "./modules/minio" | ||
humanReadableName = lower(var.alice-humanReadableName) | ||
minio-username = "aliceawsclient" | ||
minio-password = "aliceawssecret" | ||
} | ||
|
||
locals { | ||
alice-azure-key-base64 = base64encode(var.alice-azure-account-key) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
variable "alice-bpn" { | ||
default = "BPNL000000000001" | ||
} | ||
|
||
variable "alice-humanReadableName" { | ||
default = "alice" | ||
} | ||
|
||
variable "alice-identityhub-host" { | ||
description = "Kubernetes service name of the IdentityHub" | ||
default = "alice-ih" | ||
} | ||
|
||
variable "alice-catalogserver-host" { | ||
description = "Kubernetes service name (=Host) for Alice's Catalog Server" | ||
default = "alice-cs" | ||
} | ||
|
||
variable "alice-did" { | ||
default = "did:web:alice-ih%3A7083:alice" | ||
} | ||
|
||
variable "alice-azure-account-name" { | ||
default = "aliceazureaccount" | ||
} | ||
|
||
variable "alice-azure-account-key" { | ||
default = "aliceazurekey" | ||
} | ||
|
||
variable "alice-azure-key-sas" { | ||
default = "sv=2023-01-03&ss=btqf&srt=sco&st=2023-11-23T13%3A17%3A09Z&se=2030-01-01T00%3A00%3A00Z&sp=rwdxftlacup&sig=uvPcqmLj7%2FMuadAKXMCA7SvWCnClQ9EA1b15OB0m1bc%3D" | ||
} | ||
|
||
variable "alice-ingress-host" { | ||
default = "localhost" | ||
} | ||
|
||
variable "alice-namespace" { | ||
type = string | ||
description = "Kubernetes namespace to use" | ||
default = "mxd" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Second connector | ||
module "bob-connector" { | ||
depends_on = [module.azurite] | ||
source = "./modules/connector" | ||
humanReadableName = var.bob-humanReadableName | ||
namespace = kubernetes_namespace.mxd-ns.metadata.0.name | ||
participantId = var.bob-bpn | ||
database-host = local.bob-postgres.database-host | ||
database-name = local.databases.bob.database-name | ||
database-credentials = { | ||
user = local.databases.bob.database-username | ||
password = local.databases.bob.database-password | ||
} | ||
dcp-config = { | ||
id = var.bob-did | ||
sts_token_url = "http://${var.bob-identityhub-host}:7084/api/credentials/token" | ||
sts_client_id = var.bob-did | ||
sts_clientsecret_alias = "participant-bob-sts-client-secret" | ||
} | ||
dataplane = { | ||
privatekey-alias = "${var.bob-did}#signing-key-1" | ||
publickey-alias = "${var.bob-did}#signing-key-1" | ||
} | ||
|
||
azure-account-name = var.bob-azure-account-name | ||
azure-account-key = local.bob-azure-key-base64 | ||
azure-account-key-sas = var.bob-azure-key-sas | ||
azure-url = module.azurite.azurite-url | ||
ingress-host = var.bob-ingress-host | ||
minio-config = { | ||
username = module.bob-minio.minio-username | ||
password = module.bob-minio.minio-password | ||
url = module.bob-minio.minio-url | ||
} | ||
} | ||
|
||
module "bob-identityhub" { | ||
depends_on = [module.bob-connector] | ||
source = "./modules/identity-hub" | ||
database = { | ||
user = local.databases.bob.database-username | ||
password = local.databases.bob.database-password | ||
url = "jdbc:postgresql://${local.bob-postgres.database-host}/${local.databases.bob.database-name}" | ||
} | ||
humanReadableName = var.bob-identityhub-host | ||
namespace = kubernetes_namespace.mxd-ns.metadata.0.name | ||
participantId = var.bob-did | ||
vault-url = "http://bob-vault:8200" | ||
url-path = var.bob-identityhub-host | ||
} | ||
|
||
module "bob-minio" { | ||
source = "./modules/minio" | ||
humanReadableName = lower(var.bob-humanReadableName) | ||
minio-username = "bobawsclient" | ||
minio-password = "bobawssecret" | ||
} | ||
|
||
locals { | ||
bob-azure-key-base64 = base64encode(var.bob-azure-account-key) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
variable "bob-bpn" { | ||
default = "BPNL000000000002" | ||
} | ||
|
||
variable "bob-did" { | ||
default = "did:web:bob-ih%3A7083:bob" | ||
} | ||
|
||
|
||
variable "bob-azure-account-name" { | ||
default = "bobazureaccount" | ||
} | ||
|
||
variable "bob-azure-account-key" { | ||
default = "bobazurekey" | ||
} | ||
|
||
variable "bob-azure-key-sas" { | ||
default = "sv=2023-01-03&ss=btqf&srt=sco&st=2023-11-23T13%3A18%3A49Z&se=2030-01-01T00%3A00%3A00Z&sp=rwdftlacup&sig=Xki%2B2nHBT2V8oe%2BMmS%2BI%2FHzcAsTFCYWDv6t6zT%2FWXFM%3D" | ||
} | ||
|
||
variable "bob-ingress-host" { | ||
default = "localhost" | ||
} | ||
|
||
variable "bob-humanReadableName" { | ||
default = "bob" | ||
} | ||
|
||
variable "bob-identityhub-host" { | ||
description = "Kubernetes service name of the IdentityHub" | ||
default = "bob-ih" | ||
} | ||
|
||
variable "bob-catalogserver-host" { | ||
description = "Kubernetes service name (=Host) for Bob's Catalog Server" | ||
default = "bob-cs" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.