Deploy time customizations for an OSB project
Last updated
Last updated
When developing Oracle Service Bus (OSB) services there are scenarios where OSB customization files cannot be used but you require environment specific customizations. This article extends the MyST Configuration Plans documentation to give examples of how to:
Change 'HTTPS required' from 'false' to 'true'
Change 'Authentication' from 'None' to 'Client Certificate'
Attach or detach an OWSM Policy
MyST Studio release pipelines have been setup
Artifact builds are publishing to MyST Studio via the MyST Jenkins Plugin or MyST Transport JAR
Create an OSB project which contains code for 'HTTPS required', 'Authentication', and 'OWSM Policy'. This ensures the code is created because default options are generally not included in the code.
'HTTPS required' and 'Authentication'
'OWSM Policy'
A myst configuration plan must be used. You can define the myst configuration plan in pom.xml
:
Create a MyST Configuration Plan as follows. Take note of the following elements:
include
is a wildcard of files processed by the myst config plan
fileset
is file in which myst applies the myst config plan
replace
is a property variable which can be customized per environment in the Stream Model
Artifact Property Registry
After building the application you should see the property variables in the Artifact Property Registry.
Go to Release Management > Artifact Property Registry
Define the defaults normally used for non-production as seen below.
Click Save
NOTE: The _REMOVE_ value tells MyST to remove the node from the OSB code. When setting 'HTTPS required' to false you do not need the 'Authentication' code.
Stream Model
Here you can define the property variable.
Go to Release Pipeline > YOUR_PIPELINE
Click the cog for the Platform Model
For non-production environments you can use the default values by typing or pressing the default values icon.
For production environments you will use the opposite values. ProxyClientAuth needs to be empty so MyST does not make any changes.
Deployment
Lastly the artifact can be deployed.
In case of issues you can look at the logs to see how the myst config plan was applied.
The logs of interest are:
Trying to apply configuration plan
indicates the myst config plan is attempting to be applied
Number of sub-resources matched - 1
indicates one file has been found to apply the myst config plan.
Substitution count, Total - 3, Successful - 3
indicates our 3 (out of 3) myst config plan searches and replaces were successful
Click Edit
Select Open Stream Model
Click the cog then click Deploy Release and to see a deployment summary
Click Deploy