Explore More

Learn more about Oracle Cloud Infrastructure (OCI) and PeopleSoft. See Best practices framework for Oracle Cloud Infrastructure.

Review the following Oracle Cloud Infrastructure documentation resources:

Review the following for an introduction to Oracle Database high availability products, features, and best practices:
Learn more about PeopleSoft:

For installation and configuration of the command-line interface version of Terraform, see: Terraform Provider.

Working with Terraform

Terraform Discovery will discover the definitions of resources within a compartment at the primary region. You can access Terraform Discovery from the OCI Console. It will create a Terraform stack, held in a downloadable ZIP file.

This example has several subnets, each with one or more security lists, with a few complex security lists containing dozens of ingress rules. For this case study, we chose to use Terraform to discover, then replicate, the resources in the network compartment.

Terraform discovered the following network components:
  • Virtual Cloud Network (VCN)
  • Gateways (Internet, NAT and Service gateways)
  • Route tables
  • Security lists
  • Subnets

Run Terraform Discovery

Run Terraform Discovery to create a Terraform stack and download the ZIP file.

  1. Log in to the OCI Console.
  2. Change the region to the primary region.
  3. Click Development Services in the main menu.
  4. Under Resource Manager, click Stacks.
  5. Click Create Stack.
  6. Select Existing Compartment: Create a stack that captures resources from the selected compartment (resource discovery).
  7. Select the compartment to discover resources from.
    In Compartment for Resource Discovery, expand the root to get the full list of compartments. For example, the network compartment.
  8. Select the OCI primary region in Region for Resource Discovery.
  9. Select All for Terraform Provider Services.
  10. Enter a name and description for the ZIP file that will be created.
  11. Select the compartment in which to create the stack.
  12. Click Next twice.
    The Review page displays. Review and make changes, if needed.
  13. Click Create.
    When the stack creation job completes, the stack will appear in the compartment that you selected.
  14. Click the link for the stack.
    The stack details page is displayed.
  15. Click the Download link on the Terraform Configuration to download the stack ZIP file to your local computer.
  16. Save the ZIP file to a directory and unzip the file.

Edit the Terraform Files

When you unzip the stack ZIP file, you'll find several Terraform files in JSON format, ending with .tf. The contents of the .tf files depends on what resources are discovered within the compartment. You must make changes to the .tf files. For example, export_ is added to all resource definitions, and must be removed. When working with network discovery, you must also assign a different and non-overlapping CIDR block, provide a new display name, provide a different DNS label, and provide a different VCN reference.

Most of the resource definitions are found in the core.tf JSON file.

Note:

Before making changes to the .tf files, we recommend you back them up.

The following table shows examples of Terraform definitions from the primary region and the changes needed for the secondary region.

Resource Type Primary Region Definition (Ashburn) Modifications for Secondary Region (Phoenix)
Virtual Cloud Network
resource oci_core_vcn export_iad-cloudmaa-vcn {
  #cidr_block = <<Optional value not found in discovery>>
  cidr_blocks = [
    “10.0.0.0/16”,
  ]
  compartment_id = var.compartment_ocid
  defined_tags = {
  }
  display_name = “iad-cloudmaa-vcn”
  dns_label    = “iadcloudmaavcn”
  freeform_tags = {
  }
  #is_ipv6enabled = <<Optional value not found in discovery>>
}
Required modifications include removing export_, assigning a different non-overlapping CIDR, display name, and changing the DNS label:
resource oci_core_vcn phx-cloudmaa-vcn {
  #cidr_block = <<Optional value not found in discovery>>
  cidr_blocks = [
    “10.10.0.0/16”,
  ]
  compartment_id = var.compartment_ocid
  defined_tags = {
  }
  display_name = “phx-cloudmaa-vcn”
  dns_label    = “phxcloudmaavcn”
  freeform_tags = {
  }
  #is_ipv6enabled = <<Optional value not found in discovery>>
}
NAT Gateway
resource oci_core_nat_gateway export_iadmaa-ngwy {
  block_traffic  = “false”
  compartment_id = var.compartment_ocid
  defined_tags = {
  }
  display_name = “iadmaa-ngwy”
  freeform_tags = {
  }
  public_ip_id = “ocid1.publicip.oc1.iad.aaaaaaaagwkvnlh6y4irjubj63dm36mdsuig6zbc2oakgmssvifpprvx6kzq”
  vcn_id       = oci_core_vcn.export_iad-cloudmaa-vcn.id
}
Modifications include removing export_, changing the display name, and VCN reference.
resource oci_core_nat_gateway phxmaa-ngwy {
  block_traffic  = "false"
  compartment_id = var.compartment_ocid
  defined_tags = {
  }
  display_name = "phxmaa-ngwy"
  freeform_tags = {
  }
  public_ip_id = "ocid1.publicip.oc1.iad.aaaaaaaagwkvnlh6y4irjubj63dm36mdsuig6zbc2oakgmssvifpprvx6kzq"
  vcn_id       = oci_core_vcn.phx-cloudmaa-vcn.id
}
Route Table
resource oci_core_route_table export_iad-db-private-RT {
  compartment_id = var.compartment_ocid
  defined_tags = {
  }
  display_name = "iad-db-private-RT"
  freeform_tags = {
  }
  route_rules {
    #description = <<Optional value not found in discovery>>
    destination       = "0.0.0.0/0"
    destination_type  = "CIDR_BLOCK"
    network_entity_id = oci_core_nat_gateway.export_iadmaa-ngwy.id
  }
  vcn_id = oci_core_vcn.export_iad-cloudmaa-vcn.id
}
Modifications include removing export_, changing the name of the route table, display name, and VCN reference.
resource oci_core_route_table phx-db-private-RT {
  compartment_id = var.compartment_ocid
  defined_tags = {
  }
  display_name = "phx-db-private-RT"
  freeform_tags = {
  }
  route_rules {
    #description = <<Optional value not found in discovery>>
    destination       = "0.0.0.0/0"
    destination_type  = "CIDR_BLOCK"
    network_entity_id = oci_core_nat_gateway.phxmaa-ngwy.id
  }
  vcn_id = oci_core_vcn.phx-cloudmaa-vcn.id
}
Security List
resource oci_core_security_list export_iad-db-private-seclist {
  compartment_id = var.compartment_ocid
  defined_tags = {
  }
  display_name = "iad-db-private-seclist"
  egress_security_rules {
    #description = <<Optional value not found in discovery>>
    destination      = "0.0.0.0/0"
    destination_type = "CIDR_BLOCK"
    #icmp_options = <<Optional value not found in discovery>>
    protocol  = "6"
    stateless = "false"
    #tcp_options = <<Optional value not found in discovery>>
    #udp_options = <<Optional value not found in discovery>>
  }
  egress_security_rules {
    #description = <<Optional value not found in discovery>>
    destination      = "0.0.0.0/0"
    destination_type = "CIDR_BLOCK"
    #icmp_options = <<Optional value not found in discovery>>
    protocol  = "1"
    stateless = "false"
    #tcp_options = <<Optional value not found in discovery>>
    #udp_options = <<Optional value not found in discovery>>
  }
  freeform_tags = {
  }
  ingress_security_rules {
    #description = <<Optional value not found in discovery>>
    #icmp_options = <<Optional value not found in discovery>>
    protocol    = "6"
    source      = "10.0.102.0/24"
    source_type = "CIDR_BLOCK"
    stateless   = "false"
    #tcp_options = <<Optional value not found in discovery>>
    #udp_options = <<Optional value not found in discovery>>
  }
  ingress_security_rules {
    #description = <<Optional value not found in discovery>>
    #icmp_options = <<Optional value not found in discovery>>
    protocol    = "1"
    source      = "10.0.102.0/24"
    source_type = "CIDR_BLOCK"
    stateless   = "false"
    #tcp_options = <<Optional value not found in discovery>>
    #udp_options = <<Optional value not found in discovery>>
  }
  ingress_security_rules {
    #description = <<Optional value not found in discovery>>
    #icmp_options = <<Optional value not found in discovery>>
    protocol    = "6"
    source      = "10.0.103.0/24"
    source_type = "CIDR_BLOCK"
    stateless   = "false"
    tcp_options {
      max = "22"
      min = "22"
      #source_port_range = <<Optional value not found in discovery>>
    }
    #udp_options = <<Optional value not found in discovery>>
  }
  ingress_security_rules {
    #description = <<Optional value not found in discovery>>
    #icmp_options = <<Optional value not found in discovery>>
    protocol    = "6"
    source      = "10.0.103.0/24"
    source_type = "CIDR_BLOCK"
    stateless   = "false"
    tcp_options {
      max = "1530"
      min = "1521"
      #source_port_range = <<Optional value not found in discovery>>
    }
    #udp_options = <<Optional value not found in discovery>>
  }
  vcn_id = oci_core_vcn.export_iad-cloudmaa-vcn.id
}
Modifications include removing export_, changing name of the security list and its display name, changing the CIDR blocks in each ingress rule that have 10.0.x.y to 10.10.x.y, and changing the VCN reference. Leave 0.0.0.0/0 unchanged.
resource oci_core_security_list phx-db-private-seclist {
  compartment_id = var.compartment_ocid
  defined_tags = {
  }
  display_name = "phx-db-private-seclist"
  egress_security_rules {
    #description = <<Optional value not found in discovery>>
    destination      = "0.0.0.0/0"
    destination_type = "CIDR_BLOCK"
    #icmp_options = <<Optional value not found in discovery>>
    protocol  = "6"
    stateless = "false"
    #tcp_options = <<Optional value not found in discovery>>
    #udp_options = <<Optional value not found in discovery>>
  }
  egress_security_rules {
    #description = <<Optional value not found in discovery>>
    destination      = "0.0.0.0/0"
    destination_type = "CIDR_BLOCK"
    #icmp_options = <<Optional value not found in discovery>>
    protocol  = "1"
    stateless = "false"
    #tcp_options = <<Optional value not found in discovery>>
    #udp_options = <<Optional value not found in discovery>>
  }
  freeform_tags = {
  }
  ingress_security_rules {
    #description = <<Optional value not found in discovery>>
    #icmp_options = <<Optional value not found in discovery>>
    protocol    = "6"
    source      = "10.10.102.0/24"
    source_type = "CIDR_BLOCK"
    stateless   = "false"
    #tcp_options = <<Optional value not found in discovery>>
    #udp_options = <<Optional value not found in discovery>>
  }
  ingress_security_rules {
    #description = <<Optional value not found in discovery>>
    #icmp_options = <<Optional value not found in discovery>>
    protocol    = "1"
    source      = "10.10.102.0/24"
    source_type = "CIDR_BLOCK"
    stateless   = "false"
    #tcp_options = <<Optional value not found in discovery>>
    #udp_options = <<Optional value not found in discovery>>
  }
  ingress_security_rules {
    #description = <<Optional value not found in discovery>>
    #icmp_options = <<Optional value not found in discovery>>
    protocol    = "6"
    source      = "10.10.103.0/24"
    source_type = "CIDR_BLOCK"
    stateless   = "false"
    tcp_options {
      max = "22"
      min = "22"
      #source_port_range = <<Optional value not found in discovery>>
    }
    #udp_options = <<Optional value not found in discovery>>
  }
  ingress_security_rules {
    #description = <<Optional value not found in discovery>>
    #icmp_options = <<Optional value not found in discovery>>
    protocol    = "6"
    source      = "10.10.103.0/24"
    source_type = "CIDR_BLOCK"
    stateless   = "false"
    tcp_options {
      max = "1530"
      min = "1521"
      #source_port_range = <<Optional value not found in discovery>>
    }
    #udp_options = <<Optional value not found in discovery>>
  }
  vcn_id = oci_core_vcn.phx-cloudmaa-vcn.id
}
Subnet
resource oci_core_subnet export_exadb-private-subnet-ad2 {
  availability_domain = "LoSv:US-ASHBURN-AD-2"
  cidr_block          = "10.0.101.0/24"
  compartment_id      = var.compartment_ocid
  defined_tags = {
    "Oracle-Tags.CreatedBy" = "ocid1.saml2idp.oc1..aaaaaaaatilj7lqztsx6jehhm7k5374c5jxg6uuhzvdehgbiprb55gnyejba/<oci user name>"
    "Oracle-Tags.CreatedOn" = "2020-03-13T18:50:55.371Z"
  }
  dhcp_options_id = oci_core_vcn.export_iad-cloudmaa-vcn.default_dhcp_options_id
  display_name    = "exadb-private-subnet-ad2"
  dns_label       = "exadbprivate"
  freeform_tags = {
  }
  #ipv6cidr_block = <<Optional value not found in discovery>>
  prohibit_internet_ingress  = "true"
  prohibit_public_ip_on_vnic = "true"
  route_table_id             = oci_core_route_table.export_iad-db-private-RT.id
  security_list_ids = [
    oci_core_security_list.export_siteguard-seclist.id,
    oci_core_security_list.export_bastion-private-seclist.id,
    oci_core_security_list.export_iad-db-private-seclist.id,
  ]
  vcn_id = oci_core_vcn.export_iad-cloudmaa-vcn.id
}
Modifications include removing “export_” where it appears, changing CIDR to a subnet within the VCN for the Phoenix region, changing the availability domain, changing the route table and VCN references.
resource oci_core_subnet exadb-private-subnet-ad1 {
  availability_domain = "LoSv:US-PHOENIX-AD-1"
  cidr_block          = "10.10.101.0/24"
  compartment_id      = var.compartment_ocid
  defined_tags = {
    "Oracle-Tags.CreatedBy" = "ocid1.saml2idp.oc1..aaaaaaaatilj7lqztsx6jehhm7k5374c5jxg6uuhzvdehgbiprb55gnyejba/<oci user name>"
    "Oracle-Tags.CreatedOn" = "2020-03-13T18:50:55.371Z"
  }
  dhcp_options_id = oci_core_vcn.phx-cloudmaa-vcn.default_dhcp_options_id
  display_name    = "exadb-private-subnet-ad1"
  dns_label       = "exadbprivate"
  freeform_tags = {
  }
  #ipv6cidr_block = <<Optional value not found in discovery>>
  prohibit_internet_ingress  = "true"
  prohibit_public_ip_on_vnic = "true"
  route_table_id             = oci_core_route_table.phx-db-private-RT.id
  security_list_ids = [
    oci_core_security_list.siteguard-seclist.id,
    oci_core_security_list.bastion-private-seclist.id,
    oci_core_security_list.phx-db-private-seclist.id,
  ]
  vcn_id = oci_core_vcn.phx-cloudmaa-vcn.id
}

As there are patterns to the items that must be changed, using editing tools such as sed can aid in automating the necessary changes.

  1. Back up your .tf files.
  2. Edit the Terraform definition based on the resource type.
  3. If you provisioned some components using Terraform and others using the OCI Console or other means, then you must adjust the Terraform resource definitions you plan to use.
    For example, if you provisioned the VCN and a NAT gateway using the OCI Console, then any resource that references the VCN and the NAT gateway within the .tf files will need the following change:
    1. In the vars.tf file, add and set the value of the two variables vcn_ocid and nat_gateway_ocid with these patterns:
      variable vcn_ocid { default = "OCID of VCN" } 
      variable nat_gateway_ocid { default = "OCID of NAT gateway" }
    2. Search all .tf files that have resources with definitions that have references to the VCN or the NAT gateway. For example, search for the pattern vcn_id and network_entity_id. For each occurrence, set the variable to the new value, as shown below:
      vcn_id = "${var.vcn_ocid}"
      network_entity_id = "${var.nat_gateway_ocid}"
    3. Modify the availability_domain.tf file to include all availability domains in the target region.
      To find the list of availability domains in OCI, click Compute, then click Instance. The availability domains appear on the left side of your screen.

      Using Phoenix as an example

      ## This configuration was generated by terraform-provider-oci
      ## then modified to include all ADs at the target 
      
      data oci_identity_availability_domain LoSv-US-PHOENIX-AD-1 {
        compartment_id = var.compartment_ocid
        ad_number      = "1"
      }
      data oci_identity_availability_domain LoSv-US-PHOENIX-AD-2 {
        compartment_id = var.compartment_ocid
        ad_number      = "2"
      }
      data oci_identity_availability_domain LoSv-US-PHOENIX-AD-3 {
        compartment_id = var.compartment_ocid
        ad_number      = "3"
      }

      Note:

      To get the OCID from the OCI Console, click the Show or Copy link of the OCID for the resource.

      Here is an example of changes required to the core.tf file containing the definition of the route table resource that uses the variables defined above.

      resource oci_core_route_table phx-db-private-RT {
        compartment_id = var.compartment_ocid
        defined_tags = {
        }
        display_name = "phx-db-private-RT"
        freeform_tags = {
        }
        route_rules {
          #description = <<Optional value not found in discovery>>
          destination       = "0.0.0.0/0"
          destination_type  = "CIDR_BLOCK"
          #network_entity_id = oci_core_nat_gateway.maa-phx-ngw.id
          network_entity_id = "${var.nat_gateway_ocid}"
        }
        #vcn_id = oci_core_vcn.ebs-maacloud2-vcn.id
        vcn_id = "${var.vcn_ocid}"
      }

Deploy Resources with Terraform

Once you've edited all of the resources that will be deployed with Terraform at the secondary region, collect the .tf files containing these resources. You must have the following files:

  • vars.tf: This file contains all Terraform variables required to execute Terraform.
  • availability_domain.tf: This file contains the definitions of all availability domains for the secondary region.
  • One or more .tf files that contain the resource definitions for deploying the chosen resources.

You don't need to include all of the .tf files that were generated by the Terraform discovery process at the primary site. Only the files mentioned above are required.

Follow these steps to use the OCI Console to deploy the resources:

  1. Zip up the required .tf files into a single ZIP file.
    This is used to create your Terraform stack.
  2. Log in to the OCI Console and navigate to Development Services, then Stacks under Resource Manager.
  3. Use the compartment menu to specify the compartment in which you want the stack ZIP file to be placed.
  4. Click Create Stack.
  5. Select My Configuration.
  6. Under Terraform Source, choose Zip file then browse and select the ZIP file you created in Step 1.
  7. (Optional) Provide a name for your stack.
  8. (Optional) Provide a description of your stack.
  9. Select the compartment in which the stack is to be created.
  10. (Best practice) Select the latest version of Terraform.
  11. (Optional) Add any tags.
  12. Click Next.
  13. Verify that the variables listed on this page have the correct values and change any values that are incorrect.
    These variables were read from the vars.tf file.
  14. Click Next.
    The Review page is shown. As you are only creating a Terraform stack, which is a definition of all resources to be deployed, do NOT select Run Apply.
  15. Click Create.
    Once the Terraform stack is created, the Stack Details page is shown with several action buttons, one of which is Plan.
  16. Click Plan to create the plan.
    Terraform validates the stack while it is creating the plan. If creation of the plan fails, then the OCI Console will indicate that the job failed and will display the log showing which .tf files and which resource definitions had an error. Edit the .tf files to correct the errors, recreate the Terraform stack, and try to create the Plan again.
    Once all errors have been resolved and the plan job runs successfully, go to the next Step.
  17. Click Apply.
    This starts a job that will create all the resources defined in the Terraform stack. The amount of time the job will run depends on the type and number of resources being deployed. For example, creating compute instances or a database service (VM DB or Oracle Autonomous Database on Dedicated Exadata Infrastructure) will take time.

Using PeopleSoft Cloud Manager to Provision Middle Tiers

You can use PeopleSoft Cloud Manager to provision the middle tiers by either installing the software or performing a lift and shift of the application and web tiers.

Install PeopleSoft Application and Middle Tier Software Using PeopleSoft Cloud Manager

On this path, you perform a fresh install of the application and web middle tier software, then configure it to access the PeopleSoft database. Cloud Manager must be subscribed to the correct PeopleSoft channels, specifically PeopleTools and all PeopleSoft applications in use. The PeopleTools version must be the same as your on-premises deployment.

This option does not reference the on-premises deployment.

  1. In Cloud Manager, use Manage Node to create the compute instances one at a time, by selecting:
    • The version and shape of the new middle tier
    • The compartment where the new middle tiers will be placed
    • The VCN, availability domain, and subnet on which the new middle tier is to be deployed
    • Which tier is to be configured: application server, process scheduler, or web server. You can deploy the application servers and process scheduler on shared servers.
      • Settings specific to the tier selected (application server, process scheduler, or web server domain), and the number of PeopleSoft domains for each.
      • Required credentials such as Access ID, Connect ID, WebLogic password, database passwords, and so on.
      • The file system used for the shared PS_HOME, PS_APP_HOME, and PS_CUSTOM_HOME.
      • The number of processes for each server type.
    • Set other attributes, as needed.
  2. Click Submit.

    A job starts the provisioning process. If there are no failures, then there will be a new middle tier running the services that were configured as described above. The new middle tier will appear in the OCI Console.

Lift and Shift Application and Web Tiers Using PeopleSoft Cloud Manager

With this choice, you'll pull the application and middle tier software from the source system for installation on the new environment. You'll first mine the existing environment, the “lift” portion, then use that data to build the OCI setup (“shift"). The application lift process creates a DPK (Deployment Puppet Kit) containing the contents of the PS_HOME, PS_APP_HOME, and PS_CUSTOM_HOME. Once the DPK is created, it is uploaded to an object storage bucket where PeopleSoft Cloud Manager can access it for deploying new middle tiers in OCI.

See the PeopleSoft Cloud Manager documentation for further details of these options.

  1. Download and install the lift toolkit.
    To download and install the lift toolkit, see the PeopleSoft Cloud Managerdocumentation, section “Download the Lift Utility”. Make sure you review “Installing Lift Prerequisites”.
  2. Perform an application lift.
    See the PeopleSoft Cloud Managerdocumentation, “Performing Application Lift”. You would be following these detailed steps to perform an application-only lift since the database was migrated using ZDM.
  3. Use the Manage Node action to add nodes to this environment, as described in the previous section.

    This option allows you to select the DPK that was uploaded and the shape of the new middle tier node. The cloud manager will present settings discovered from the source environment for your review and adjustment. The list of settings is the same as described in the previous section.

  4. Click Submit to create a job that starts the provisioning process.
    If there are no failures, then there will be a new middle tier running the services that you configured. This new middle tier will appear in the OCI Console.