Software AG Products 10.11 | Running Business Processes and Composite Applications | Administering My webMethods Server | Startup and Configuration | Using My webMethods Server with Docker | Running and Customizing My webMethods Server Containers | Modifying the Configuration of a Container | Container Configuration Examples
 
Container Configuration Examples
Example: Configure the Database Connection Retries for a My webMethods Server Container
To configure the database connection retries for a My webMethods Server container, supply a new mws.db.xml file from an external volume.
1. Copy the mws.db.xml from an on-premises installation or a My webMethods Servercontainer.
2. Modify the file to include the required settings for database connection retries as described in Modifying Database Connection Retries. If required, modify connection parameters such as database connection URL and user password to supply correct configuration at container start up.
3. Place the mws.db.xml file in an my_mws_config/instance_cfg directory on the host file system and mount it to the configs directory in the container on start up, as follows:
docker run
-v /home/myvm/my_mws_config:/opt/softwareag/MWS/volumes/configs
-p 8586:8585 webm107
My webMethods Server will use all settings, defined in the mws.db.xml file from the mounted host directory, unless you override a setting using the environment variables for My webMethods Server containers. Envionment variables that you supply using the Docker CLI overwrite their corresponding values in the mws.db.xml file from the mapped directory.
Example: Add Security Certificates to a My webMethods Server Container
You can add new security certificates to the container JRE when starting up a new My webMethods Server container. The high-level steps for adding security certificates are as follows:
1. Modify the cacerts file to add the new certificates using the keytool command on an on-premises installation that has the new certificates, or in a container that has access to the new certificate files, then extract the updated cacerts file.
2. On the host file system, create a dedicated directory that matches the following pattern: my_mws_config/jvm_cfg/lib/security/, and place the updated cacerts file in that directory.
3. Run the container with the my_mws_config directory, mapped to the configs directory on the container file system, as follows:
docker run
-e DB_URL="jdbc:wm:sqlserver://dbhost:1439;databaseName=MWSDOCKER;user=wmuser;password=manage"
-e DB_TYPE=ms
-v /home/myvm/my_mws_config:/opt/softwareag/MWS/volumes/configs
-p 8585:8585 webM107
The sample command creates a My webMethods Server container from the webM107 image. The container uses an MS SQL server database with the name MWSDOCKER and has additional security certificates supplied through the /home/myvm/my_mws_config/jvm_config/lib/security directory on the host file system.
Example: Configure Single Sign-on for a My webMethods Server Container
The following example provides high-level steps for configuring sinle sign-on with a third-party identity provider for a My webMethods Server instance running in a Docker container, using the system-wide CA certificate store cacerts as the SSO keystore. The instructions assume that you are familiar with Docker networking and have configured your Docker environment. For more information about container networking, see the Docker documentation.
1. Start a container from the same image that you plan to use for running My webMethods Server containers with single sign-on.
Note:
This step is required in order to acquire and modify the configuration files for My webMethods Server. However, since starting a My webMethods Server container initializes the My webMethods Server database, you must either start the container with another database instance, or change the container entrypoint with the docker run command. For more information about container entrypoints, see the Docker documentation.
2. Navigate to the /opt/softwareag/MWS/bin directory of the running container and execute sh mws.sh getconfig fileName to retrieve the cluster.xml, and the websso.properties files.
3. Modify the cluster.xml file to expose an HTTPS port for My webMethods Server and place it in a my_mws_config/cluster_cfg/ directory on the host file system.
4. Add the security certificate of the external IDP by modifying the cacerts file with the keytool command, then extract the updated cacerts file. If your container does not have access to the new certificate file(s), perform this step in advance on an on-premises installation that has the new certificates.
5. On the host file system, create a dedicated directory that matches the following pattern: my_mws_config/jvm_cfg/lib/security/, and place the updated cacerts file in that directory.
6. Modify the websso.properties file with the required properties and place it in a my_mws_config/instance_cfg/ directory on the host file system. For more information, see Setting Properties in the websso.properties File.
Tip:
To apply the configuration cluster-wide, place the websso.properties file in a my_mws_config/cluster_cfg/ directory.
7. Run the container and map the parent directory my_mws_config that contains all directories with custom configuration files to the configs directory on the container file system, as follows:
docker run
-e DB_URL="jdbc:wm:sqlserver://dbhost:1439;databaseName=MWSDOCKER;user=wmuser;password=manage"
-e DB_TYPE=ms
-v /home/myvm/my_mws_config:/opt/softwareag/MWS/volumes/configs
-p 8585:8585 webM107
On startup, My webMethods Server generates an SPMetadata.xml and an IDPMetadata.xml files in the /opt/softwareag/MWS/server/instanceName/config/ directory in the container.
8. Complete the configuration by registering My webMethods Server with the external identity provider using the xml files, generated on the previous step. For more information, see Configuring Single Sign-On for Using a Third-Party Identity Provider.
9. Restart the My webMethods Server container.