Oracle OCI Resource Manager Discovery.

If you work with Terraform, you are quite familiar with the situation when a lot of resources have already been deployed manually. What options do we have in such a case? The first one is to use the native Terraform Resource Discovery and create the state file, which can be imported to your enterprise configuration. But if you plan to use Resource Manager in OCI, you can use the new Resource Manager Discovery feature. It creates a stack discovering your resources in a compartment.
Let’s see how it works. In my Ashburn region, I have a regional network with private and public subnets, three compute instances, and a MySQL database. All the resources were deployed manually from the console or command line without using OCI Resource Manager.

Now I am going to the Resource manager page and push the button “Create Stack”.

When you do that, you have four options, and the last one is to create a stack from the existing configuration using already deployed resources.

You can choose whether you want all services in the compartment or only a specific subset of resources. It would be nice to choose based on the compartment and tags, but it is not an option for now. Also, please be aware the sub-compartments are not going to be included.

Then you push next, next again and finally, after pushing the “Create” button, you are going to get running Oracle Resource Manager stack with all your selected resources in the compartment. That can be an excellent first step in adopting Infrastructure as Code (IaC) approach in your environment.

For those who are just started with Terraform and Resource Manager, it can be a good training material and syntax template. You can download the zip file with the terraform configuration, modify it, zip it back, and edit the stack by pushing the “Edit Stack” button to upload the new configuration.

If you have a look inside the zip file, you will see normal terraform files that could be used as a basis for your future Resource Manager deployment. The zip file contains a dedicated “*.tf” file for each group of resources. I don’t have most of them, and as a result, many “tf” files are empty.

otochkin$ ll
total 328
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 analytics.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 apigateway.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 auto_scaling.tf
-rw-rw-r--@ 1 otochkin  staff   462B 12 Aug  2020 availability_domain.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 bds.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 containerengine.tf
-rw-rw-r--@ 1 otochkin  staff    18K 12 Aug  2020 core.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 data_safe.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 database.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 datacatalog.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 dataflow.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 dataintegration.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 datascience.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 dns.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 email_compartment.tf
-rw-rw-r--@ 1 otochkin  staff   999B 12 Aug  2020 events.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 file_storage.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 functions.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 health_checks.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 integration.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 kms.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 load_balancer.tf
-rw-rw-r--@ 1 otochkin  staff   1.8K 12 Aug  2020 marketplace.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 monitoring.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 mysql.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 nosql.tf
-rw-rw-r--@ 1 otochkin  staff   1.5K 12 Aug  2020 object_storage.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 oce.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 ocvp.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 oda.tf
-rw-rw-r--@ 1 otochkin  staff   648B 12 Aug  2020 ons.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 osmanagement.tf
-rw-rw-r--@ 1 otochkin  staff    38B 12 Aug  2020 provider.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 streaming.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 tagging.tf
-rw-rw-r--@ 1 otochkin  staff   596B 12 Aug  2020 vars.tf
-rw-rw-r--@ 1 otochkin  staff    63B 12 Aug  2020 waas.tf
 
 
otochkin$ cat apigateway.tf
## This configuration was generated by terraform-provider-oci

Most of the resources are concentrated in the “core.tf” file where we can see all compute instances and other resources, including network and database.

otochkin$ cat core.tf
## This configuration was generated by terraform-provider-oci
 
resource oci_core_instance export_app-forms-01 {
  agent_config {
    is_management_disabled = "false"
    is_monitoring_disabled = "false"
  }
  availability_domain = data.oci_identity_availability_domain.export_gwmA-US-ASHBURN-AD-1.name
  compartment_id      = var.compartment_ocid
  create_vnic_details {
    assign_public_ip = "true"
    defined_tags = {
...

I think the new feature is one of the key improvements that help administrators adopt the automated deployment and management framework. The next blog is about using version control for your terraform in the Oracle cloud. Stay tuned.

Is Oracle cloud only for Oracle?

Several days ago, discussing public cloud solutions and competition between different providers, one of the people mentioned that Oracle Cloud is just for Oracle products. At the same time, AWS and Azure are more vendor agnostic. I was a bit surprised by that statement but it appeared that several other people shared the same view. I decided to write the blog and show what options Oracle Cloud Infrastructure (OCI) has for different workloads.

Let’s start with the VM types and flavors. Of course, by default, you are offered Oracle Linux but if you push the “Change Image Source” button:

You are going to see several different options for the platform, including Oracle Linux, Ubuntu, Centos, and various Windows server versions.

Those are the primary platform images for VM, but in addition, you have Oracle built images with different sets of software included, free and with Bring Your Own License (BYOL) policies.

Then we have the partner’s images on the next tab, and there we can find some other Linux distributions like SUSE and prebuilt software images like Jenkins from Bitnami.

If you need to build your own image with custom software and settings, you can create a custom image from your Linux or Windows-based VM, which may be an on-premises or cloud image. In my opinion, this should cover most of the requirements for the necessary VM infrastructure services. I am not discussing other aspects like network and storage here since they are not too much different in functionality presented by other cloud vendors.

If you haven’t found what you need or want some certified software deployment, you can go to the Oracle Cloud Marketplace and choose from multiple available packages, including Oracle and non-Oracle vendors.

We have several filters for the publisher, category, type, and price but no free search area. I hope the search option will be added there.

Here is a subset of publishers.

All the images from the Marketplace are certified by Oracle and prepared for deployment using Oracle Resource Manager (RM). The RM itself is using HashiCorp Terraform scripts behind the scenes. Terraform is one of the most popular deployment tools in the community, and, in my opinion, it is better than a proprietary solution. You can adopt a unified approach for a multi-cloud environment without locking yourself to a single vendor’s platform.

If you work with Docker and Kubernetes and want to build and deploy your custom microservices architecture, the Oracle Cloud Developer services are here to help. The Oracle registry is for your Docker images, and Oracle Kubernetes Engine (OKE) for the Kubernetes cluster is here to help you to deploy the applications.

So far, we were talking about native OCI tools and resources but it doesn’t end there. With the Oracle and Microsoft partnership in the cloud, we can expand our footprint and combine both clouds. I was testing it in July 2019 and wrote a blog about it. It was quite easy to set it up, and it showed acceptable performance. At that time, it was available only in the US Virginia region, but now it is available in Canada and the UK , and hopefully other areas soon. It opens new possibilities to incorporate your company strategy and place products to the most suitable cloud environment. For example, if you want to build an MS SQL database solution, you have two choices – use Azure with interconnect link to OCI or deploy a Windows server in OCI and put your database there.

So, is Oracle Cloud only for Oracle products? Of course not. Oracle public cloud offerings on infrastructure are pretty much comparable to any other public cloud providers and offer a flexible environment to deploy your application and, if you want, your preferred database solution as well.