Monday, September 11, 2023

Oracle Analytics Cloud : Set up and configure Oracle Analytics Cloud environments using Terraform

Oracle Analytics Cloud (OAC) is a single and complete platform that empowers your entire organization to ask any question of any data, across any environment, on any device. It fits into your ecosystem, enabling analysis in the cloud while also providing easy access to any data source. The result? The best use of all your data, no matter where it is.  Oracle Analytics Cloud provides a variety of options for intelligent analysis without being overwhelming to deploy and manage, making it an effective way to engage more people in analysis and extend your organization’s expertise.

When you first deploy OAC, you have a choice: either you can provision and configure your OAC environment manually, or you can use Terraform to create and maintain your OAC environment. Terraform is an infrastructure-as-code tool that allows you to build, change, and version your infrastructure using code techniques. It will enable you to set up configuration files to define your applications or infrastructure and store your infrastructure's state to modify or update. You can use Terraform to create and maintain multiple OAC environments. Not only will it automate the manual steps of deployment, but it will also allow the consistent rollout of additional OAC instances as needed.

This blog uses OAC with a private end point as a sample architecture to describe how to create and setup these resources with Terraform. Based on your requirements, you can update the Terraform script to add or update network resources such as VCNs, subnets, routing tables, security lists, etc.

Oracle Analytics Cloud, Oracle Database Certification, Oracle Database Prep, Oracle Database Preparation, Oracle Database Career, Oracle Database Skills, Oracle Database Jobs

For the above architecture, you will perform the following tasks with Terraform:

  • Setup OCI network resources for the OAC private endpoint (PE) environment.
  • Create a VCN, a public subnet for the Bastion Host, and two separate private subnets for the database and OAC.
  • Oracle Autonomous Database (ADB) will be provisioned with the given configuration.
  • An OAC instance with a private access channel (PAC) will be provisioned with the provided configuration.
  • PAC egress IPs will be configured in the security list of the database private subnet (to establish connectivity between OAC and ADB).
  • A Bastion host will be setup to access private subnet resources, e.g., ADB and OAC, for maintenance purposes.( Bastion Host is a compute instance to access private network resources from an external network such as the Internet).
  • The required routing and security rules will be configured so that the environment is ready to use.

Terraform Artifacts


These are the Terraform scripts that are provided in the "Deployment Scripts" section.

  • Variable.tf — Terraform variable file which contains all variable definitions.
  • Config.tf—Terraform Config file which contains all variable values. Variables are grouped into different categories, e.g., VCN, Subnet, ADB etc., and are self-explanatory. The sample values provided in the attached file are just an example.
  • Deployment.tf — Terraform resource file for the OCI environment, which will set up all network resources (including VCN and subnets) and provision all PaaS components such as the Autonomous database, OAC, private access channel, and Bastion host. (For your reference, a Terraform resource for Oracle Database VM has also been provided as commented section in Deployment.tf).

How to Use these Terraform artifact


Prerequisites: Terraform should be installed on the machine where you are planning to execute these scripts.

  • Make a directory on your machine where Terraform is installed.
  • Copy Variable.tf, Config.tf, and Deployment.tf files into the directory.
  • Provide all the values required in Config.tf for provider, VCN, subnets, and PaaS resources.
  • Set resource_suffix_dev as “Dev” or “Test," as this will be used in all resource names, e.g., Dev_Public_Subnet. You can change it based on your naming specifications.
  • Execute " terraform plan -var-file=config.tfvars"
  • Execute " terraform apply -var-file=config.tfvars "

Oracle Analytics Cloud, Oracle Database Certification, Oracle Database Prep, Oracle Database Preparation, Oracle Database Career, Oracle Database Skills, Oracle Database Jobs
Execution of Terraform Script

Output: all network resources (VCN, Internet GW, Service GW, Nat GW, Subnets, Route Tables, Security Lists) and all PaaS components (OAC, PAC, ADB, and Bastion host) will be deployed for the OAC environment.

Test OAC Connectivity with Oracle Autonomous Database


Once the Terraform deployment completes, you can test the connectivity of OAC with your ADB instance. Please follow these steps to make OAC connection with ADB. 

◉ Log in to your OAC Instance.
◉ In the upper right corner, click the “Create” button and select Oracle Autonomous Data Warehouse Cloud.
◉ Enter the details as shown in the example by filling in the connection name, your username and password, and by uploading the ADB Wallet.zip file.
◉ Click Save.
◉ ( To download ADB wallet - 1. Navigate to Oracle Autonomous Database instance 2. click Database connection, 3. Under wallet type, make sure Instance Wallet is selected and then click Download wallet 4. Enter a wallet Password and click Download)

Oracle Analytics Cloud, Oracle Database Certification, Oracle Database Prep, Oracle Database Preparation, Oracle Database Career, Oracle Database Skills, Oracle Database Jobs

Oracle Analytics Cloud, Oracle Database Certification, Oracle Database Prep, Oracle Database Preparation, Oracle Database Career, Oracle Database Skills, Oracle Database Jobs

Download Terraform artifacts from Github


You can download Terraform Artifacts from this GitHub Repository.


Source: oracle.com

Related Posts

0 comments:

Post a Comment