X

Best Practices from Oracle Development's A‑Team

OCI Designer Toolkit Resource Manager Integration

As part of the OCI Designer Toolkit (OKIT) series we will look at how OKIT integrates with OCIs Resource Manager to create Resource Manager stacks, apply those stacks and update them.

Resource Manager

OKIT enables the user to export to Terraform or Ansible allowing DevOps to integrate into their currently established Infrastructure as Code workflow. One of the more interesting options is OKIT's ability to integrate with OCIs Resource Manager. This integration allows non-DevOps users to build the solutions they have designed and subsequently modify them as required. This merges the power of OKIT design with the strength of Resource Manager.

Creating

We will show a simple deployment example, below, which includes a Load Balancer and two Instances provisioned in a single public Subnet all within a Virtual Cloud Network.

Now that our model is complete we can export this to Resource Manager using the Menu Option Export -> Resource Manager which will cause the "Export to Resource Manager" Dialog to be displayed.

 

Export Dialog

The export dialog allows you to configure the destination and the type of action to be performed.

  • Connection Profile: Select a connection profile defined in the OCI API configuration file and attached to the OKIT server as described in the Installation Guide.
  • Region: Region where the Stack / Resources will be created.
  • Compartment: Root compartment to be used for creating the resources defined in the model.
  • Create / Update: Toggle to indicate if we are creating a new Resource Manager Stack or updating and existing Stack.
  • Stack Name: Name of the Stack to be created. If Update has been selected this will be a drop-down containing the names of all Stacks in the chosen Region/Compartment.
  • Plan / Apply: This options indicate if we should simply Plan the job in Resource Manager or Apply it as well.

Create Action

Having selected the Create Action from the dialog and specifying the Stack Name as "Simple Loadbalancer" we can see from the images below that OKIT will create a new Resource Manager Stack, in the chosen compartment, and within this an apply job. When the Apply completes all the modelled resources will have been created.

Updating

Now that we have successfully created our simple load balancer implementation we can modify the diagram, in this case adding two additional instances, to represent our new requirements. Once we have completed the modifications we can initiate the export to Resource Manager to display the dialog. 

At this point we need to change the export action to "Update" which will display all the stacks that exist in the chosen region / compartment. We will then select the existing "Simple Loadbalancer" stack and Update.

Update Action

We can see from the image below that the update action will not create a new stack but rather add a new job to the existing stack and run it. On completion you can see that our system has been updated to create two new instances that are linked to the existing Load Balancer.

 

Future Posts

The screenshots in this article are based off of OKIT v0.9.0 released in August of 2020.  OKIT remains under active development and is available on GitHub. New features are added with each release and we will be continuing to posts on more advanced OKIT features including Fragments and building Reference Architecture templates.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha