pyegeria 5.4.8.6__py3-none-any.whl → 5.4.8.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- examples/Coco_config/README.md +19 -0
- examples/Coco_config/__init__.py +4 -0
- examples/Coco_config/config_cocoMDS1.py +108 -0
- examples/Coco_config/config_cocoMDS2.py +126 -0
- examples/Coco_config/config_cocoMDS3.py +109 -0
- examples/Coco_config/config_cocoMDS4.py +91 -0
- examples/Coco_config/config_cocoMDS5.py +116 -0
- examples/Coco_config/config_cocoMDS6.py +114 -0
- examples/Coco_config/config_cocoMDSx.py +119 -0
- examples/Coco_config/config_cocoView1.py +155 -0
- examples/Coco_config/config_coco_core.py +255 -0
- examples/Coco_config/config_coco_datalake.py +450 -0
- examples/Coco_config/config_exchangeDL01.py +106 -0
- examples/Coco_config/config_governDL01.py +80 -0
- examples/Coco_config/config_monitorDev01.py +60 -0
- examples/Coco_config/config_monitorGov01.py +194 -0
- examples/Coco_config/globals.py +154 -0
- examples/GeoSpatial Products Example.py +535 -0
- examples/Jupyter Notebooks/P-egeria-server-config.ipynb +2137 -0
- examples/Jupyter Notebooks/README.md +2 -0
- examples/Jupyter Notebooks/common/P-environment-check.ipynb +115 -0
- examples/Jupyter Notebooks/common/__init__.py +14 -0
- examples/Jupyter Notebooks/common/common-functions.ipynb +4694 -0
- examples/Jupyter Notebooks/common/environment-check.ipynb +53 -0
- examples/Jupyter Notebooks/common/globals.ipynb +184 -0
- examples/Jupyter Notebooks/common/globals.py +154 -0
- examples/Jupyter Notebooks/common/orig_globals.py +152 -0
- examples/format_sets/all_format_sets.json +910 -0
- examples/format_sets/custom_format_sets.json +268 -0
- examples/format_sets/subset_format_sets.json +187 -0
- examples/format_sets_save_load_example.py +294 -0
- examples/output_formats_example.py +193 -0
- md_processing/__init__.py +6 -0
- md_processing/data/commands.json +30640 -59579
- md_processing/dr_egeria.py +18 -0
- md_processing/md_commands/feedback_commands.py +763 -0
- md_processing/md_commands/project_commands.py +1 -1
- md_processing/md_processing_utils/md_processing_constants.py +134 -4
- pyegeria/__init__.py +1 -1
- pyegeria/_client_new.py +109 -12
- pyegeria/_globals.py +3 -2
- pyegeria/base_report_formats.py +17 -0
- pyegeria/format_set_executor.py +5 -2
- {pyegeria-5.4.8.6.dist-info → pyegeria-5.4.8.8.dist-info}/METADATA +1 -1
- {pyegeria-5.4.8.6.dist-info → pyegeria-5.4.8.8.dist-info}/RECORD +49 -16
- {pyegeria-5.4.8.6.dist-info → pyegeria-5.4.8.8.dist-info}/top_level.txt +1 -0
- {pyegeria-5.4.8.6.dist-info → pyegeria-5.4.8.8.dist-info}/WHEEL +0 -0
- {pyegeria-5.4.8.6.dist-info → pyegeria-5.4.8.8.dist-info}/entry_points.txt +0 -0
- {pyegeria-5.4.8.6.dist-info → pyegeria-5.4.8.8.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Copyright Contributors to the ODPi Egeria project.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Egeria Coco Pharmaceutical demonstration labs.
|
|
9
|
+
|
|
10
|
+
This script creates and configures the Data Lake
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import argparse
|
|
17
|
+
import json
|
|
18
|
+
|
|
19
|
+
import httpx
|
|
20
|
+
from globals import (
|
|
21
|
+
adminUserId,
|
|
22
|
+
cocoCohort,
|
|
23
|
+
cocoMDS1Name,
|
|
24
|
+
cocoMDS2Name,
|
|
25
|
+
cocoMDS4Name,
|
|
26
|
+
corePlatformURL,
|
|
27
|
+
dataLakePlatformURL,
|
|
28
|
+
devCohort,
|
|
29
|
+
fileSystemRoot,
|
|
30
|
+
iotCohort,
|
|
31
|
+
max_paging_size,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
from pyegeria import (
|
|
35
|
+
CoreServerConfig,
|
|
36
|
+
FullServerConfig,
|
|
37
|
+
Platform,
|
|
38
|
+
print_exception_response,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def config_coco_datalake(url: str, userid: str):
|
|
43
|
+
print("Configuring and starting the Data Lake")
|
|
44
|
+
disable_ssl_warnings = True
|
|
45
|
+
platform_url = url
|
|
46
|
+
admin_user = userid
|
|
47
|
+
|
|
48
|
+
# Change the kafka configuration to reflect the distinguished kafka setting for the labs
|
|
49
|
+
# event_bus_config = {
|
|
50
|
+
# "producer": {
|
|
51
|
+
# "bootstrap.servers": "{{kafkaEndpoint}}"
|
|
52
|
+
# },
|
|
53
|
+
# "consumer": {
|
|
54
|
+
# "bootstrap.servers": "{{kafkaEndpoint}}"
|
|
55
|
+
# }
|
|
56
|
+
# }
|
|
57
|
+
event_bus_config = {
|
|
58
|
+
"producer": {"bootstrap.servers": "host.docker.internal:9192"},
|
|
59
|
+
"consumer": {"bootstrap.servers": "host.docker.internal:9192"},
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
security_connection_body = {
|
|
63
|
+
"class": "Connection",
|
|
64
|
+
"connectorType": {
|
|
65
|
+
"class": "ConnectorType",
|
|
66
|
+
"connectorProviderClassName": "org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaServerSecurityProvider",
|
|
67
|
+
},
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#
|
|
71
|
+
# Configure MDS1
|
|
72
|
+
#
|
|
73
|
+
|
|
74
|
+
mdr_server = cocoMDS1Name
|
|
75
|
+
mdr_server_user_id = "cocoMDS1npa"
|
|
76
|
+
mdr_server_password = "cocoMDS1passw0rd"
|
|
77
|
+
metadataCollectionId = f"{mdr_server}-e915f2fa-aa3g-4396-8bde-bcd65e642b1d"
|
|
78
|
+
metadataCollectionName = "Data Lake Operations"
|
|
79
|
+
|
|
80
|
+
print("Configuring " + mdr_server + "...")
|
|
81
|
+
try:
|
|
82
|
+
o_client = CoreServerConfig(mdr_server, platform_url, admin_user)
|
|
83
|
+
|
|
84
|
+
o_client.set_basic_server_properties(
|
|
85
|
+
metadataCollectionName,
|
|
86
|
+
"Coco Pharmaceuticals",
|
|
87
|
+
platform_url,
|
|
88
|
+
mdr_server_user_id,
|
|
89
|
+
mdr_server_password,
|
|
90
|
+
max_paging_size,
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
o_client.set_event_bus(event_bus_config)
|
|
94
|
+
o_client.set_server_security_connection(security_connection_body)
|
|
95
|
+
o_client.add_default_log_destinations()
|
|
96
|
+
|
|
97
|
+
# o_client.set_in_mem_local_repository()
|
|
98
|
+
o_client.set_xtdb_local_kv_repository()
|
|
99
|
+
|
|
100
|
+
o_client.set_local_metadata_collection_id(metadataCollectionId)
|
|
101
|
+
o_client.set_local_metadata_collection_name(metadataCollectionName)
|
|
102
|
+
|
|
103
|
+
o_client.add_cohort_registration(cocoCohort)
|
|
104
|
+
access_service_options = {
|
|
105
|
+
"SupportedZones": [
|
|
106
|
+
"quarantine",
|
|
107
|
+
"clinical-trials",
|
|
108
|
+
"research",
|
|
109
|
+
"data-lake",
|
|
110
|
+
"trash-can",
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
# o_client.configure_access_service("asset-catalog", {})
|
|
115
|
+
o_client.configure_access_service("asset-consumer", {})
|
|
116
|
+
|
|
117
|
+
access_service_options["DefaultZones"] = ["quarantine"]
|
|
118
|
+
access_service_options["PublishZones"] = ["data-lake"]
|
|
119
|
+
|
|
120
|
+
# print(f"Access Service Options: {access_service_options}")
|
|
121
|
+
|
|
122
|
+
o_client.configure_access_service("asset-manager", access_service_options)
|
|
123
|
+
o_client.configure_access_service("asset-owner", access_service_options)
|
|
124
|
+
o_client.configure_access_service(
|
|
125
|
+
"community-profile", {"KarmaPointPlateau": "500"}
|
|
126
|
+
)
|
|
127
|
+
# o_client.configure_access_service("glossary-view", {})
|
|
128
|
+
# o_client.configure_access_service("data-engine", access_service_options)
|
|
129
|
+
o_client.configure_access_service("data-manager", access_service_options)
|
|
130
|
+
o_client.configure_access_service(
|
|
131
|
+
"digital-architecture", access_service_options
|
|
132
|
+
)
|
|
133
|
+
o_client.configure_access_service("governance-engine", access_service_options)
|
|
134
|
+
o_client.configure_access_service("governance-server", access_service_options)
|
|
135
|
+
o_client.configure_access_service("asset-lineage", access_service_options)
|
|
136
|
+
|
|
137
|
+
print(f"Activating {mdr_server}")
|
|
138
|
+
p_client = Platform(mdr_server, platform_url, admin_user)
|
|
139
|
+
p_client.activate_server_stored_config()
|
|
140
|
+
print(mdr_server + " activated")
|
|
141
|
+
|
|
142
|
+
except Exception as e:
|
|
143
|
+
print_exception_response(e)
|
|
144
|
+
|
|
145
|
+
#
|
|
146
|
+
# Configure MDS4
|
|
147
|
+
#
|
|
148
|
+
mdr_server = cocoMDS4Name
|
|
149
|
+
mdr_server_user_id = "cocoMDS4npa"
|
|
150
|
+
mdr_server_password = "cocoMDS4passw0rd"
|
|
151
|
+
metadataCollectionId = f"{mdr_server}-e915f2fa-aa3g-4396-8bde-bcd65e642b1d"
|
|
152
|
+
metadataCollectionName = "Data Lake Users"
|
|
153
|
+
print("Configuring " + mdr_server + "...")
|
|
154
|
+
|
|
155
|
+
try:
|
|
156
|
+
o_client = CoreServerConfig(mdr_server, platform_url, admin_user)
|
|
157
|
+
|
|
158
|
+
o_client.set_basic_server_properties(
|
|
159
|
+
"Data Lake Users",
|
|
160
|
+
"Coco Pharmaceuticals",
|
|
161
|
+
platform_url,
|
|
162
|
+
mdr_server_user_id,
|
|
163
|
+
mdr_server_password,
|
|
164
|
+
max_paging_size,
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
o_client.set_event_bus(event_bus_config)
|
|
168
|
+
o_client.set_server_security_connection(security_connection_body)
|
|
169
|
+
o_client.add_default_log_destinations()
|
|
170
|
+
|
|
171
|
+
# Note: no metadata repository or collection configuration in this server.
|
|
172
|
+
|
|
173
|
+
o_client.add_cohort_registration(cocoCohort)
|
|
174
|
+
|
|
175
|
+
accessServiceOptions = {"SupportedZones": ["data-lake"]}
|
|
176
|
+
|
|
177
|
+
# o_client.configure_access_service("asset-catalog", accessServiceOptions)
|
|
178
|
+
o_client.configure_access_service("asset-consumer", accessServiceOptions)
|
|
179
|
+
o_client.configure_access_service("asset-owner", {})
|
|
180
|
+
o_client.configure_access_service(
|
|
181
|
+
"community-profile", {"KarmaPointPlateau": "500"}
|
|
182
|
+
)
|
|
183
|
+
# o_client.configure_access_service("glossary-view", {})
|
|
184
|
+
o_client.configure_access_service("data-science", accessServiceOptions)
|
|
185
|
+
|
|
186
|
+
print(f"Activating {mdr_server}")
|
|
187
|
+
p_client = Platform(mdr_server, platform_url, admin_user)
|
|
188
|
+
p_client.activate_server_stored_config()
|
|
189
|
+
|
|
190
|
+
print(f"{mdr_server} activated")
|
|
191
|
+
|
|
192
|
+
except Exception as e:
|
|
193
|
+
print_exception_response(e)
|
|
194
|
+
|
|
195
|
+
#
|
|
196
|
+
# Configure exchangeDL01
|
|
197
|
+
#
|
|
198
|
+
|
|
199
|
+
daemon_server_name = "exchangeDL01"
|
|
200
|
+
daemon_server_platform = platform_url
|
|
201
|
+
daemon_server_user_id = "exchangeDL01npa"
|
|
202
|
+
daemon_server_password = "exchangeDL01passw0rd"
|
|
203
|
+
|
|
204
|
+
mdr_server = "cocoMDS1"
|
|
205
|
+
folder_connector_name = "DropFootClinicalTrialResultsFolderMonitor"
|
|
206
|
+
folder_connector_user_id = "monitorDL01npa"
|
|
207
|
+
folder_connector_source_name = "DropFootClinicalTrialResults"
|
|
208
|
+
folder_connector_folder = (
|
|
209
|
+
fileSystemRoot
|
|
210
|
+
+ "/data-lake/research/clinical-trials/drop-foot/weekly-measurements"
|
|
211
|
+
)
|
|
212
|
+
folder_connector_connection = {
|
|
213
|
+
"class": "Connection",
|
|
214
|
+
"connectorType": {
|
|
215
|
+
"class": "ConnectorType",
|
|
216
|
+
"connectorProviderClassName": "org.odpi.openmetadata.adapters.connectors.integration.basicfiles.DataFolderMonitorIntegrationProvider",
|
|
217
|
+
},
|
|
218
|
+
"endpoint": {"class": "Endpoint", "address": folder_connector_folder},
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
integration_group_name = "Onboarding"
|
|
222
|
+
|
|
223
|
+
print("Configuring " + daemon_server_name)
|
|
224
|
+
|
|
225
|
+
try:
|
|
226
|
+
f_client = FullServerConfig(
|
|
227
|
+
daemon_server_name, daemon_server_platform, admin_user
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
f_client.set_basic_server_properties(
|
|
231
|
+
"Supports exchange of metadata with third party technologies",
|
|
232
|
+
"Coco Pharmaceuticals",
|
|
233
|
+
daemon_server_platform,
|
|
234
|
+
daemon_server_user_id,
|
|
235
|
+
daemon_server_password,
|
|
236
|
+
max_paging_size,
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
f_client.set_server_security_connection(security_connection_body)
|
|
240
|
+
f_client.add_default_log_destinations()
|
|
241
|
+
|
|
242
|
+
connector_configs = [
|
|
243
|
+
{
|
|
244
|
+
"class": "IntegrationConnectorConfig",
|
|
245
|
+
"connectorName": folder_connector_name,
|
|
246
|
+
"connectorUserId": folder_connector_user_id,
|
|
247
|
+
"connection": folder_connector_connection,
|
|
248
|
+
"metadataSourceQualifiedName": folder_connector_source_name,
|
|
249
|
+
"refreshTimeInterval": 10,
|
|
250
|
+
"usesBlockingCalls": "false",
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
|
|
254
|
+
f_client.config_integration_service(
|
|
255
|
+
mdr_server, platform_url, "files-integrator", {}, connector_configs
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
f_client.config_integration_group(
|
|
259
|
+
mdr_server, daemon_server_platform, integration_group_name
|
|
260
|
+
)
|
|
261
|
+
print(f"Activating {daemon_server_name}")
|
|
262
|
+
p_client = Platform(daemon_server_name, daemon_server_platform, adminUserId)
|
|
263
|
+
p_client.activate_server_stored_config()
|
|
264
|
+
|
|
265
|
+
print(f"{daemon_server_name} activated")
|
|
266
|
+
|
|
267
|
+
except Exception as e:
|
|
268
|
+
print_exception_response(e)
|
|
269
|
+
|
|
270
|
+
#
|
|
271
|
+
# Configure governDL01
|
|
272
|
+
#
|
|
273
|
+
engine_server = "governDL01"
|
|
274
|
+
engine_server_platform = platform_url
|
|
275
|
+
|
|
276
|
+
engine_server_user_id = "governDL01npa"
|
|
277
|
+
engine_server_password = "governDL01passw0rd"
|
|
278
|
+
mdr_server = "cocoMDS1"
|
|
279
|
+
mdr_engine_server_platform = dataLakePlatformURL
|
|
280
|
+
|
|
281
|
+
print("Configuring " + engine_server)
|
|
282
|
+
|
|
283
|
+
try:
|
|
284
|
+
o_client = CoreServerConfig(engine_server, engine_server_platform, admin_user)
|
|
285
|
+
|
|
286
|
+
o_client.set_basic_server_properties(
|
|
287
|
+
"An Engine Host to run governance actions for Coco Pharmaceuticals",
|
|
288
|
+
"Coco Pharmaceuticals",
|
|
289
|
+
engine_server_platform,
|
|
290
|
+
engine_server_user_id,
|
|
291
|
+
engine_server_password,
|
|
292
|
+
max_paging_size,
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
o_client.set_server_security_connection(security_connection_body)
|
|
296
|
+
|
|
297
|
+
o_client.set_engine_definitions_client_config(
|
|
298
|
+
mdr_server, mdr_engine_server_platform
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
engine_list_body = [
|
|
302
|
+
{
|
|
303
|
+
"class": "EngineConfig",
|
|
304
|
+
"engineQualifiedName": "AssetDiscovery",
|
|
305
|
+
"engineUserId": "findItDL01npa",
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"class": "EngineConfig",
|
|
309
|
+
"engineQualifiedName": "AssetQuality",
|
|
310
|
+
"engineUserId": "findItDL01npa",
|
|
311
|
+
},
|
|
312
|
+
]
|
|
313
|
+
|
|
314
|
+
o_client.set_engine_list(engine_list_body)
|
|
315
|
+
|
|
316
|
+
# config = o_client.get_stored_configuration()
|
|
317
|
+
# print(f"The server stored configuration is {json.dumps(config, indent=4)}")
|
|
318
|
+
print(f"Activating {engine_server}")
|
|
319
|
+
p_client = Platform(engine_server, engine_server_platform, admin_user)
|
|
320
|
+
p_client.activate_server_stored_config()
|
|
321
|
+
print(f"{engine_server} activated")
|
|
322
|
+
except Exception as e:
|
|
323
|
+
print_exception_response(e)
|
|
324
|
+
|
|
325
|
+
#
|
|
326
|
+
# Configure cocoView1
|
|
327
|
+
#
|
|
328
|
+
|
|
329
|
+
view_server = "cocoView1"
|
|
330
|
+
view_server_user_id = "cocoView1npa"
|
|
331
|
+
view_server_password = "cocoView1passw0rd"
|
|
332
|
+
view_server_type = "View Server"
|
|
333
|
+
remote_platform_url = corePlatformURL
|
|
334
|
+
remote_server_name = cocoMDS1Name
|
|
335
|
+
|
|
336
|
+
print("Configuring " + view_server)
|
|
337
|
+
try:
|
|
338
|
+
f_client = FullServerConfig(view_server, platform_url, admin_user)
|
|
339
|
+
|
|
340
|
+
f_client.set_server_user_id(view_server_user_id)
|
|
341
|
+
f_client.set_server_user_password(view_server_password)
|
|
342
|
+
f_client.set_organization_name("Coco Pharmaceuticals")
|
|
343
|
+
|
|
344
|
+
f_client.set_server_description("Coco View Server")
|
|
345
|
+
f_client.set_server_url_root(platform_url)
|
|
346
|
+
f_client.set_event_bus(event_bus_config)
|
|
347
|
+
f_client.set_server_security_connection(security_connection_body)
|
|
348
|
+
|
|
349
|
+
f_client.add_default_log_destinations()
|
|
350
|
+
|
|
351
|
+
f_client.config_all_view_services(remote_server_name, platform_url)
|
|
352
|
+
print(f"Activating {view_server}")
|
|
353
|
+
p_client = Platform(view_server, platform_url, admin_user)
|
|
354
|
+
p_client.activate_server_stored_config()
|
|
355
|
+
|
|
356
|
+
print(f"{view_server} activated")
|
|
357
|
+
|
|
358
|
+
except Exception as e:
|
|
359
|
+
print_exception_response(e)
|
|
360
|
+
|
|
361
|
+
#
|
|
362
|
+
# Configure cocoOLS1
|
|
363
|
+
#
|
|
364
|
+
|
|
365
|
+
lineageServerName = "cocoOLS1"
|
|
366
|
+
lineageServerPlatform = dataLakePlatformURL
|
|
367
|
+
|
|
368
|
+
mdrServerName = "cocoMDS1"
|
|
369
|
+
mdrServerUserId = "cocoMDS1npa"
|
|
370
|
+
mdrServerPassword = "secret"
|
|
371
|
+
mdrServerPlatform = dataLakePlatformURL
|
|
372
|
+
|
|
373
|
+
print("Configuring " + lineageServerName)
|
|
374
|
+
|
|
375
|
+
requestBody = {
|
|
376
|
+
"class": "OpenLineageConfig",
|
|
377
|
+
"openLineageDescription": "Open Lineage Service is used for the storage and querying of lineage",
|
|
378
|
+
"lineageGraphConnection": {
|
|
379
|
+
"class": "Connection",
|
|
380
|
+
"displayName": "Lineage Graph Connection",
|
|
381
|
+
"description": "Used for storing lineage in the Open Metadata format",
|
|
382
|
+
"connectorType": {
|
|
383
|
+
"class": "ConnectorType",
|
|
384
|
+
"connectorProviderClassName": "org.odpi.openmetadata.openconnectors.governancedaemonconnectors.lineagewarehouseconnectors.janusconnector.graph.LineageGraphConnectorProvider",
|
|
385
|
+
},
|
|
386
|
+
"configurationProperties": {
|
|
387
|
+
"gremlin.graph": "org.janusgraph.core.JanusGraphFactory",
|
|
388
|
+
"storage.backend": "berkeleyje",
|
|
389
|
+
"storage.directory": "data/servers/"
|
|
390
|
+
+ lineageServerName
|
|
391
|
+
+ "/lineage-repository/berkeley",
|
|
392
|
+
"index.search.backend": "lucene",
|
|
393
|
+
"index.search.directory": "data/servers/"
|
|
394
|
+
+ lineageServerName
|
|
395
|
+
+ "/lineage-repository/searchindex",
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
"accessServiceConfig": {
|
|
399
|
+
"serverName": mdrServerName,
|
|
400
|
+
"serverPlatformUrlRoot": mdrServerPlatform,
|
|
401
|
+
"user": mdrServerUserId,
|
|
402
|
+
"password": mdrServerPassword,
|
|
403
|
+
},
|
|
404
|
+
"backgroundJobs": [
|
|
405
|
+
{"jobName": "LineageGraphJob", "jobInterval": 120, "jobEnabled": "false"},
|
|
406
|
+
{
|
|
407
|
+
"jobName": "AssetLineageUpdateJob",
|
|
408
|
+
"jobInterval": 120,
|
|
409
|
+
"jobEnabled": "false",
|
|
410
|
+
"jobDefaultValue": "2021-12-03T10:15:30",
|
|
411
|
+
},
|
|
412
|
+
],
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
try:
|
|
416
|
+
f_client = FullServerConfig(
|
|
417
|
+
lineageServerName, lineageServerPlatform, admin_user
|
|
418
|
+
)
|
|
419
|
+
|
|
420
|
+
f_client.set_server_description("Coco View Server")
|
|
421
|
+
f_client.set_server_url_root(lineageServerPlatform)
|
|
422
|
+
f_client.set_event_bus(event_bus_config)
|
|
423
|
+
f_client.add_default_log_destinations()
|
|
424
|
+
|
|
425
|
+
f_client.set_lineage_warehouse_services(requestBody, lineageServerName)
|
|
426
|
+
print(f"Activating {lineageServerName}")
|
|
427
|
+
p_client = Platform(lineageServerName, lineageServerPlatform, admin_user)
|
|
428
|
+
p_client.activate_server_stored_config()
|
|
429
|
+
|
|
430
|
+
print(f"{lineageServerName} activated")
|
|
431
|
+
|
|
432
|
+
except Exception as e:
|
|
433
|
+
print_exception_response(e)
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
def main():
|
|
437
|
+
parser = argparse.ArgumentParser()
|
|
438
|
+
|
|
439
|
+
parser.add_argument("--url", help="URL Platform to connect to")
|
|
440
|
+
parser.add_argument("--userid", help="User Id")
|
|
441
|
+
args = parser.parse_args()
|
|
442
|
+
|
|
443
|
+
url = args.url if args.url is not None else dataLakePlatformURL
|
|
444
|
+
userid = args.userid if args.userid is not None else adminUserId
|
|
445
|
+
|
|
446
|
+
config_coco_datalake(url, userid)
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
if __name__ == "__main__":
|
|
450
|
+
main()
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Egeria Coco Pharmaceutical demonstration labs.
|
|
8
|
+
|
|
9
|
+
This script creates and configures the exchangeDL01 integration daemon.
|
|
10
|
+
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
import json
|
|
14
|
+
|
|
15
|
+
from globals import (
|
|
16
|
+
adminUserId,
|
|
17
|
+
corePlatformURL,
|
|
18
|
+
dataLakePlatformURL,
|
|
19
|
+
fileSystemRoot,
|
|
20
|
+
max_paging_size,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
from pyegeria import print_exception_response
|
|
24
|
+
from pyegeria.full_omag_server_config import FullServerConfig
|
|
25
|
+
from pyegeria.platform_services import Platform
|
|
26
|
+
|
|
27
|
+
daemon_server_name = "exchangeDL01"
|
|
28
|
+
#
|
|
29
|
+
daemon_server_platform = dataLakePlatformURL
|
|
30
|
+
daemon_server_user_id = "exchangeDL01npa"
|
|
31
|
+
daemon_server_password = "exchangeDL01passw0rd"
|
|
32
|
+
|
|
33
|
+
mdr_server = "cocoMDS1"
|
|
34
|
+
|
|
35
|
+
platform_url = dataLakePlatformURL
|
|
36
|
+
folder_connector_name = "DropFootClinicalTrialResultsFolderMonitor"
|
|
37
|
+
folder_connector_user_id = "monitorDL01npa"
|
|
38
|
+
folder_connector_source_name = "DropFootClinicalTrialResults"
|
|
39
|
+
folder_connector_folder = (
|
|
40
|
+
fileSystemRoot + "/data-lake/research/clinical-trials/drop-foot/weekly-measurements"
|
|
41
|
+
)
|
|
42
|
+
folder_connector_connection = {
|
|
43
|
+
"class": "Connection",
|
|
44
|
+
"connectorType": {
|
|
45
|
+
"class": "ConnectorType",
|
|
46
|
+
"connectorProviderClassName": "org.odpi.openmetadata.adapters.connectors.integration.basicfiles.DataFolderMonitorIntegrationProvider",
|
|
47
|
+
},
|
|
48
|
+
"endpoint": {"class": "Endpoint", "address": folder_connector_folder},
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
integration_group_name = "Onboarding"
|
|
52
|
+
|
|
53
|
+
print("Configuring " + daemon_server_name + "...")
|
|
54
|
+
|
|
55
|
+
try:
|
|
56
|
+
f_client = FullServerConfig(daemon_server_name, daemon_server_platform, adminUserId)
|
|
57
|
+
|
|
58
|
+
f_client.set_basic_server_properties(
|
|
59
|
+
"Supports exchange of metadata with third party technologies",
|
|
60
|
+
"Coco Pharmaceuticals",
|
|
61
|
+
daemon_server_platform,
|
|
62
|
+
daemon_server_user_id,
|
|
63
|
+
daemon_server_password,
|
|
64
|
+
max_paging_size,
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
security_connection_body = {
|
|
68
|
+
"class": "Connection",
|
|
69
|
+
"connectorType": {
|
|
70
|
+
"class": "ConnectorType",
|
|
71
|
+
"connectorProviderClassName": "org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaServerSecurityProvider",
|
|
72
|
+
},
|
|
73
|
+
}
|
|
74
|
+
f_client.set_server_security_connection(security_connection_body)
|
|
75
|
+
f_client.add_default_log_destinations()
|
|
76
|
+
|
|
77
|
+
print("\nConfiguring " + daemon_server_name + " integration connectors ...")
|
|
78
|
+
|
|
79
|
+
connector_configs = [
|
|
80
|
+
{
|
|
81
|
+
"class": "IntegrationConnectorConfig",
|
|
82
|
+
"connectorName": folder_connector_name,
|
|
83
|
+
"connectorUserId": folder_connector_user_id,
|
|
84
|
+
"connection": folder_connector_connection,
|
|
85
|
+
"metadataSourceQualifiedName": folder_connector_source_name,
|
|
86
|
+
"refreshTimeInterval": 10,
|
|
87
|
+
"usesBlockingCalls": "false",
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
|
|
91
|
+
f_client.config_integration_service(
|
|
92
|
+
mdr_server, platform_url, "files-integrator", {}, connector_configs
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
f_client.config_integration_group(
|
|
96
|
+
mdr_server, daemon_server_platform, integration_group_name
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
p_client = Platform(daemon_server_name, daemon_server_platform, adminUserId)
|
|
100
|
+
p_client.activate_server_stored_config()
|
|
101
|
+
|
|
102
|
+
config = p_client.get_active_configuration()
|
|
103
|
+
print(f"The server stored configuration is {json.dumps(config, indent=4)}")
|
|
104
|
+
|
|
105
|
+
except Exception as e:
|
|
106
|
+
print_exception_response(e)
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
|
4
|
+
|
|
5
|
+
Egeria Coco Pharmaceutical demonstration labs.
|
|
6
|
+
|
|
7
|
+
This script creates and configures the governDL01 engine host.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import json
|
|
13
|
+
|
|
14
|
+
from globals import dataLakePlatformURL, max_paging_size
|
|
15
|
+
|
|
16
|
+
from pyegeria import CoreServerConfig, print_exception_response
|
|
17
|
+
from pyegeria.platform_services import Platform
|
|
18
|
+
|
|
19
|
+
engine_server = "governDL01"
|
|
20
|
+
engine_server_platform = dataLakePlatformURL
|
|
21
|
+
admin_user = "garygeeke"
|
|
22
|
+
|
|
23
|
+
engine_server_user_id = "governDL01npa"
|
|
24
|
+
engine_server_password = "governDL01passw0rd"
|
|
25
|
+
mdr_server = "cocoMDS1"
|
|
26
|
+
mdr_engine_server_platform = dataLakePlatformURL
|
|
27
|
+
|
|
28
|
+
print("Configuring " + engine_server + "...")
|
|
29
|
+
|
|
30
|
+
try:
|
|
31
|
+
o_client = CoreServerConfig(engine_server, engine_server_platform, admin_user)
|
|
32
|
+
|
|
33
|
+
o_client.set_basic_server_properties(
|
|
34
|
+
"An Engine Host to run governance actions for Coco Pharmaceuticals",
|
|
35
|
+
"Coco Pharmaceuticals",
|
|
36
|
+
engine_server_platform,
|
|
37
|
+
engine_server_user_id,
|
|
38
|
+
engine_server_password,
|
|
39
|
+
max_paging_size,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
security_connection_body = {
|
|
43
|
+
"class": "Connection",
|
|
44
|
+
"connectorType": {
|
|
45
|
+
"class": "ConnectorType",
|
|
46
|
+
"connectorProviderClassName": "org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaServerSecurityProvider",
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
o_client.set_server_security_connection(security_connection_body)
|
|
50
|
+
|
|
51
|
+
o_client.set_engine_definitions_client_config(
|
|
52
|
+
mdr_server, mdr_engine_server_platform
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
engine_list_body = [
|
|
56
|
+
{
|
|
57
|
+
"class": "EngineConfig",
|
|
58
|
+
"engineQualifiedName": "AssetDiscovery",
|
|
59
|
+
"engineUserId": "findItDL01npa",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"class": "EngineConfig",
|
|
63
|
+
"engineQualifiedName": "AssetQuality",
|
|
64
|
+
"engineUserId": "findItDL01npa",
|
|
65
|
+
},
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
o_client.set_engine_list(engine_list_body)
|
|
69
|
+
|
|
70
|
+
config = o_client.get_stored_configuration()
|
|
71
|
+
print(f"The server stored configuration is {json.dumps(config, indent=4)}")
|
|
72
|
+
|
|
73
|
+
p_client = Platform(engine_server, engine_server_platform, admin_user)
|
|
74
|
+
p_client.activate_server_stored_config()
|
|
75
|
+
|
|
76
|
+
config = p_client.get_active_configuration()
|
|
77
|
+
print(f"The server stored configuration is {json.dumps(config, indent=4)}")
|
|
78
|
+
|
|
79
|
+
except Exception as e:
|
|
80
|
+
print_exception_response(e)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
Copyright Contributors to the ODPi Egeria project.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Egeria Coco Pharmaceutical demonstration labs.
|
|
8
|
+
|
|
9
|
+
This script creates and configures the monitorDev01 integration daemon.
|
|
10
|
+
|
|
11
|
+
The monitorDev01 is another integration daemon server supporting the development team.
|
|
12
|
+
It is cataloguing assets in preparation for deployment into production.
|
|
13
|
+
It has no integration services active initially since they are set up in the labs and demos that use it.
|
|
14
|
+
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from globals import adminUserId, devPlatformURL, max_paging_size
|
|
18
|
+
|
|
19
|
+
from pyegeria import print_exception_response
|
|
20
|
+
from pyegeria.full_omag_server_config import FullServerConfig
|
|
21
|
+
|
|
22
|
+
daemon_server_name = "monitorDev01"
|
|
23
|
+
daemon_server_platform = devPlatformURL
|
|
24
|
+
daemon_server_user_id = "erinoverview"
|
|
25
|
+
daemon_server_password = "erinoverviewpassw0rd"
|
|
26
|
+
|
|
27
|
+
mdr_server = "cocoMDSx"
|
|
28
|
+
platform_url = devPlatformURL
|
|
29
|
+
|
|
30
|
+
print("Configuring " + daemon_server_name + "...")
|
|
31
|
+
|
|
32
|
+
try:
|
|
33
|
+
f_client = FullServerConfig(daemon_server_name, daemon_server_platform, adminUserId)
|
|
34
|
+
|
|
35
|
+
f_client.set_basic_server_properties(
|
|
36
|
+
"Integration daemon supporting the development team",
|
|
37
|
+
"Coco Pharmaceuticals",
|
|
38
|
+
daemon_server_platform,
|
|
39
|
+
daemon_server_user_id,
|
|
40
|
+
daemon_server_password,
|
|
41
|
+
max_paging_size,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
security_connection_body = {
|
|
45
|
+
"class": "Connection",
|
|
46
|
+
"connectorType": {
|
|
47
|
+
"class": "ConnectorType",
|
|
48
|
+
"connectorProviderClassName": "org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaServerSecurityProvider",
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
f_client.set_server_security_connection(security_connection_body)
|
|
52
|
+
f_client.add_default_log_destinations()
|
|
53
|
+
|
|
54
|
+
print(
|
|
55
|
+
f"Initial configuration for {daemon_server_name} is complete - more configuration and activation "
|
|
56
|
+
f"will be performed in the labs"
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
except Exception as e:
|
|
60
|
+
print_exception_response(e)
|