diff --git a/egeria-server-config.ipynb b/egeria-server-config.ipynb index b0e2ce0..88efa73 100644 --- a/egeria-server-config.ipynb +++ b/egeria-server-config.ipynb @@ -1527,7 +1527,11 @@ " jsonContentHeader = {'content-type':'application/json'}\n", " postAndPrintResult(url, json=configBody, headers=jsonContentHeader)\n", "\n", - "\n", + "def configure_all_view_services_w_body(adminPlatformURL, adminUserId, viewServerName,view_service_request_body: dict):\n", + " url = f\"{adminPlatformURL}/open-metadata/admin-services/users/{adminUserId}/servers/{viewServerName}/view-services\"\n", + " jsonContentHeader = {'content-type':'application/json'}\n", + " postAndPrintResult(url, json=view_service_request_body, headers=jsonContentHeader)\n", + " \n", "# A view server supports the presentation server UI (a node based app). Here we run it on the datalake platform \n", "viewServerName = \"cocoView1\"\n", "viewServerUserId = \"cocoView1npa\"\n", @@ -1551,320 +1555,93 @@ "\n", "# The governance solution view services currently only consist of glossary author\n", "print (\"Configuring the Governance Solution View Services\")\n", - "remotePlatformURL=corePlatformURL\n", - "remoteServerName=\"cocoMDS2\"\n", - "configureGovernanceSolutionViewService(adminPlatformURL, adminUserId, viewServerName, \"glossary-author\", remotePlatformURL,remoteServerName)\n", - "configureGovernanceSolutionViewService(adminPlatformURL, adminUserId, viewServerName, \"glossary-browser\", remotePlatformURL,remoteServerName)\n", - "configureGovernanceSolutionViewService(adminPlatformURL, adminUserId, viewServerName, \"glossary-workflow\", remotePlatformURL,remoteServerName)\n", + "remote_platform_url=corePlatformURL\n", + "remote_server_name=\"cocoMDS2\"\n", "\n", "print (\"Configuring the Integration View Services\")\n", "\n", "# repository explorer integration view service\n", "viewService=\"rex\"\n", - "rexConfigBody = {\n", - " \"class\":\"IntegrationViewServiceConfig\",\n", - " \"viewServiceAdminClass\":\"org.odpi.openmetadata.viewservices.rex.admin.RexViewAdmin\",\n", - " \"viewServiceFullName\":\"Repository Explorer\",\n", - " \"viewServiceOperationalStatus\":\"ENABLED\",\n", - " \"omagserverPlatformRootURL\": \"UNUSED\",\n", - " \"omagserverName\" : \"UNUSED\",\n", - " \"resourceEndpoints\" : [\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Platform\",\n", - " \"description\" : \"Core Platform\",\n", - " \"platformName\" : \"Core\",\n", - " \"platformRootURL\" : corePlatformURL\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Platform\",\n", - " \"description\" : \"DataLake Platform\",\n", - " \"platformName\" : \"DataLake\",\n", - " \"platformRootURL\" : dataLakePlatformURL\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Platform\",\n", - " \"description\" : \"Development Platform\",\n", - " \"platformName\" : \"Development\",\n", - " \"platformRootURL\" : devPlatformURL\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS1\",\n", - " \"description\" : \"Data Lake Operations\",\n", - " \"platformName\" : \"DataLake\",\n", - " \"serverName\" : \"cocoMDS1\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS2\",\n", - " \"description\" : \"Governance\",\n", - " \"platformName\" : \"Core\",\n", - " \"serverName\" : \"cocoMDS2\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS3\",\n", - " \"description\" : \"Research\",\n", - " \"platformName\" : \"Core\",\n", - " \"serverName\" : \"cocoMDS3\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS5\",\n", - " \"description\" : \"Business Systems\",\n", - " \"platformName\" : \"Core\",\n", - " \"serverName\" : \"cocoMDS5\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS6\",\n", - " \"description\" : \"Manufacturing\",\n", - " \"platformName\" : \"Core\",\n", - " \"serverName\" : \"cocoMDS6\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDSx\",\n", - " \"description\" : \"Development\",\n", - " \"platformName\" : \"Development\",\n", - " \"serverName\" : \"cocoMDSx\"\n", - " },\n", - " ]\n", - " }\n", - "\n", - "configureIntegrationViewService(adminPlatformURL, adminUserId, viewServerName, viewService, rexConfigBody)\n", - "\n", - "# type-explorer has endpoints\n", - "viewService=\"tex\"\n", - "texConfigBody = {\n", - " \"class\":\"IntegrationViewServiceConfig\",\n", - " \"viewServiceAdminClass\":\"org.odpi.openmetadata.viewservices.tex.admin.TexViewAdmin\",\n", - " \"viewServiceFullName\":\"Type Explorer\",\n", - " \"viewServiceOperationalStatus\":\"ENABLED\",\n", - " \"omagserverPlatformRootURL\": \"UNUSED\",\n", - " \"omagserverName\" : \"UNUSED\",\n", - " \"resourceEndpoints\" : [\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Platform\",\n", - " \"description\" : \"Core Platform\",\n", - " \"platformName\" : \"Core\",\n", - " \"platformRootURL\" : corePlatformURL\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Platform\",\n", - " \"description\" : \"DataLake Platform\",\n", - " \"platformName\" : \"DataLake\",\n", - " \"platformRootURL\" : dataLakePlatformURL\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Platform\",\n", - " \"description\" : \"Development Platform\",\n", - " \"platformName\" : \"Development\",\n", - " \"platformRootURL\" : devPlatformURL\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS1\",\n", - " \"description\" : \"Data Lake Operations\",\n", - " \"platformName\" : \"DataLake\",\n", - " \"serverName\" : \"cocoMDS1\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS2\",\n", - " \"description\" : \"Governance\",\n", - " \"platformName\" : \"Core\",\n", - " \"serverName\" : \"cocoMDS2\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS3\",\n", - " \"description\" : \"Research\",\n", - " \"platformName\" : \"Core\",\n", - " \"serverName\" : \"cocoMDS3\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS5\",\n", - " \"description\" : \"Business Systems\",\n", - " \"platformName\" : \"Core\",\n", - " \"serverName\" : \"cocoMDS5\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS6\",\n", - " \"description\" : \"Manufacturing\",\n", - " \"platformName\" : \"Core\",\n", - " \"serverName\" : \"cocoMDS6\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDSx\",\n", - " \"description\" : \"Development\",\n", - " \"platformName\" : \"Development\",\n", - " \"serverName\" : \"cocoMDSx\"\n", - " },\n", - " ]\n", - " }\n", - "\n", - "configureIntegrationViewService(adminPlatformURL, adminUserId, viewServerName, viewService, texConfigBody)\n", - "\n", - "# Dino provides insight into the operational environment of egeria - this config body allows coco's platforms & servers to be accessed\n", - "viewService=\"dino\"\n", - "DinoConfigBody = {\n", - " \"class\":\"IntegrationViewServiceConfig\",\n", - " \"viewServiceAdminClass\":\"org.odpi.openmetadata.viewservices.dino.admin.DinoViewAdmin\",\n", - " \"viewServiceFullName\":\"Dino\",\n", - " \"viewServiceOperationalStatus\":\"ENABLED\",\n", - " \"omagserverPlatformRootURL\": \"UNUSED\",\n", - " \"omagserverName\" : \"UNUSED\",\n", - " \"resourceEndpoints\" : [\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Platform\",\n", - " \"description\" : \"Core Platform\",\n", - " \"platformName\" : \"Core\",\n", - " \"platformRootURL\" : corePlatformURL\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Platform\",\n", - " \"description\" : \"DataLake Platform\",\n", - " \"platformName\" : \"DataLake\",\n", - " \"platformRootURL\" : dataLakePlatformURL\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Platform\",\n", - " \"description\" : \"Development Platform\",\n", - " \"platformName\" : \"Development\",\n", - " \"platformRootURL\" : devPlatformURL\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS1\",\n", - " \"description\" : \"Data Lake Operations\",\n", - " \"platformName\" : \"DataLake\",\n", - " \"serverName\" : \"cocoMDS1\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS2\",\n", - " \"description\" : \"Governance\",\n", - " \"platformName\" : \"Core\",\n", - " \"serverName\" : \"cocoMDS2\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS3\",\n", - " \"description\" : \"Research\",\n", - " \"platformName\" : \"Core\",\n", - " \"serverName\" : \"cocoMDS3\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS4\",\n", - " \"description\" : \"Data Lake Users\",\n", - " \"platformName\" : \"DataLake\",\n", - " \"serverName\" : \"cocoMDS4\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS5\",\n", - " \"description\" : \"Business Systems\",\n", - " \"platformName\" : \"Core\",\n", - " \"serverName\" : \"cocoMDS5\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDS6\",\n", - " \"description\" : \"Manufacturing\",\n", - " \"platformName\" : \"Core\",\n", - " \"serverName\" : \"cocoMDS6\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoMDSx\",\n", - " \"description\" : \"Development\",\n", - " \"platformName\" : \"Development\",\n", - " \"serverName\" : \"cocoMDSx\"\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Server\",\n", - " \"serverInstanceName\" : \"cocoView1\",\n", - " \"description\" : \"View Server\",\n", - " \"platformName\" : \"DataLake\",\n", - " \"serverName\" : \"cocoView1\"\n", - " },\n", - " ]\n", - " }\n", - "\n", - "configureIntegrationViewService(adminPlatformURL, adminUserId, viewServerName, viewService, DinoConfigBody)\n", - "\n", - "# server-author endpoints\n", - "viewService=\"server-author\"\n", - "serverAuthorConfigBody = {\n", - " \"class\":\"IntegrationViewServiceConfig\",\n", - " \"viewServiceAdminClass\":\"org.odpi.openmetadata.viewservices.serverauthor.admin.ServerAuthorViewAdmin\",\n", - " \"viewFullServiceName\":\"ServerAuthor\",\n", - " \"viewServiceOperationalStatus\":\"ENABLED\",\n", - " \"viewServiceFullName\":\"Type Explorer\",\n", - " \"viewServiceOperationalStatus\":\"ENABLED\",\n", - " \"omagserverPlatformRootURL\":dataLakePlatformURL,\n", - " \"omagserverName\" : \"UNUSED\",\n", - " \"resourceEndpoints\" : [\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Platform\",\n", - " \"description\" : \"Core Platform\",\n", - " \"platformName\" : \"Core\",\n", - " \"platformRootURL\" : corePlatformURL\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Platform\",\n", - " \"description\" : \"DataLake Platform\",\n", - " \"platformName\" : \"DataLake\",\n", - " \"platformRootURL\" : dataLakePlatformURL\n", - " },\n", - " {\n", - " \"class\" : \"ResourceEndpointConfig\",\n", - " \"resourceCategory\" : \"Platform\",\n", - " \"description\" : \"Development Platform\",\n", - " \"platformName\" : \"Development\",\n", - " \"platformRootURL\" : devPlatformURL\n", - " }\n", - " ]\n", - " }\n", - "\n", - "configureIntegrationViewService(adminPlatformURL, adminUserId, viewServerName, viewService, serverAuthorConfigBody)\n", + "# rexConfigBody \n", + "view_server_config = {\n", + " \"class\": \"ViewServiceRequestBody\",\n", + " \"omagserverPlatformRootURL\": remote_platform_url,\n", + " \"omagserverName\": remote_server_name,\n", + " \"resourceEndpoints\": [\n", + " {\n", + " \"class\": \"ResourceEndpointConfig\",\n", + " \"resourceCategory\": \"Platform\",\n", + " \"description\": \"Core Platform\",\n", + " \"platformName\": \"Core\",\n", + " \"platformRootURL\": corePlatformURL\n", + " },\n", + " {\n", + " \"class\": \"ResourceEndpointConfig\",\n", + " \"resourceCategory\": \"Platform\",\n", + " \"description\": \"DataLake Platform\",\n", + " \"platformName\": \"DataLake\",\n", + " \"platformRootURL\": dataLakePlatformURL\n", + " },\n", + " {\n", + " \"class\": \"ResourceEndpointConfig\",\n", + " \"resourceCategory\": \"Platform\",\n", + " \"description\": \"Development Platform\",\n", + " \"platformName\": \"Development\",\n", + " \"platformRootURL\": devPlatformURL\n", + " },\n", + " {\n", + " \"class\": \"ResourceEndpointConfig\",\n", + " \"resourceCategory\": \"Server\",\n", + " \"serverInstanceName\": \"cocoMDS1\",\n", + " \"description\": \"Data Lake Operations\",\n", + " \"platformName\": \"DataLake\",\n", + " \"serverName\": \"cocoMDS1\"\n", + " },\n", + " {\n", + " \"class\": \"ResourceEndpointConfig\",\n", + " \"resourceCategory\": \"Server\",\n", + " \"serverInstanceName\": \"cocoMDS2\",\n", + " \"description\": \"Governance\",\n", + " \"platformName\": \"Core\",\n", + " \"serverName\": \"cocoMDS2\"\n", + " },\n", + " {\n", + " \"class\": \"ResourceEndpointConfig\",\n", + " \"resourceCategory\": \"Server\",\n", + " \"serverInstanceName\": \"cocoMDS3\",\n", + " \"description\": \"Research\",\n", + " \"platformName\": \"Core\",\n", + " \"serverName\": \"cocoMDS3\"\n", + " },\n", + " {\n", + " \"class\": \"ResourceEndpointConfig\",\n", + " \"resourceCategory\": \"Server\",\n", + " \"serverInstanceName\": \"cocoMDS5\",\n", + " \"description\": \"Business Systems\",\n", + " \"platformName\": \"Core\",\n", + " \"serverName\": \"cocoMDS5\"\n", + " },\n", + " {\n", + " \"class\": \"ResourceEndpointConfig\",\n", + " \"resourceCategory\": \"Server\",\n", + " \"serverInstanceName\": \"cocoMDS6\",\n", + " \"description\": \"Manufacturing\",\n", + " \"platformName\": \"Core\",\n", + " \"serverName\": \"cocoMDS6\"\n", + " },\n", + " {\n", + " \"class\": \"ResourceEndpointConfig\",\n", + " \"resourceCategory\": \"Server\",\n", + " \"serverInstanceName\": \"cocoMDSx\",\n", + " \"description\": \"Development\",\n", + " \"platformName\": \"Development\",\n", + " \"serverName\": \"cocoMDSx\"\n", + " },\n", + " ]\n", + " }\n", "\n", + "# configureIntegrationViewService(adminPlatformURL, adminUserId, viewServerName, viewService, rexConfigBody)\n", + "configure_all_view_services_w_body(adminPlatformURL, adminUserId, viewServerName, view_server_config)\n", "\n", "\n", "\n",