Deploying app and agent servers
After the database is populated for multischema, you must configure the app and agent servers to use the database.
Procedure
- Deploy the agent servers to enable multischema. The following step is required only if
you use the OOB images. If you customize the images, the images already come with multischema
enabled.
- Pass the following property to the
customer_overrides.properties
.si_config.multischema.enabled=true
- Pass the following property to the
- Deploy app servers to enable multischema by completing the following steps.
- Create your custom
server.xml
as shown in the following example.<server description="Default server"> <featureManager> <feature>adminCenter-1.0</feature> <feature>jdbc-4.1</feature> <feature>jndi-1.0</feature> <feature>jsp-2.3</feature> <feature>servlet-3.1</feature> <feature>ssl-1.0</feature> <feature>monitor-1.0</feature> <feature>localConnector-1.0</feature> </featureManager> <basicRegistry id="basic"> <user name="admin" password="${env.consoleAdminPassword}" /> <user name="nonadmin" password="${env.consoleNonAdminPassword}" /> </basicRegistry> <administrator-role> <user>admin</user> </administrator-role> <sslDefault sslRef="defaultSSLSettings" /> <variable name="LIBERTY_HTTP_PORT" defaultValue="9080" /> <variable name="LIBERTY_HTTPS_PORT" defaultValue="9443" /> <variable name="LIBERTY_CORE_THREADS" defaultValue="20" /> <variable name="LIBERTY_MAX_THREADS" defaultValue="100" /> <variable name="LIBERTY_DS_MIN_POOLSIZE" defaultValue="10" /> <variable name="LIBERTY_DS_MAX_POOLSIZE" defaultValue="50" /> <variable name="LIBERTY_LOG_DIR" defaultValue="${server.output.dir}/logs" /> <variable name="MESSAGE_FILE_NAME" defaultValue="messages.log" /> <variable name="TRACE_FILE_NAME" defaultValue="trace.log" /> <variable name="OIDC_SCOPE" defaultValue="openid email" /> <ssl id="defaultSSLSettings" sslProtocol="TLSv1.2" keyStoreRef="defaultKeyStore" trustStoreRef="defaultTrustStore" clientAuthenticationSupported="true" serverKeyAlias="" /> <keyStore id="defaultKeyStore" location="${server.config.dir}/tls.p12" type="PKCS12" password="${env.keyStorePassword}" /> <keyStore id="defaultTrustStore" location="${server.config.dir}/tls.p12" type="PKCS12" password="${env.keyStorePassword}" /> <httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="${LIBERTY_HTTP_PORT}" httpsPort="${LIBERTY_HTTPS_PORT}" /> <executor name="Default Executor" coreThreads="${LIBERTY_CORE_THREADS}" maxThreads="${LIBERTY_MAX_THREADS}" /> <!-- Datasources for multischema - START --> <dataSource id="DefaultDataSource" jndiName="jdbc/OMDS"> <jdbcDriver libraryRef="dblib" /> <connectionManager maxPoolSize="${LIBERTY_DS_MAX_POOLSIZE}" minPoolSize="${LIBERTY_DS_MIN_POOLSIZE}" /> <properties.postgresql databaseName="<Database Name>" serverName="<Database Host>" portNumber="Database Port" user="oms_meta" password="${env.dbPassword}" currentSchema="oms_meta" /> </dataSource> <dataSource id="MetaDataSource" jndiName="jdbc/oms_meta"> <jdbcDriver libraryRef="dblib" /> <connectionManager maxPoolSize="${LIBERTY_DS_MAX_POOLSIZE}" minPoolSize="${LIBERTY_DS_MIN_POOLSIZE}" /> <properties.postgresql databaseName="<Database Name>" serverName="<Database Host>" portNumber="Database Port" user="oms_meta" password="${env.dbPassword}" currentSchema="oms_meta" /> </dataSource> <dataSource id="StatDataSource" jndiName="jdbc/oms_stat"> <jdbcDriver libraryRef="dblib" /> <connectionManager maxPoolSize="${LIBERTY_DS_MAX_POOLSIZE}" minPoolSize="${LIBERTY_DS_MIN_POOLSIZE}" /> <properties.postgresql databaseName="<Database Name>" serverName="<Database Host>" portNumber="Database Port" user="oms_stat" password="${env.dbPassword}" currentSchema="oms_stat" /> </dataSource> <dataSource id="ConfDataSource" jndiName="jdbc/oms_conf"> <jdbcDriver libraryRef="dblib" /> <connectionManager maxPoolSize="${LIBERTY_DS_MAX_POOLSIZE}" minPoolSize="${LIBERTY_DS_MIN_POOLSIZE}" /> <properties.postgresql databaseName="<Database Name>" serverName="<Database Host>" portNumber="Database Port" user="oms_conf" password="${env.dbPassword}" currentSchema="oms_conf" /> </dataSource> <dataSource id="TranDataSource" jndiName="jdbc/oms_tran"> <jdbcDriver libraryRef="dblib" /> <connectionManager maxPoolSize="${LIBERTY_DS_MAX_POOLSIZE}" minPoolSize="${LIBERTY_DS_MIN_POOLSIZE}" /> <properties.postgresql databaseName="<Database Name>" serverName="<Database Host>" portNumber="Database Port" user="oms_tran" password="${env.dbPassword}" currentSchema="oms_tran" /> </dataSource> <dataSource id="MstrDataSource" jndiName="jdbc/oms_mstr"> <jdbcDriver libraryRef="dblib" /> <connectionManager maxPoolSize="${LIBERTY_DS_MAX_POOLSIZE}" minPoolSize="${LIBERTY_DS_MIN_POOLSIZE}" /> <properties.postgresql databaseName="<Database Name>" serverName="<Database Host>" portNumber="Database Port" user="oms_mstr" password="${env.dbPassword}" currentSchema="oms_mstr" /> </dataSource> <!-- Datasources for multischema - END --> <library id="dblib"> <fileset dir="/opt/ibm/jars/" includes="*.jar" /> <fileset dir="${server.config.dir}/dropins/smcfs.ear/lib/" includes="*.jar" /> <fileset dir="${server.config.dir}/dropins/smcfs.ear/" includes="*.jar" /> </library> <logging hideMessage="SRVE9967W, CWWKO0221E, SRVE9968W, JSPG8502I, SRVE8094W, SESN0172I, SESN0176I, SESN8501I, JSPG8502I, CWWKZ0022W, SRVE9103I, CWWKF0007I, CWWKF0008I, CWWKE0100I, SRVE0169I, SRVE0250I, SRVE0190E, SRVE0242I, FFDC1015I, SRVE0777E, CWNEN0047W, CWWKZ0117E, CWWKO0219I, CWWKO0220I, CWWKE0002I" maxFileSize="64" consoleLogLevel="INFO" logDirectory="${LIBERTY_LOG_DIR}" messageFileName="${MESSAGE_FILE_NAME}" traceFileName="${TRACE_FILE_NAME}" /> <httpSession useContextRootAsCookiePath="true" cookieSecure="true" /> <applicationManager autoExpand="true" /> <!--OPENID_START_ <featureManager> <feature>transportSecurity-1.0</feature> <feature>openidConnectClient-1.0</feature> </featureManager> <openidConnectClient id="${OIDC_PROVIDER}" clientId="${OIDC_CLIENTID}" clientSecret="${OIDC_SECRET}" discoveryEndpointUrl="${OIDC_DISCOVERYURL}" scope="${OIDC_SCOPE}" redirectToRPHostAndPort="${OIDC_REDIRECT_TO_RP_HOST_PORT}" trustAliasName="${OIDC_TRUST_ALIAS_NAME}" httpsRequired="true" signatureAlgorithm="RS256" authFilterRef="myAuthFilter"/> <authFilter id="myAuthFilter"> <requestUrl id="bypass1" urlPattern="/restapi|/heartbeat|/MQConnVerifierServlet|/restapi_internal|/servlets/scwcsoapservlet|/wms/error|/console/ibmid|/interop/InteropHttpServlet|/smcfsdocs" matchType="notContain" /> <requestUrl id="myURL" urlPattern="/sbc|/isccs|/wsc|/sfs|/sma|/smcfs|/isf|/icc" matchType="contains" /> </authFilter> <application context-root="smcfs" type="ear" id="smcfs" name="smcfs" location="/config/dropins/smcfs.ear"> <application-bnd> <security-role name="All Role"> <special-subject type="ALL_AUTHENTICATED_USERS" /> </security-role> <security-role name="ExcludeAuth"> <special-subject type="EVERYONE" /> </security-role> </application-bnd> </application> <applicationMonitor dropinsEnabled="false" /> _OPENID_END--> </server>
- Create a configMap for your custom
server.xml
and use it as shown in the following example.- name: apps appServer: libertyServerXml: <configMap name of your custom server.xml>
- Create your custom