We all love a product that tries to get the user to focus on the important things, by computing stuff in advance. There are certain situations where you want Rubicon Red MyST Studio to stop thinking for you, and act the exact way you instruct it to.
Even when this means it needs to do something which its creators never intended it to do in that fashion.
We are of course talking about the execution of Actions by MyST during a Phase. Sometimes the built-in order will suit you just fine, sometimes you’ll need to add steps or even prevent them from happening at all.
This blog shows the usage of a little trick in MyST to skip execution of an Action altogether.
The regular way
After MyST is done provisioning an OFMW domain, it helpfully lists the phases and sequence in which the actions have been performed in the log.
Below is an example of a successful provisioning of an OSB 12c domain.
============================================================= ============================================================= Provision phase completed. -> provision -> ensure-minimum-jdk-version -> install -> patch -> rcu -> stop-via-as -> stop-nm -> stop -> drop-db-sessions -> configure -> stop-via-as -> stop-nm -> stop -> create-domain -> fix-stop-script -> patch-domain -> start -> configure-nm -> create-resource -> configure-jca -> copy-domain -> start-nm -> start-as-via-nm -> start-via-as ============================================================= ============================================================= SUCCESS - 20 Minutes 21 Seconds
A regular provisioning consists of the provision Phase, which in turn has a few sub-phases like configure.
This configure Phase executes a bunch of actions in a certain order.
MyST Studio is not very consistent in naming these things, they are sometimes called Phases, and sometime they are called Actions. In this blog, we try to be a little bit more consistent by referring to top-level things as Phases, to second level things as sub-phases and to everything else as Actions.
Skipping an Action or Phase
Sometimes, you need to skip an entire Phase or Action as it is not applicable to your situation, or out of precaution to avoid Bad Things () from happening. (Like deleting the SOA-INFRA schema on Production during an accidental reprovisioning)
In these situations, the ability to not perform (or skip) an Action is greatly appreciated.
MyST Studio provides this functionality through the addition of an additional Global Variable to either your Platform Blueprint or your Platform Model.
You’ll just need to know the name of the Action or Phase you want to skip:
skip.<action> = true
Navigate to your Platform Blueprint or Platform Model, and find the Global Variables.
Start an Edit-session and add your skip-variable as described above.
Here, we choose to skip copying the domain home from the Admin Server location to all Managed Servers in a domain.
You’re all set now!
Upon your next provisioning of this domain, the copy-domain action is not executed.
A safeguard we built into our Platform Blueprints of OFWM domains with products that have a lot of state in the SOA-INFRA schema (like BPM and SOA Suite) is to skip the RCU step during provisioning.
This will make MyST skip the recreation (and it’s inherent deletion!) of the SOA schemas in the database. The data in these for BPM and SOA Suite is virtually impossible to recreate and also very hard to reinstate from database backups, so having an extra safeguard is always a good idea.
We just added
skip.rcu = true
to our Platform Blueprint after our last successful provisioning of the Production environment, and know that our world is a little safer.