Stable
This component is complete and can be used. The interfaces will be supported until the function is removed from the project via the deprecation process. There will be ongoing extensions to this function, but it will be done to ensure backward compatibility as far as possible. If there is a need to break backward compatibility, this will be discussed and reviewed in the community, with a documented timeline.
Administration services¶
The configuration for an OMAG Server is maintained in a Configuration Document and these configuration documents are stored in a configuration document store. The implementation for the configuration document store is plugged into the OMAG Server Platform as a configuration document store connector.
The administration services support the commands to:
- Configure an OMAG Server Platform's configuration document store connector.
- Configure different types of OMAG Servers
- List the configured OMAG Servers
- Deploy the configuration document for an OMAG Server to a different OMAG Server Platform.
The Java clients for the administration services are located in its admin-services-client
module.
Each Java client has multiple constructors. The constructors set up the connection to the OMAG Server Platform. The parameters are passed in different combinations to control security and logging.
platformName
- the descriptive name of the OMAG Server Platform for error logging.platformURLRoot
- the platform url root of the OMAG Server Platform.auditLog
- logging destination for audit log messages.userId
- this is the optional userId that is embedded in all REST calls. Think of it as the client's user Id rather than the userId of the end user.password
- this is the password that goes with the client's userId. The userId and password should both be supplied or neither.maxPageSize
- controls the maximum number of results that can be returned on any call. If this is not set, the max page size is controlled platform-side.restClient
- inside the java client is a REST API connector that manages the marshalling and de-marshalling of the requests into the HTTP protocol used by REST. Normally this connector is created by the client, but this parameter enables an externally created connector to be used instead.
The constructor may throw InvalidParameterException
if there is an issue setting up the client-side components based on the supplied parameters. Pick the constructor that matches the parameters you have. For example, if you call the constructor that supports the client's userId and password and you pass null in these parameters, the exception is thrown.
Dynamically configuring the Configuration Document Store Connector¶
The Configuration Document Store Connector manage the storage and retrieval of configuration documents. This connector can be configured though the OMAGServerPlatformConfigurationClient
.
The OMAGServerPlatformConfigurationClient is responsible for setting up the configuration document store connector for the OMAG Server Platform. This configuration needs to be re-applied each time the platform starts up
The client supports retrieving the connection for either of these connectors, updating it and deleting it. The example below shows how to retrieve the connections for the platform's two connectors. The platform's configuration is not stored - it needs to be added/updated each time the platform starts.
Example: retrieving all available configuration documents
==== "Java"
```java linenums="1"
OMAGServerPlatformConfigurationClient platformConfigurationClient = new OMAGServerPlatformConfigurationClient(clientUserId, platformURLRoot);
Connection configurationStoreConnection = platformConfigurationClient.getConfigurationStoreConnection();
Connection platformSecurityConnection = platformConfigurationClient.getPlatformSecurityConnection();
```
==== "REST API"
!!! post "POST - configure the configuration document store connector"
```
{{platformURLRoot}}/open-metadata/platform-services/users/{{adminUserId}}/stores/connection
```
The request body should be a connection object used to create the connector to the configuration
document store.
!!! attention "Ensure the connector is available in the classpath"
In order to use any connector other than the default, you need to also ensure that the Connector and its ConnectorProvider class are available to the server platform (i.e. the jar file containing them is available in the `LOADER_PATH` location of the server platform).
??? example "Example: (unencrypted) file store connector"
For example, this connection would set up the (unencrypted) file store connector:
```json linenums="1"
{
"class": "Connection",
"connectorType": {
"class": "ConnectorType",
"connectorProviderClassName": "org.odpi.openmetadata.adapters.adminservices.configurationstore.file.FileBasedServerConfigStoreProvider"
},
"endpoint": {
"class": "Endpoint",
"address": "omag.server.{0}.config"
}
}
```
??? example "Example: encrypted JSON file store, non-default location"
As another example, this connection uses the default encrypted JSON file store, but the files are stored in a different location (`/my-config/omag.server.{0}.config`).
```json linenums="1"
{
"class": "Connection",
"connectorType": {
"class": "ConnectorType",
"connectorProviderClassName": "org.odpi.openmetadata.adapters.adminservices.configurationstore.encryptedfile.EncryptedFileBasedServerConfigStoreProvider"
},
"endpoint": {
"class": "Endpoint",
"address": "/my-config/omag.server.{0}.config"
}
}
```
Determine configured store¶
It is possible to query the setting of the configuration document store connector using the following command:
GET - retrieve configured configuration document store
{{platformURLRoot}}/open-metadata/admin-services/users/{{adminUserId}}/stores/connection
Response indicating default configuration store (encrypted JSON file store)
{
"class": "ConnectionResponse",
"relatedHTTPCode": 200
}
Response indicating a specific connector
If the response looks more like the JSON below, a connector is configured. The connectorProviderClassName
tells you which connector is being used and the address
shows where the configuration documents are stored.
{
"class": "ConnectionResponse",
"relatedHTTPCode": 200,
"connection": {
"class": "Connection",
"connectorType": {
"class": "ConnectorType",
"connectorProviderClassName": "org.odpi.openmetadata.adapters.adminservices.configurationstore.file.FileBasedServerConfigStoreProvider"
},
"endpoint": {
"class": "Endpoint",
"address": "omag.server.{0}.config"
}
}
}
Remove configured store¶
It is also possible to remove the configuration for the connector using the following command:
DELETE - remove configured configuration store
{{platformURLRoot}}/open-metadata/admin-services/users/{{adminUserId}}/stores/connection
This reverts the store to the default encrypted JSON file store.
Configuring an OMAG Server¶
The Administration Services clients that support the configuration of OMAG Servers are specialized to configure the specific services that each type of OMAG Server supports. For example, MetadataAccessStoreConfigurationClient
has all of the methods necessary to configure a Metadata Access Store. Similarly, the IntegrationDaemonConfigurationClient
has all of the methods necessary to configure an Integration Daemon.
Since there are some common services, the clients make use of inheritance to share configuration methods that are common. The diagram below how they are related.
The configuration clients for OMAG servers are organized in an inheritance hierarchy to allow them to share common methods. However, each has all of the method needed to configure its services.
Java Client | Type of OMAG Server it configures | Javadoc Link |
---|---|---|
MetadataAccessPointConfigurationClient | Metadata Access Point | Javadoc |
MetadataAccessStoreConfigurationClient | Metadata Access Store | Javadoc |
RepositoryProxyConfigurationClient | Repository Proxy | Javadoc |
ConformanceTestServerConfigurationClient | Conformance Test Server | Javadoc |
EngineHostConfigurationClient | Engine Host | Javadoc |
IntegrationDaemonConfigurationClient | Integration Daemon | Javadoc |
ViewServerConfigurationClient | View Server | Javadoc |
The configuration for each server is stored in a configuration document. The Java class that holds the configuration document is called OMAGServerConfig
. It is a JavaBean and it can be used directly to set up the configuration for a server,
or it can be set up by calling the configuration client APIs.
The sample code below shows a series of calls to the MetadataAccessStoreConfigurationClient
to set up a Metadata Access Store that is using the in-memory repository and is activating the following access services.
- Asset Consumer OMAS
- Asset Owner OMAS
- Asset Manager OMAS
- Data Manager OMAS
- Digital Architecture OMAS
- Community Profile OMAS
- Governance Program OMAS
Example: Methods used to configure a Metadata Access Store
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 151 152 153 154 155 156 157 158 159 160 161 162 163 |
|
Managing configuration documents¶
The ConfigurationManagementClient
supports the retrieval of a single OMAG Server's configuration document, or all available configuration documents. It also supports the deployment of configuration documents to different OMAG Server Platforms.
Example: retrieving all available configuration documents
1 2 3 |
|
Raise an issue or comment below