Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure tutorials #839

Merged
merged 3 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Paste this structure into your `pom.xml` class.
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- Versions of Egeria libraries -->
<open-metadata.version>3.12</open-metadata.version>
<open-metadata.version>4.2</open-metadata.version>

<!-- Versions of dependent libraries -->
<logback.version>1.2.10</logback.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Paste this code between the curly braces of the `AssetCreate` class.
System.out.println("Using userId: " + clientUserId);
System.out.println();

HttpHelper.noStrictSSLIfConfigured();
HttpHelper.noStrictSSL();

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Paste this structure into your `pom.xml` class.
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- Versions of Egeria libraries -->
<open-metadata.version>3.12</open-metadata.version>
<open-metadata.version>4.2</open-metadata.version>

<!-- Versions of dependent libraries -->
<logback.version>1.2.10</logback.version>
Expand All @@ -45,12 +45,30 @@ Paste this structure into your `pom.xml` class.

<dependencies>

<dependency>
<groupId>org.odpi.egeria</groupId>
<artifactId>audit-log-framework</artifactId>
<version>${open-metadata.version}</version>
</dependency>

<dependency>
<groupId>org.odpi.egeria</groupId>
<artifactId>open-connector-framework</artifactId>
<version>${open-metadata.version}</version>
</dependency>

<dependency>
<groupId>org.odpi.egeria</groupId>
<artifactId>ocf-metadata-client</artifactId>
<version>${open-metadata.version}</version>
</dependency>

<dependency>
<groupId>org.odpi.egeria</groupId>
<artifactId>ocf-metadata-api</artifactId>
<version>${open-metadata.version}</version>
</dependency>

<dependency>
<groupId>org.odpi.egeria</groupId>
<artifactId>asset-consumer-api</artifactId>
Expand Down Expand Up @@ -81,6 +99,12 @@ Paste this structure into your `pom.xml` class.
<version>${open-metadata.version}</version>
</dependency>

<dependency>
<groupId>org.odpi.egeria</groupId>
<artifactId>basic-file-connector</artifactId>
<version>${open-metadata.version}</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ Paste this code between the curly braces of the `AssetListen` class.
System.out.println("Using userId: " + clientUserId);
System.out.println();

HttpHelper.noStrictSSLIfConfigured();
HttpHelper.noStrictSSL();

try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,26 @@
<!-- Copyright Contributors to the Egeria project. -->


In `egeria-dev-projects`, there is a module called `egeria-platform-report`. This contains a utility that reports on the status of a running OMAG Server Platform. Navigate down the contents of `egeria-platform-report` until you come across a java class called `EgeriaPlatformReport`.

![egeria-platform-report](/education/egeria-dojo/developer/egeria-platform-report-module.png)
In the `omag-server-platform` assembly, there is a jar file called `egeria-platform-report.jar` under the `etc/reports` directory. This contains a utility that reports on the status of a running OMAG Server Platform.

??? beginner "Run `EgeriaPlatformReport`"
Select `EgeriaPlatformReport` and then `Run 'EgeriaPlatformReport...main()'` from the right-mouse menu.

A new *Run* tab appears next to `EgeriaPlatform`. `EgeriaPlatformReport` runs but fails:

```bash
/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/bin/java ... org.odpi.openmetadata.devprojects.reports.platform.EgeriaPlatformReport
/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java -Dfile.encoding=UTF-8 -jar /Users/mandy-chessell/egeria-install/egeria-platform-4.3-distribution.tar.gz/assembly/etc/reports/egeria-platform-report.jar
===============================
OMAG Server Platform Report: Sun Feb 13 22:13:33 GMT 2022
OMAG Server Platform Report: Mon Sep 04 18:00:51 BST 2023
===============================
Running against platform: https://localhost:9443
Using userId: garygeeke

Platform report for: https://localhost:9443
Platform deployment
There was an org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException exception when calling the platform. Error message is: OMAG-COMMON-503-001 A client-side exception was received from API call getPlatformOrigin to OMAG Server EgeriaPlatform at https://localhost:9443. The error message was CLIENT-SIDE-REST-API-CONNECTOR-503-002 A client-side exception org.springframework.web.client.ResourceAccessException was received by method getPlatformOrigin from API call https://localhost:9443/open-metadata/platform-services/users/{1}/server-platform/origin to server EgeriaPlatform on platform https://localhost:9443. The error message was I/O error on GET request for "https://localhost:9443/open-metadata/platform-services/users/garygeeke/server-platform/origin": PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Process finished with exit code 255
Platform deployment
There was an org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException exception when calling the platform. Error message is: OMAG-COMMON-503-001 A client-side exception was received from API call getPlatformOrigin to OMAG Server EgeriaPlatform at https://localhost:9443. The error message was CLIENT-SIDE-REST-API-CONNECTOR-503-002 A client-side exception org.springframework.web.client.ResourceAccessException was received by method getPlatformOrigin from API call https://localhost:9443/open-metadata/platform-services/users/{1}/server-platform/origin to server EgeriaPlatform on platform https://localhost:9443. The error message was I/O error on GET request for "https://localhost:9443/open-metadata/platform-services/users/garygeeke/server-platform/origin": PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Process finished with exit code 255
```
This is because it does not have a valid security certification. You will notice that IntelliJ has added a new configuration for `EgeriaPlatformReport'

Expand All @@ -47,8 +44,9 @@ In `egeria-dev-projects`, there is a module called `egeria-platform-report`. Th
Re-run `EgeriaPlatformReport` by clicking on the green arrow on the *Run* tab. There is more output this time even though it still seems to fail in the end. It begins with the report header that records the platform it is running against.

```bash
/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home/bin/java -Dstrict.ssl=false -Dfile.encoding=UTF-8 -jar /Users/mandy-chessell/egeria-install/egeria-platform-4.3-distribution.tar.gz/assembly/etc/reports/egeria-platform-report.jar
===============================
OMAG Server Platform Report: Mon Feb 14 07:57:05 GMT 2022
OMAG Server Platform Report: Mon Sep 04 19:38:03 BST 2023
===============================
Running against platform: https://localhost:9443
Using userId: garygeeke
Expand All @@ -59,10 +57,10 @@ In `egeria-dev-projects`, there is a module called `egeria-platform-report`. Th
Then `EgeriaPlatfromReport` starts to call the Egeria APIs that are used for configuring and managing the OMAG Server Platform.

```bash
Platform deployment
Egeria version: Egeria OMAG Server Platform (version 3.12)
Configuration document store connector: <null>
Platform security connector: <null>
Platform deployment
Egeria version: Egeria OMAG Server Platform (version 4.3)
Configuration document store connector: <null>
Platform security connector: <null>
```

The `Egeria version` is retrieved using the `getPlatformOrigin` method of the [Platform Services](/services/platform-services/overview/).
Expand All @@ -72,14 +70,13 @@ In `egeria-dev-projects`, there is a module called `egeria-platform-report`. Th

String platformOrigin = platformServicesClient.getPlatformOrigin(clientUserId);
```
The connectors configured for the platform are retrieved using the [Administration Service's `OMAGServerPlatformConfigurationClient`](/services/admin-services/overview/#configuring-the-omag-server-platform){ target=dojo-support }
The connectors configured for the platform are retrieved using the platform services client and [Administration Service's `OMAGServerPlatformConfigurationClient`](/services/admin-services/overview/#configuring-the-omag-server-platform){ target=dojo-support }

```java linenums="1"

OMAGServerPlatformConfigurationClient platformConfigurationClient = new OMAGServerPlatformConfigurationClient(clientUserId, platformURLRoot);
OMAGServerPlatformConfigurationClient platformConfigurationClient = new OMAGServerPlatformConfigurationClient(clientUserId, platformURLRoot);

Connection configurationStoreConnection = platformConfigurationClient.getConfigurationStoreConnection();
Connection platformSecurityConnection = platformConfigurationClient.getPlatformSecurityConnection();
Connection platformSecurityConnection = platformServicesClient.getPlatformSecurityConnection();
```

Next is the list of *Registered services*. These are optional services that can be plugged into the `OMAG Server Platform` and provide the services to retrieve and maintain/govern open metadata. The list that you see is the default set of services installed with the platform.
Expand All @@ -90,22 +87,21 @@ In `egeria-dev-projects`, there is a module called `egeria-platform-report`. Th
Registered services
Data Manager OMAS: Capture changes to the data stores and data set managed by a data manager such as a database server, content manager or file system.
Subject Area OMAS: Document knowledge about a subject area
Design Model OMAS: Exchange design model content with tools and standard packages
Glossary View OMAS: Support glossary terms visualization
Asset Manager OMAS: Manage metadata from a third party asset manager
Design Model OMAS: Exchange design model content with tools and standard packages
Security Officer OMAS: Set up rules and security tags to protect data
Asset Manager OMAS: Manage metadata from a third party asset manager
IT Infrastructure OMAS: Manage information about the deployed IT infrastructure
Data Science OMAS: Create and manage data science definitions and models
Community Profile OMAS: Define personal profile and collaborate
Discovery Engine OMAS: Support for automated metadata discovery engines
Data Engine OMAS: Exchange process models and lineage with a data engine
Discovery Engine OMAS: Support for automated metadata discovery engines
Digital Architecture OMAS: Design of the digital services for an organization
Asset Owner OMAS: Manage an asset
Stewardship Action OMAS: Manage exceptions and actions from open governance
Governance Program OMAS: Manage the governance program
Digital Service OMAS: Manage a digital service through its lifecycle
Asset Lineage OMAS: Store asset lineage
Analytics Modeling OMAS: Provides metadata information for Analytics Modeling.
Asset Consumer OMAS: Access assets through connectors
Asset Catalog OMAS: Search and understand your assets
DevOps OMAS: Manage a DevOps pipeline
Expand All @@ -114,25 +110,29 @@ In `egeria-dev-projects`, there is a module called `egeria-platform-report`. Th
Governance Engine OMAS: Set up an operational governance engine
Data Privacy OMAS: Manage governance of privacy
Security Manager OMAS: Manages exchange of metadata with a security service
Repository Governance OMES: Maintains open metadata archives based on the activity in the connected cohorts.
Governance Action OMES: Executes requested governance action services to monitor, assess and maintain metadata and its real-world counterparts.
Repository Governance OMES: Dynamically governance open metadata repositories in the connected cohorts.
Asset Analysis OMES: Analyses the content of an asset's real world counterpart, generates annotations in an open discovery report that is attached to the asset in the open metadata repositories.
Infrastructure Integrator OMIS: Exchange information relating to IT infrastructure such as hosts, platforms, servers, server capabilities and services.
Files Integrator OMIS: Extract metadata about files stored in a file system or file manager.
Topic Integrator OMIS: Exchange metadata with third party event-based brokers.
API Integrator OMIS: Exchange metadata with third party API Gateways.
Security Integrator OMIS: Distribute security properties to security enforcement points.
API Integrator OMIS: Exchange metadata with third party API Gateways.
Search Integrator OMIS: Store metadata with a third party technology that is focused on search efficiency.
Database Integrator OMIS: Extract metadata such as schema, tables and columns from database managers.
Lineage Integrator OMIS: Manage capture of lineage from a third party tool.
Database Integrator OMIS: Extract metadata such as schema, tables and columns from database managers.
Catalog Integrator OMIS: Exchange metadata with third party data catalogs.
Analytics Integrator OMIS: Exchange metadata with third party analytics tools.
Display Integrator OMIS: Exchange metadata with applications that display data to users.
Analytics Integrator OMIS: Exchange metadata with third party analytics tools.
Organization Integrator OMIS: Load information about the teams and people in an organization and return collaboration activity.
Glossary Author OMVS: View Service for glossary authoring.
Dynamic Infrastructure and Operations OMVS: Explore and operate an open metadata ecosystem.
Repository Explorer OMVS: Explore open metadata instances.
Glossary Workflow OMVS: Create glossary terms and organize them into categories as part of a controlled workflow process. It supports the editing glossary and multiple states.
My Profile OMVS: Manage information about the logged on user as well as their preferences.
Type Explorer OMVS: Explore the open metadata types in a repository or cohort.
Server Author OMVS: Author servers.
Glossary Browser OMVS: View glossary terms and categories within a glossary.
```
The registered are also retrieved through the [Platform Services](/services/platform-services/overview){ target=dojo-support } using the `getXXXServices` method as follows:

Expand All @@ -142,15 +142,15 @@ In `egeria-dev-projects`, there is a module called `egeria-platform-report`. Th
List<RegisteredOMAGService> registeredOMISs = platformServicesClient.getIntegrationServices(clientUserId);
List<RegisteredOMAGService> registeredOMVSs = platformServicesClient.getViewServices(clientUserId);
```
??? beginner "Observe exception from `EgeriaPlatformReport`"
??? beginner "Observe no servers from `EgeriaPlatformReport`"

Finally, `EgeriaPlatformReport` calls the [Administration Services](/services/admin-services/overview){ target=dojo-support } to request the list of configured servers. At this stage, there are none. In fact, the directory where they are kept has not even been created which is why an exception occurs. It is printed out to show which directory (`data/servers`), relative to the working directory set up in the `EgeriaPlatform` configuration (`~/egeria-install/egeria-omag*`).
Finally, `EgeriaPlatformReport` calls the [Administration Services](/services/admin-services/overview){ target=dojo-support } to request the list of configured servers. At this stage, there are none.
```bash
Platform servers
There was an org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException exception when calling the platform. Error message is: OMAG-ADMIN-500-002 Method retrieveAllServerConfigs returned an unexpected exception of org.odpi.openmetadata.frameworks.connectors.ffdc.OCFRuntimeException with message ENCRYPTED-DOC-STORE-400-014 Unable to retrieve the encrypted configuration files; exception was java.nio.file.NoSuchFileException with message data/servers, while attempting access file data/servers/null/config/null.config
None

Process finished with exit code 255
Process finished with exit code 0
```
The next step will create a server configuration document that will also create the configuration directory and resolve this issue.
The next step will create a server configuration document that will also create the configuration directory and the report will start to show servers.

`EgeriaPlatformReport` also creates a [markdown](/guides/contributor/markdown) document called `egeria-platform-report.md` that contains its output. This [version of egeria-platform-report.md](/education/egeria-dojo/developer/egeria-platform-report-no-servers) is included for your reference.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Now it is time to start `mds1` and observe the changes to `EgeriaPlatformReport`
The server is waiting for Apache Kafka to start. If this occurs start Apache Kafka (and Apache Zookeeper) ...

??? tip "Starting Apache Kafka"
---8<-- "docs/education/tutorials/kafka-tutorial/task-starting-kafka.md"
---8<-- "snippets/tasks/task-starting-kafka.md"

Once Apache Kafka is running, `mds1` completes start-up and `ServerOps` outputs the success message in its *Run* tab as shown in outcome 1. It is possible, however, that you do not manage to get Kafka running in time and `mds1` fails to start. If that happens just re-run the `start mds1` command of `ServerOps` once you have Kafka running.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Paste this structure into your `pom.xml` class.
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<!-- Versions of Egeria libraries -->
<open-metadata.version>3.12</open-metadata.version>
<open-metadata.version>4.2</open-metadata.version>

</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Paste this code between the curly braces of the `EventLoggingProvider` class.
/*
* Class of the connector.
*/
private static final Class<?> connectorClass = EventLoggingConnector.class;
private static final String connectorClass = "egeria.dojo.connector.eventlogging.EventLoggingConnector";

/**
* Constructor used to initialize the ConnectorProviderBase with the Java class name of the specific
Expand Down
Loading