Following on from the Introduction to OKIT the The OCI Designer Toolkit blog post we will investigate the Template functionality; what's currently available and how the user can create their own templates and include these within OKIT.
The OKIT concept of Templates is a predefined architecture that can be used as a reference for creating your own architecture. These can be opened, modified and subsequently saved as your own implementation.
All the currently available templates known to OKIT can be accessed through the Hamburger menu and moving the mouse over this will display all the menu options. It can be seen that we have a specific section labeled Template which contains a number sub-menu groupings.
The sub menus are dynamically created and at the time of writing we current have three sub menus (groups) for our templates and each act as a slide-out menu.
The "Reference Architecture" sub-menu will be enhanced with each OKIT release and will contain OKIT implementation of the Reference Architectures defined within the Oracle Architecture Center.
Selecting a template (e.g. Load Balanced Nginx Instances) from the menu will cause the template to be drawn on the Canvas ready for user customisation.
Here we can add an Instance and configure the Load Balancer to access this before exporting to my chosen DevOps language and build within OCI.
Although OKIT ships with a number of templates these may not cover all the needs of the user and therefore OKIT provides the ability to build and save custom templates. Creating a custom template is as simply as designing an architecture and then simply saving as a template. We will work through a short example which will create a simple Load Balancer front-ending a pair of Instances
Select "New" from the menu and Use the Drag & Drop features of OKIT to create the following architecture.
Once created we are now in a position to Save the diagram as a reusable template.
To save your design as a template you will simply need to select the menu item "Save -> Save As Template"
This will cause the Save As Template dialog to be displayed and the user will need to enter the following information.
Selecting Save will cause the template to be written and then next time the page is refreshed the new template will appear in the menu.