Start sequence

Regardless of plattform start sequence looks the same. Server uses the bundled JRE located under <phenixid server root>/jre. Status of start sequence can be found in server.log.

Initial load - from bootstrap file

On startup PhenixID server locates and load the bootstrap file, boot.json. Modules defined in boot.json is loaded and started on the current node.

Failing to parse, load or start module will result in shutdown. Cause of startup failure is logged in log file.

The modules are loaded from the directories /mods and /modsoverlay. The directory /modsoverlay is overlayed on top of the directory mods which allows for easy application of customizations and upgrades. When all modules are successfully started PhenixID server proceed to loading node specific configuration.

Additional load - from configuration store

After initial load PhenixID server node verifies access to the configuration store where it tries to find it self. If not found the node creates an entry using the hostname as the key.  

If node entry is found the node runs through the list of modules it has assigned and tries to load and start the module.

Load or start failure will result in shutdown.

The modules are loaded from the directories /mods and /modsoverlay. The directory /modsoverlay is overlayed on top of the directory mods which allows for easy application of customizations and upgrades. When all modules are successfully started PhenixID server startup is complete.

Since the boot process is asynchronous the start sequence may behave differently between startups due to external factors such as network speed or external database speed.  

Modules

No modifications should be done in the mods directory. The system will overlay the content of the modules inside modsoverlay on top of the modules inside mods. If a file exist with the same relative path in both mods and modsoverlay, the file in modsoverlay will be used used.

Example:

  • Original file path: mods\com.phenixidentity~phenix-prism-enroll-pki\templates\main.hbs
  • This file should not be modified, however a modified copy can be placed at:
  • Modified file path: modsoverlay\com.phenixidentity~phenix-prism-enroll-pki\templates\main.hbs

In some scenarios, a full copy of a module was done in order to make certain modifications apply only to a specific scenario, for example for One Touch deployment. This should not be done anymore, instead it's now possible to create a new module inside the modsoverlay directory that inherits an existing module, only applying the files in the new module on top of the base module. What module to inherit is controlled using the file mod.json, and the property "inherits".

Example:

  • Original module name: com.phenixidentity~phenix-prism-enroll-pki
  • Original module path: mods\com.phenixidentity~phenix-prism-enroll-pki
  • Create new directory: modsoverlay\com.phenixidentity~phenix-prism-enroll-pki~my-custom-copy
  • Create new file: modsoverlay\com.phenixidentity~phenix-prism-enroll-pki~my-custom-copy\mod.json with the content:
{
  "inherits": "com.phenixidentity~phenix-prism-enroll-pki"
}
  • Make the modifications in: modsoverlay\com.phenixidentity~phenix-prism-enroll-pki~my-custom-copy