-
Notifications
You must be signed in to change notification settings - Fork 5
/
topology-sf-ny.yaml
150 lines (143 loc) · 5.52 KB
/
topology-sf-ny.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# Global variables may be used throughout this file
variables:
runtime_mode: "prod"
# Here we begin the list of elements in the topology
elements:
# An element may configure environment variables for a "applyToKeyEqualing" which is another element
- type: "EnvironmentConfigurer"
environment:
POSTGRES_USER: "sf_user"
POSTGRES_PASSWORD: "sf_password"
POSTGRES_DB: "xcurrent_sf"
applyToKeyEqualing: "sf-db"
- type: "EnvironmentConfigurer"
environment:
POSTGRES_USER: "ny_user"
POSTGRES_PASSWORD: "ny_password"
POSTGRES_DB: "xcurrent_ny"
applyToKeyEqualing: "ny-db"
# An element may start a Nomad job
- type: "NomadJob"
# A Nomad job element may have any number of sub-elements
elements:
# First we have a postgres database for "sf"
- type: "NomadTask"
key: "sf-db"
port: 5432
image: "artifactory.ops.ripple.com:6555/ripplenet/databases/postgres-9.4"
# We also have a postgres database for "ny"
- type: "NomadTask"
key: "ny-db"
port: 5432
image: "artifactory.ops.ripple.com:6555/ripplenet/databases/postgres-9.4"
clusterManager: "http://10.10.10.10:4646/"
groupId: "test-application-db-${database_id}"
vaultToken: "vault-token"
region: "global"
datacenter: "dc1"
# An element may configure Java properties for another element
- type: "PropertiesConfigurer"
variables:
pg_endpoint: "${sf-db.hostAndPort}"
pg_dialect: "postgres"
pg_driver: "postgresql"
pg_jdbcUrl: "jdbc:${pg_driver}://${pg_endpoint}/xcurrent_sf"
properties:
configurationservice.db.${pg_dialect}.url: "${pg_jdbcUrl}"
ledgerservice.db.${pg_dialect}.url: "${pg_jdbcUrl}"
paymentorchestrationservice.db.${pg_dialect}.url: "${pg_jdbcUrl}"
peerservice.db.${pg_dialect}.url: "${pg_jdbcUrl}"
quoteservice.db.${pg_dialect}.url: "${pg_jdbcUrl}"
ripplenetpublickeyservice.db.${pg_dialect}.url: "${pg_jdbcUrl}"
validator.db.${pg_dialect}.url: "${pg_jdbcUrl}"
xcurrent.db.${pg_dialect}.url: "${pg_jdbcUrl}"
xcurrentLiquidity.db.${pg_dialect}.url: "${pg_jdbcUrl}"
RUNTIME_MODE: "${runtime_mode}"
applyToKeyEqualing: "sf"
- type: "EnvironmentConfigurer"
environment:
# No need for an explicit value for JAVA_OPTS
# JAVA_OPTS will automatically be populated based on the values in the PropertiesConfigurer
# Had we wanted additional properties, we could have specified it as
# JAVA_OPTS: "-Xms32m -Xmx128m"
JAVA_OPTS: ""
applyToKeyEqualing: "sf"
- type: "PropertiesConfigurer"
variables:
pg_endpoint: "${ny-db.hostAndPort}"
pg_dialect: "postgres"
pg_driver: "postgresql"
pg_jdbcUrl: "jdbc:${pg_driver}://${pg_endpoint}/xcurrent_ny"
properties:
configurationservice.db.${pg_dialect}.url: "${pg_jdbcUrl}"
ledgerservice.db.${pg_dialect}.url: "${pg_jdbcUrl}"
paymentorchestrationservice.db.${pg_dialect}.url: "${pg_jdbcUrl}"
peerservice.db.${pg_dialect}.url: "${pg_jdbcUrl}"
quoteservice.db.${pg_dialect}.url: "${pg_jdbcUrl}"
ripplenetpublickeyservice.db.${pg_dialect}.url: "${pg_jdbcUrl}"
validator.db.${pg_dialect}.url: "${pg_jdbcUrl}"
xcurrent.db.${pg_dialect}.url: "${pg_jdbcUrl}"
xcurrentLiquidity.db.${pg_dialect}.url: "${pg_jdbcUrl}"
RUNTIME_MODE: "${runtime_mode}"
applyToKeyEqualing: "ny"
- type: "EnvironmentConfigurer"
environment:
JAVA_OPTS: ""
applyToKeyEqualing: "ny"
- type: "NomadJob"
elements:
- type: "NomadTask"
key: "sf"
artifacts:
- source: "https://artifactory.ops.ripple.com/artifactory/ripplenet-topology/logback.xml"
destination: "etc/logback.xml"
mode: "file"
- source: "https://artifactory.ops.ripple.com/artifactory/ripplenet-topology/sf-rn-keystore.pkcs12"
destination: "etc/rn-keystore.pkcs12"
mode: "file"
- source: "https://artifactory.ops.ripple.com/artifactory/ripplenet-topology/sf-usage-keystore.p12"
destination: "etc/usage-keystore.p12"
mode: "file"
- source: "https://artifactory.ops.ripple.com/artifactory/ripplenet-topology/sf-xcurrent.properties"
destination: "etc/xcurrent.properties"
mode: "file"
volumes:
- "etc:/application/etc"
tags:
- "standalone.enable=true"
- "standalone.frontend.entryPoints=http,https"
- "standalone.frontend.rule=Host:sf.usw2.testdev.ripple.com"
image: "artifactory.ops.ripple.com:6555/ripplenet/applications/xcurrent:0.25-SNAPSHOT"
port: 9000
httpCheck: "/"
maxRam: 1024
- type: "NomadTask"
key: "ny"
artifacts:
- source: "https://artifactory.ops.ripple.com/artifactory/ripplenet-topology/logback.xml"
destination: "etc/logback.xml"
mode: "file"
- source: "https://artifactory.ops.ripple.com/artifactory/ripplenet-topology/sf-rn-keystore.pkcs12"
destination: "etc/rn-keystore.pkcs12"
mode: "file"
- source: "https://artifactory.ops.ripple.com/artifactory/ripplenet-topology/sf-usage-keystore.p12"
destination: "etc/usage-keystore.p12"
mode: "file"
- source: "https://artifactory.ops.ripple.com/artifactory/ripplenet-topology/ny-xcurrent.properties"
destination: "etc/xcurrent.properties"
mode: "file"
volumes:
- "etc:/application/etc"
tags:
- "standalone.enable=true"
- "standalone.frontend.entryPoints=http,https"
- "standalone.frontend.rule=Host:ny.usw2.testdev.ripple.com"
image: "artifactory.ops.ripple.com:6555/ripplenet/applications/xcurrent:0.25-SNAPSHOT"
port: 9000
httpCheck: "/"
maxRam: 1024
clusterManager: "http://10.10.10.10:4646/"
groupId: "test-application-${application_id}"
vaultToken: "vault-token"
region: "global"
datacenter: "dc1"