├── .gitignore ├── EBusinessSuite ├── LICENSE.md ├── README.md ├── _docs │ ├── multiple_availability_domain_ha_topology.png │ ├── single_availability_domain_ha_topology.png │ └── terraform-init.png ├── datasources.tf ├── env-vars ├── env-vars.ps1 ├── main.tf ├── modules │ ├── bastion │ │ ├── bastion.outputs.tf │ │ ├── bastion.tf │ │ └── bastion.vars.tf │ ├── compute │ │ ├── compute.data.tf │ │ ├── compute.outputs.tf │ │ ├── compute.rsync-remote-exec.tf │ │ ├── compute.tf │ │ ├── compute.variables.tf │ │ ├── fss.tf │ │ └── userdata │ │ │ ├── bootstrap.tpl │ │ │ └── rsync.sh │ ├── dbsystem │ │ ├── db.datasources.tf │ │ ├── db.dbsystem.tf │ │ └── db.variables.tf │ ├── loadbalancer │ │ ├── lb.tf │ │ └── lb.variables.tf │ └── network │ │ ├── subnets │ │ ├── subnets.outputs.tf │ │ ├── subnets.tf │ │ └── subnets.variables.tf │ │ └── vcn │ │ ├── vcn.data.tf │ │ ├── vcn.outputs.tf │ │ ├── vcn.tf │ │ └── vcn.vars.tf ├── outputs.tf ├── provider.tf ├── routetables.tf ├── seclists.tf ├── terraform.tfvars └── variables.tf ├── JDEdwards ├── .gitignore ├── LICENSE.md ├── README.md ├── _docs │ ├── multiple_availability_domain_jd_edwards_deployment.png │ └── single_availability_domain_jd_edwards_deployment.png ├── env-vars ├── env-vars.ps1 ├── global │ ├── .gitignore │ ├── bastion │ │ ├── bastion.outputs.tf │ │ ├── bastion.tf │ │ └── bastion.variables.tf │ ├── global.datasources.tf │ ├── global.main.tf │ ├── global.outputs.tf │ ├── global.provider.tf │ ├── global.routetables.tf │ ├── global.variables.tf │ └── network │ │ ├── subnets │ │ ├── subnets.output.tf │ │ ├── subnets.tf │ │ └── subnets.variables.tf │ │ └── vcn │ │ ├── vcn.data.tf │ │ ├── vcn.outputs.tf │ │ ├── vcn.seclist.tf │ │ ├── vcn.tf │ │ └── vcn.variables.tf ├── inputJson │ ├── .gitkeep │ ├── sample.network.json │ ├── sample.nonpd.json │ ├── sample.nonpdsubnet.json │ ├── sample.pd.json │ └── sample.pdsubnet.json ├── modules │ ├── app │ │ ├── app.bv.tf │ │ ├── app.init.tf │ │ ├── app.outputs.tf │ │ ├── app.tf │ │ └── app.variables.tf │ ├── db │ │ ├── db.dbsystem.tf │ │ ├── db.outputs.tf │ │ └── db.variables.tf │ ├── dns │ │ ├── dns.datasources.tf │ │ ├── dns.main.tf │ │ ├── dns.outputs.tf │ │ └── dns.variables.tf │ ├── lbaas │ │ ├── lbaas.outputs.tf │ │ ├── lbaas.tf │ │ └── lbaas.variables.tf │ ├── userdata │ │ ├── db │ │ │ └── .gitignore │ │ ├── dep │ │ │ └── .gitignore │ │ ├── ent │ │ │ └── .gitignore │ │ ├── sm │ │ │ └── .gitignore │ │ └── web │ │ │ └── .gitignore │ └── win │ │ ├── win.outputs.tf │ │ ├── win.tf │ │ └── win.variables.tf ├── nonpd │ ├── .gitignore │ ├── nonpd.datasources.tf │ ├── nonpd.main.tf │ ├── nonpd.outputs.tf │ ├── nonpd.provider.tf │ └── nonpd.variables.tf └── pd │ ├── .gitignore │ ├── pd.datasources.tf │ ├── pd.main.tf │ ├── pd.outputs.tf │ ├── pd.provider.tf │ ├── pd.variables.tf │ └── web-lb.tf ├── LICENSE.md ├── Peoplesoft ├── .gitignore ├── LICENSE.md ├── README.md ├── _docs │ ├── peoplesoft_multiple_availability_domain_ha_topology.png │ └── peoplesoft_single_availability_domain_ha_topology.png ├── datasources.tf ├── env-vars ├── env-vars.ps1 ├── main.tf ├── modules │ ├── bastion │ │ ├── bastion.outputs.tf │ │ ├── bastion.tf │ │ └── bastion.vars.tf │ ├── compute │ │ ├── compute.blockvolume.tf │ │ ├── compute.datasources.tf │ │ ├── compute.outputs.tf │ │ ├── compute.remote-exec.tf │ │ ├── compute.tf │ │ └── compute.variables.tf │ ├── dbsystem │ │ ├── db.datasources.tf │ │ ├── db.dbsystem.tf │ │ └── db.variables.tf │ ├── filesystem │ │ ├── fss.data.tf │ │ ├── fss.outputs.tf │ │ ├── fss.tf │ │ └── fss.vars.tf │ ├── loadbalancer │ │ ├── lb.tf │ │ └── lb.vars.tf │ └── network │ │ ├── subnets │ │ ├── subnets.output.tf │ │ ├── subnets.tf │ │ └── subnets.vars.tf │ │ └── vcn │ │ ├── vcn.data.tf │ │ ├── vcn.outputs.tf │ │ ├── vcn.tf │ │ └── vcn.vars.tf ├── outputs.tf ├── provider.tf ├── routetables.tf ├── seclist.tf ├── terraform.tfvars ├── userdata │ ├── bootstrap.tpl │ └── init.sh └── variables.tf ├── README.md └── SiebelCRM ├── LICENSE.md ├── README.md ├── _docs ├── single_availability_domain_siebel_crm_deployment.png └── terraform-init.png ├── datasources.tf ├── env-vars ├── env-vars.ps1 ├── fss-remote-exec.tf ├── main.tf ├── modules ├── bastion │ ├── bastion.outputs.tf │ ├── bastion.tf │ └── bastion.vars.tf ├── compute │ ├── compute.blockvolume.tf │ ├── compute.outputs.tf │ ├── compute.tf │ └── compute.variables.tf ├── dbsystem │ ├── db.datasources.tf │ ├── db.dbsystem.tf │ └── db.variables.tf ├── filesystem │ ├── fss.data.tf │ ├── fss.outputs.tf │ ├── fss.tf │ └── fss.vars.tf ├── loadbalancer │ ├── lb.tf │ └── lb.vars.tf └── network │ ├── subnets │ ├── subnets.output.tf │ ├── subnets.tf │ └── subnets.vars.tf │ └── vcn │ ├── vcn.data.tf │ ├── vcn.outputs.tf │ ├── vcn.tf │ └── vcn.vars.tf ├── outputs.tf ├── provider.tf ├── routetables.tf ├── seclist.tf ├── terraform.tfvars ├── userdata ├── bootstrap.tpl └── mountfss.sh └── variables.tf /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/.gitignore -------------------------------------------------------------------------------- /EBusinessSuite/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0 4 | 5 | Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this software, associated documentation and/or data (collectively the "Software"), free of charge and under any and all copyright rights in the Software, and any and all patent rights owned or freely licensable by each licensor hereunder covering either (i) the unmodified Software as contributed to or provided by such licensor, or (ii) the Larger Works (as defined below), to deal in both 6 | 7 | (a) the Software, and 8 | 9 | (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if one is included with the Software (each a “Larger Work” to which the Software is contributed by such licensors), 10 | 11 | without restriction, including without limitation the rights to copy, create derivative works of, display, perform, and distribute the Software and make, use, sell, offer for sale, import, export, have made, and have sold the Software and the Larger Work(s), and to sublicense the foregoing rights on either these or other terms. 12 | 13 | This license is subject to the following condition: 14 | 15 | The above copyright notice and either this complete permission notice or at a minimum a reference to the UPL must be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /EBusinessSuite/_docs/multiple_availability_domain_ha_topology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/EBusinessSuite/_docs/multiple_availability_domain_ha_topology.png -------------------------------------------------------------------------------- /EBusinessSuite/_docs/single_availability_domain_ha_topology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/EBusinessSuite/_docs/single_availability_domain_ha_topology.png -------------------------------------------------------------------------------- /EBusinessSuite/_docs/terraform-init.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/EBusinessSuite/_docs/terraform-init.png -------------------------------------------------------------------------------- /EBusinessSuite/datasources.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Get list of Availability Domains 7 | data "oci_identity_availability_domains" "ADs" { 8 | compartment_id = "${var.tenancy_ocid}" 9 | } 10 | 11 | # Get name of Availability Domains 12 | data "template_file" "deployment_ad" { 13 | count = "${length(var.AD)}" 14 | template = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[var.AD[count.index] - 1], "name")}" 15 | } 16 | 17 | # Get list of Fault Domains 18 | data "oci_identity_fault_domains" "fds" { 19 | count = "${length(var.AD)}" 20 | availability_domain = "${element(data.template_file.deployment_ad.*.rendered, count.index)}" 21 | compartment_id = "${var.compartment_ocid}" 22 | } 23 | 24 | locals { 25 | fds = "${flatten(concat(data.oci_identity_fault_domains.fds.*.fault_domains))}" 26 | faultdomains_per_ad = 3 27 | } 28 | 29 | # Get name of Fault Domains 30 | data "template_file" "deployment_fd" { 31 | template = "$${name}" 32 | count = "${length(var.AD) * (local.faultdomains_per_ad) }" 33 | vars = { 34 | name = "${lookup(local.fds[count.index], "name")}" 35 | } 36 | } 37 | 38 | # Get latest Oracle Linux image 39 | data "oci_core_images" "InstanceImageOCID" { 40 | compartment_id = "${var.tenancy_ocid}" 41 | operating_system = "${var.InstanceOS}" 42 | operating_system_version = "${var.linux_os_version}" 43 | filter { 44 | name = "display_name" 45 | values = ["^.*Oracle[^G]*$"] 46 | regex = true 47 | } 48 | } 49 | 50 | # Get swift object storage name for Service Gateway 51 | data "oci_core_services" "svcgtw_services" { 52 | filter { 53 | name = "name" 54 | values = [".*Object.*Storage"] 55 | regex = true 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /EBusinessSuite/env-vars: -------------------------------------------------------------------------------- 1 | ### Authentication details 2 | export TF_VAR_tenancy_ocid="" 3 | export TF_VAR_user_ocid="" 4 | export TF_VAR_fingerprint="" 5 | export TF_VAR_private_key_path="" 6 | 7 | ### Region 8 | export TF_VAR_region="" 9 | 10 | ### Compartment 11 | export TF_VAR_compartment_ocid="" 12 | 13 | ### Public/private keys used on the instance 14 | export TF_VAR_ssh_public_key= 15 | export TF_VAR_ssh_private_key= 16 | 17 | ### Public/private keys used on the bastion instance 18 | export TF_VAR_bastion_ssh_public_key= 19 | export TF_VAR_bastion_ssh_private_key= -------------------------------------------------------------------------------- /EBusinessSuite/env-vars.ps1: -------------------------------------------------------------------------------- 1 | #Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | #The Universal Permissive License (UPL), Version 1.0 4 | 5 | 6 | ### Authentication details 7 | $env:TF_VAR_tenancy_ocid="" 8 | $env:TF_VAR_user_ocid="" 9 | $env:TF_VAR_fingerprint="" 10 | $env:TF_VAR_private_key_path="" 11 | 12 | ### Region 13 | $env:TF_VAR_region="" 14 | 15 | ### Compartment 16 | $env:TF_VAR_compartment_ocid="" 17 | 18 | ### Public/private keys used on the instance 19 | $env:TF_VAR_ssh_public_key="" 20 | $env:TF_VAR_ssh_private_key="" 21 | 22 | ### Public/private keys used on the bastion instance 23 | $env:TF_VAR_bastion_ssh_public_key="" 24 | $env:TF_VAR_bastion_ssh_private_key="" 25 | -------------------------------------------------------------------------------- /EBusinessSuite/modules/bastion/bastion.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "Bastion_Public_IPs" { 7 | value = ["${oci_core_instance.bastion.*.public_ip}"] 8 | } -------------------------------------------------------------------------------- /EBusinessSuite/modules/bastion/bastion.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_core_instance" "bastion" { 7 | compartment_id = "${var.compartment_ocid}" 8 | count = "${length(var.availability_domain)}" 9 | availability_domain = "${element(var.availability_domain, count.index)}" 10 | display_name = "${var.bastion_hostname_prefix}${element(var.AD,count.index)}${count.index+1}" 11 | shape = "${var.bastion_instance_shape}" 12 | 13 | create_vnic_details { 14 | subnet_id = "${element(var.bastion_subnet, count.index)}" 15 | display_name = "${var.bastion_hostname_prefix}${element(var.AD,count.index)}${count.index+1}" 16 | assign_public_ip = true 17 | hostname_label = "${var.bastion_hostname_prefix}${element(var.AD,count.index)}${count.index+1}" 18 | }, 19 | 20 | source_details { 21 | source_type = "image" 22 | source_id = "${var.bastion_image}" 23 | boot_volume_size_in_gbs = "60" 24 | } 25 | 26 | metadata { 27 | ssh_authorized_keys = "${trimspace(file("${var.bastion_ssh_public_key}"))}" 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /EBusinessSuite/modules/bastion/bastion.vars.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | variable "availability_domain" { 10 | description = "Availability domain" 11 | type = "list" 12 | } 13 | 14 | variable "AD" { 15 | description = "Availability domain" 16 | type= "list" 17 | } 18 | 19 | # Bastion host variables 20 | variable "bastion_hostname_prefix" { 21 | description = "Prefix for bastion hostname" 22 | } 23 | 24 | variable "bastion_instance_shape" { 25 | description = "Instance shape of bastion host" 26 | } 27 | 28 | variable "bastion_subnet" { 29 | description = "Subnet for Bastion host" 30 | type = "list" 31 | } 32 | 33 | variable "bastion_image" { 34 | description ="Bation Operating System Image" 35 | } 36 | variable "bastion_ssh_public_key" { 37 | description = "Bastion Host SSH public key" 38 | } 39 | -------------------------------------------------------------------------------- /EBusinessSuite/modules/compute/compute.data.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | locals { 7 | ebsfss_private_ips = "${flatten(concat(data.oci_core_private_ips.ip_mount_target.*.private_ips))}" 8 | } 9 | 10 | locals { 11 | ebsfss_exports = [ 12 | "${oci_file_storage_export.fss_exp.*.path}", 13 | ] 14 | ebsfss_fstabs = "${formatlist("%s:%s", data.template_file.ebsfss_ips.*.rendered, oci_file_storage_export.fss_exp.*.path)}" 15 | } 16 | 17 | 18 | # Get private IP of File Storage Service 19 | data "oci_core_private_ips" "ip_mount_target" { 20 | count = "${length(var.availability_domain)}" 21 | subnet_id = "${element(oci_file_storage_mount_target.fss_mt.*.subnet_id, count.index)}" 22 | 23 | filter { 24 | name = "id" 25 | values = ["${element(flatten(oci_file_storage_mount_target.fss_mt.*.private_ip_ids), count.index)}"] 26 | } 27 | } 28 | 29 | data "template_file" "ebsfss_ips" { 30 | template = "$${ip_address}" 31 | count = "${length(var.availability_domain)}" 32 | 33 | vars = { 34 | ip_address = "${lookup(local.ebsfss_private_ips[count.index], "ip_address")}" 35 | } 36 | } 37 | 38 | # Get Filesystem details 39 | data "template_file" "bootstrap" { 40 | template = "${file("${path.module}/userdata/bootstrap.tpl")}" 41 | vars { 42 | src_mount_path = "${var.fss_primary_mount_path}/" 43 | src_mount_target_private_ip = "${element(data.template_file.ebsfss_ips.*.rendered, 0)}" 44 | src_export_path = "${element(oci_file_storage_export.fss_exp.*.path,0)}" 45 | app_instance_listen_port = "${var.compute_instance_listen_port}" 46 | timezone = "${var.timezone}" 47 | } 48 | } 49 | 50 | # Get rsync inputs 51 | data "template_file" "rsync" { 52 | count = "${local.enable_rsync ? 1 : 0}" 53 | template = "${file("${path.module}/userdata/rsync.sh")}" 54 | vars { 55 | src_mount_path = "${var.fss_primary_mount_path}/" 56 | dst_export_path = "${element(oci_file_storage_export.fss_exp.*.path,1)}" 57 | dst_mount_target_private_ip = "${element(data.template_file.ebsfss_ips.*.rendered, 1)}" 58 | dst_mount_path = "${var.fss_primary_mount_path}DR/" 59 | fss_sync_frequency = "*/30 * * * *" 60 | } 61 | } -------------------------------------------------------------------------------- /EBusinessSuite/modules/compute/compute.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "AppsPrvIPs" { 7 | description = "Application private IPs" 8 | value = ["${oci_core_instance.compute.*.private_ip}"] 9 | } 10 | 11 | 12 | output "FSSFstabs" { 13 | description = "FSS /etc/fstab Entries" 14 | value = "${local.ebsfss_fstabs}" 15 | } 16 | 17 | -------------------------------------------------------------------------------- /EBusinessSuite/modules/compute/compute.rsync-remote-exec.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "random_integer" "rand" { 7 | min = 1000000000 8 | max = 9999999999 9 | } 10 | 11 | locals { 12 | enable_rsync = "${length(var.availability_domain) >= "2" ? 1 : 0}" 13 | } 14 | 15 | 16 | # Enable rsync 17 | resource "null_resource" "enable_rsync" { 18 | depends_on = ["oci_core_instance.compute", 19 | "oci_file_storage_export.fss_exp"] 20 | count = "${local.enable_rsync ? var.compute_instance_count : 0}" 21 | 22 | provisioner "file" { 23 | connection { 24 | agent = false 25 | timeout = "${var.timeout}" 26 | host = "${oci_core_instance.compute.*.private_ip[count.index % var.compute_instance_count]}" 27 | user = "${var.compute_instance_user}" 28 | private_key = "${file("${var.compute_ssh_private_key}")}" 29 | 30 | bastion_host = "${var.bastion_public_ip}" 31 | bastion_user = "${var.bastion_user}" 32 | bastion_private_key = "${file("${var.bastion_ssh_private_key}")}" 33 | } 34 | 35 | content = "${data.template_file.rsync.rendered}" 36 | destination = "/tmp/rsync_${random_integer.rand.result}.sh" 37 | } 38 | 39 | provisioner "local-exec" { 40 | command = "sleep 120" # Wait for cloud-init to complete 41 | } 42 | 43 | provisioner "remote-exec" { 44 | connection { 45 | agent = false 46 | timeout = "${var.timeout}" 47 | host = "${oci_core_instance.compute.*.private_ip[count.index % var.compute_instance_count]}" 48 | user = "${var.compute_instance_user}" 49 | private_key = "${file("${var.compute_ssh_private_key}")}" 50 | 51 | bastion_host = "${var.bastion_public_ip}" 52 | bastion_user = "${var.bastion_user}" 53 | bastion_private_key = "${file("${var.bastion_ssh_private_key}")}" 54 | } 55 | 56 | inline = [ 57 | "chmod +x /tmp/rsync_${random_integer.rand.result}.sh", 58 | "while [ ! -f /tmp/rsync.done ]; do /tmp/rsync_${random_integer.rand.result}.sh; sleep 10; done", 59 | ] 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /EBusinessSuite/modules/compute/compute.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_core_instance" "compute" { 7 | count = "${var.compute_instance_count}" 8 | availability_domain = "${element(var.availability_domain, count.index)}" 9 | display_name = "${var.compute_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 10 | fault_domain = "${element(var.fault_domain, count.index)}" 11 | compartment_id = "${var.compartment_ocid}" 12 | shape = "${var.compute_instance_shape}" 13 | 14 | create_vnic_details { 15 | subnet_id = "${element(var.compute_subnet, count.index)}" 16 | display_name = "${var.compute_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 17 | assign_public_ip = false 18 | hostname_label = "${var.compute_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 19 | }, 20 | 21 | source_details { 22 | source_type = "image" 23 | source_id = "${var.compute_image}" 24 | boot_volume_size_in_gbs = "${var.compute_boot_volume_size_in_gb}" 25 | } 26 | 27 | metadata { 28 | ssh_authorized_keys = "${trimspace(file("${var.compute_ssh_public_key}"))}" 29 | user_data = "${base64encode(data.template_file.bootstrap.rendered)}" 30 | } 31 | 32 | timeouts { 33 | create = "${var.timeout}" 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /EBusinessSuite/modules/compute/compute.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | variable "compute_instance_count" { 10 | description = "Application instance count" 11 | } 12 | variable "compute_instance_shape" { 13 | description = "Application instance shape" 14 | } 15 | variable "compute_hostname_prefix" { 16 | description = "Application hostname prefix" 17 | } 18 | variable "compute_image" { 19 | description = "OS Image" 20 | } 21 | variable "compute_ssh_private_key" { 22 | description = "SSH private key" 23 | } 24 | variable "compute_ssh_public_key" { 25 | description = "SSH public key" 26 | } 27 | variable "compute_instance_listen_port" { 28 | description = "Application instance listen port" 29 | } 30 | variable "bastion_ssh_private_key" { 31 | description = "SSH key" 32 | } 33 | variable "compute_subnet" { 34 | description = "subnet" 35 | type = "list" 36 | } 37 | variable "availability_domain" { 38 | description = "Availability Domainr" 39 | type = "list" 40 | } 41 | variable "fault_domain" { 42 | description = "Fault Domainr" 43 | type = "list" 44 | } 45 | variable "AD" { 46 | description = "Availability Domain number" 47 | type = "list" 48 | } 49 | variable "bastion_public_ip" { 50 | description = "Public IP of bastion instance" 51 | } 52 | variable "fss_primary_mount_path" { 53 | description = "Mountpoint for primary application servers" 54 | } 55 | variable "fss_instance_prefix" { 56 | description = "FSS instance name prefix" 57 | } 58 | variable "fss_subnet" { 59 | description = "FSS subnet" 60 | type = "list" 61 | } 62 | variable "fss_limit_size_in_gb" {} 63 | variable "timeout" { 64 | description = "Timeout setting for resource creation " 65 | default = "20m" 66 | } 67 | variable "compute_instance_user" { 68 | description = "Login user for compute instance" 69 | } 70 | variable "compute_boot_volume_size_in_gb" { 71 | description = "Boot volume size of compute instance" 72 | } 73 | variable "timezone" { 74 | description = "Set timezone for compute instance" 75 | } 76 | variable "bastion_user" { 77 | description = "Login user for bastion host" 78 | } 79 | -------------------------------------------------------------------------------- /EBusinessSuite/modules/compute/fss.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Filesystem 7 | resource "oci_file_storage_file_system" "fss" { 8 | count = "${length(var.availability_domain)}" 9 | compartment_id = "${var.compartment_ocid}" 10 | availability_domain = "${element(var.availability_domain, count.index)}" 11 | display_name = "${var.fss_instance_prefix}${var.AD[count.index]}" 12 | } 13 | 14 | # Mount Target 15 | resource "oci_file_storage_mount_target" "fss_mt" { 16 | depends_on = ["oci_file_storage_file_system.fss"] 17 | count = "${length(var.availability_domain)}" 18 | compartment_id = "${var.compartment_ocid}" 19 | availability_domain = "${element(var.availability_domain, count.index)}" 20 | hostname_label = "${var.fss_instance_prefix}${var.AD[count.index]}" 21 | subnet_id = "${element(var.fss_subnet, count.index)}" 22 | display_name = "${var.fss_instance_prefix}${var.AD[count.index]}_mt" 23 | } 24 | 25 | # Filesystem exportset 26 | resource "oci_file_storage_export_set" "fss_expset" { 27 | depends_on = ["oci_file_storage_file_system.fss", "oci_file_storage_mount_target.fss_mt"] 28 | count = "${length(var.availability_domain)}" 29 | mount_target_id = "${element(oci_file_storage_mount_target.fss_mt.*.id, count.index)}" 30 | max_fs_stat_bytes = "${(var.fss_limit_size_in_gb * 1024 * 1024 * 1024)}" 31 | } 32 | 33 | # Filesystem export 34 | resource "oci_file_storage_export" "fss_exp" { 35 | depends_on = ["oci_file_storage_file_system.fss", "oci_file_storage_mount_target.fss_mt"] 36 | count = "${length(var.availability_domain)}" 37 | export_set_id = "${element(oci_file_storage_mount_target.fss_mt.*.export_set_id,count.index)}" 38 | file_system_id = "${element(oci_file_storage_file_system.fss.*.id, count.index)}" 39 | path = "/${var.fss_instance_prefix}${var.AD[count.index]}" 40 | 41 | export_options = [ 42 | { 43 | source = "0.0.0.0/0" 44 | access = "READ_WRITE" 45 | identity_squash = "NONE" 46 | require_privileged_source_port = false 47 | }, 48 | ] 49 | } 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /EBusinessSuite/modules/compute/userdata/bootstrap.tpl: -------------------------------------------------------------------------------- 1 | #cloud-config 2 | timezone: "${timezone}" 3 | 4 | packages: 5 | - rsync 6 | - nfs-utils 7 | - ntp 8 | - oracle-ebs-server-R12-preinstall 9 | 10 | runcmd: 11 | - sudo mkdir -p ${src_mount_path} 12 | - sudo mount -t nfs -o rw,bg,hard,timeo=600,nfsvers=3,tcp ${src_mount_target_private_ip}:${src_export_path} ${src_mount_path} 13 | - sudo chown oracle:oinstall ${src_mount_path} 14 | - echo ${src_mount_target_private_ip}:${src_export_path} ${src_mount_path} nfs rw,bg,hard,timeo=600,nfsvers=3 0 0 >> /etc/fstab 15 | # Run firewall command to enable to open ports 16 | - firewall-offline-cmd --port=${app_instance_listen_port}:tcp 17 | - /bin/systemctl restart firewalld 18 | -------------------------------------------------------------------------------- /EBusinessSuite/modules/compute/userdata/rsync.sh: -------------------------------------------------------------------------------- 1 | #Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | #The Universal Permissive License (UPL), Version 1.0 4 | 5 | 6 | #/bin/bash 7 | sudo mkdir -p ${dst_mount_path} 8 | sudo mount -t nfs -o rw,bg,hard,timeo=600,nfsvers=3,tcp ${dst_mount_target_private_ip}:${dst_export_path} ${dst_mount_path} 9 | sudo chown oracle:oinstall ${dst_mount_path} 10 | echo '${dst_mount_target_private_ip}:${dst_export_path} ${dst_mount_path} nfs rw,bg,hard,timeo=600,nfsvers=3 0 0' | sudo tee -a /etc/fstab 11 | echo '#${fss_sync_frequency} /usr/bin/flock -n /var/run/fss-sync-up-file-system.lck rsync -aHAXxv --numeric-ids --delete ${src_mount_path} ${dst_mount_path}' | sudo tee -a /etc/cron.d/fss-sync-up-file-system 12 | sudo crontab /etc/cron.d/fss-sync-up-file-system 13 | touch /tmp/rsync.done -------------------------------------------------------------------------------- /EBusinessSuite/modules/dbsystem/db.datasources.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Get CPU and node and node count for a db shape 7 | data "oci_database_db_system_shapes" "db_system_shapes" { 8 | availability_domain = "${element(var.availability_domain, count.index)}" 9 | compartment_id = "${var.compartment_ocid}" 10 | filter { 11 | name = "name" 12 | values = ["${var.db_instance_shape}"] 13 | } 14 | } -------------------------------------------------------------------------------- /EBusinessSuite/modules/dbsystem/db.dbsystem.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_database_db_system" "database" { 7 | count = "${length(var.availability_domain)}" 8 | compartment_id = "${var.compartment_ocid}" 9 | availability_domain = "${element(var.availability_domain, count.index)}" 10 | cpu_core_count = "${lookup(data.oci_database_db_system_shapes.db_system_shapes.db_system_shapes[0], "minimum_core_count")}" 11 | database_edition = "${var.db_edition}" 12 | 13 | db_home { 14 | database { 15 | "admin_password" = "${var.db_admin_password}" 16 | "db_name" = "${var.db_name}" 17 | "character_set" = "${var.db_characterset}" 18 | "ncharacter_set" = "${var.db_nls_characterset}" 19 | "db_workload" = "${var.db_workload}" 20 | "pdb_name" = "${var.db_pdb_name}" 21 | } 22 | db_version = "${var.db_version}" 23 | display_name = "${var.db_name}" 24 | } 25 | 26 | shape = "${var.db_instance_shape}" 27 | node_count = "${var.db_node_count}" 28 | data_storage_size_in_gb = "${var.db_size_in_gb}" 29 | license_model = "${var.db_license_model}" 30 | disk_redundancy = "${var.db_disk_redundancy}" 31 | subnet_id = "${element(var.db_subnet, count.index)}" 32 | ssh_public_keys = ["${trimspace(file("${var.db_ssh_public_key}"))}"] 33 | display_name = "${var.db_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 34 | hostname = "${var.db_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 35 | } -------------------------------------------------------------------------------- /EBusinessSuite/modules/dbsystem/db.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | variable "availability_domain" { 10 | description = "Availability domain" 11 | type = "list" 12 | } 13 | variable "AD" { 14 | description = "Availability domain" 15 | type= "list" 16 | } 17 | variable "db_subnet" { 18 | description = "Subnet for Bastion host" 19 | type = "list" 20 | } 21 | # Database System variables 22 | variable "db_edition" { 23 | description = "Database Edition" 24 | } 25 | variable "db_version" { 26 | description = "Database version" 27 | } 28 | variable "db_admin_password" { 29 | description = "Database admin password" 30 | } 31 | variable "db_name" { 32 | description = "Database Name" 33 | } 34 | variable "db_disk_redundancy" { 35 | description = "Database disk redundancy for Bare Metal DB System" 36 | default="NORMAL" 37 | } 38 | variable "db_hostname_prefix" { 39 | description = "Database hostname prefix" 40 | } 41 | variable "db_instance_shape" { 42 | description = "Database system shape" 43 | 44 | } 45 | variable "db_ssh_public_key" { 46 | description = "Database public ssh key" 47 | } 48 | 49 | variable "db_characterset" { 50 | description = "Database characterset" 51 | } 52 | variable "db_nls_characterset" { 53 | description = "Database National characterset" 54 | } 55 | variable "db_workload" { 56 | description = "Database Workload" 57 | default = "OLTP" 58 | } 59 | variable "db_pdb_name" { 60 | } 61 | variable "db_size_in_gb" { 62 | description = "Database size in gb" 63 | } 64 | 65 | variable "db_license_model" { 66 | description = "Database License Model" 67 | } 68 | variable "db_node_count" { 69 | description = "Database Node count" 70 | } -------------------------------------------------------------------------------- /EBusinessSuite/modules/loadbalancer/lb.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Load Balancer 7 | resource "oci_load_balancer" "lb" { 8 | shape = "${var.load_balancer_shape}" 9 | count = "${length(var.availability_domain)}" 10 | compartment_id = "${var.compartment_ocid}" 11 | subnet_ids = ["${element(var.load_balancer_subnet, count.index)}"] 12 | display_name = "${var.load_balancer_name}${element(var.AD,count.index)}${count.index+1}" 13 | is_private = "${var.load_balancer_private}" 14 | } 15 | 16 | # Load Balancer Backendset 17 | resource "oci_load_balancer_backend_set" "lb-bset" { 18 | depends_on = ["oci_load_balancer.lb"] 19 | count = "${length(var.availability_domain)}" 20 | name = "${var.load_balancer_name}${element(var.AD,count.index)}-bes${count.index + 1}" 21 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, count.index)}" 22 | policy = "ROUND_ROBIN" 23 | 24 | health_checker { 25 | port = "${var.compute_instance_listen_port}" 26 | protocol = "HTTP" 27 | response_body_regex = ".*" 28 | url_path = "/" 29 | } 30 | session_persistence_configuration { 31 | cookie_name = "lb-sessprs" 32 | disable_fallback = true 33 | } 34 | lifecycle { 35 | ignore_changes = ["availability_domain"] 36 | } 37 | } 38 | 39 | # Load Balancer Backend 40 | resource "oci_load_balancer_backend" "lb-bset-be" { 41 | depends_on = ["oci_load_balancer.lb", "oci_load_balancer_backend_set.lb-bset"] 42 | count = "${var.compute_instance_count}" 43 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, count.index)}" 44 | backendset_name = "${element(oci_load_balancer_backend_set.lb-bset.*.name, count.index)}" 45 | ip_address = "${element(var.be_ip_addresses, count.index)}" 46 | port = "${var.compute_instance_listen_port}" 47 | backup = false 48 | drain = false 49 | offline = false 50 | weight = 1 51 | 52 | lifecycle { 53 | ignore_changes = ["availability_domain"] 54 | } 55 | } 56 | 57 | # Load Balancer Hostname 58 | resource "oci_load_balancer_hostname" "hostname" { 59 | depends_on = ["oci_load_balancer.lb"] 60 | count = "${length(var.availability_domain)}" 61 | hostname = "${var.load_balancer_hostname}" 62 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, count.index)}" 63 | name = "hostname${count.index + 1}" 64 | } 65 | 66 | # Load Balancer Listener 67 | resource "oci_load_balancer_listener" "lb-listener" { 68 | depends_on = ["oci_load_balancer.lb", "oci_load_balancer_backend_set.lb-bset","oci_load_balancer_hostname.hostname"] 69 | count = "${length(var.availability_domain)}" 70 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, count.index)}" 71 | name = "${var.load_balancer_name}${element(var.AD,count.index)}-lsnr${count.index + 1}" 72 | default_backend_set_name = "${element(oci_load_balancer_backend_set.lb-bset.*.name, count.index)}" 73 | hostname_names = ["${element(oci_load_balancer_hostname.hostname.*.name, count.index)}"] 74 | port = "${var.load_balancer_listen_port}" 75 | protocol = "HTTP" 76 | connection_configuration { 77 | idle_timeout_in_seconds = "2" 78 | } 79 | } 80 | 81 | -------------------------------------------------------------------------------- /EBusinessSuite/modules/loadbalancer/lb.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | variable "availability_domain" { 10 | description = "Availability domain" 11 | type = "list" 12 | } 13 | variable "AD" { 14 | description = "Availability domain" 15 | type= "list" 16 | } 17 | 18 | # Load Balancer variables 19 | variable load_balancer_subnet { 20 | description = "Subnet for Load Balancer" 21 | type = "list" 22 | } 23 | variable load_balancer_name { 24 | description = "Name of Load Balancer" 25 | } 26 | variable load_balancer_shape { 27 | description = "Shape of Load Balancer" 28 | } 29 | variable load_balancer_private { 30 | description = "Set private load balacer" 31 | default = "True" 32 | } 33 | variable be_ip_addresses { 34 | description = "Backend IP addresses" 35 | type = "list" 36 | } 37 | variable load_balancer_hostname { 38 | description = "Hostname for Load Balancer" 39 | } 40 | variable compute_instance_listen_port { 41 | description = "Listen port of compute instance" 42 | } 43 | variable load_balancer_listen_port { 44 | description = "Listen port of Load Balancer" 45 | } 46 | variable compute_instance_count { 47 | description = "Number or compute instances" 48 | } -------------------------------------------------------------------------------- /EBusinessSuite/modules/network/subnets/subnets.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "subnetid" { 7 | value = ["${oci_core_subnet.subnet.*.id}"] 8 | } 9 | 10 | output "cidr_block" { 11 | value = ["${oci_core_subnet.subnet.*.cidr_block}"] 12 | } -------------------------------------------------------------------------------- /EBusinessSuite/modules/network/subnets/subnets.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Create subnet 7 | resource "oci_core_subnet" "subnet" { 8 | count = "${length(var.availability_domain)}" 9 | availability_domain = "${element(var.availability_domain, count.index)}" 10 | compartment_id = "${var.compartment_ocid}" 11 | vcn_id = "${var.vcn_id}" 12 | cidr_block = "${var.vcn_subnet_cidr[count.index]}" 13 | display_name = "${var.dns_label}${var.AD[count.index]}" 14 | dns_label = "${var.dns_label}${var.AD[count.index]}" 15 | dhcp_options_id = "${var.dhcp_options_id}" 16 | route_table_id = "${var.route_table_id}" 17 | security_list_ids = ["${var.security_list_ids}"] 18 | prohibit_public_ip_on_vnic = "${var.private_subnet}" 19 | } -------------------------------------------------------------------------------- /EBusinessSuite/modules/network/subnets/subnets.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | /* 6 | variable "tenancy_ocid" { 7 | description = "OCI Tenancy OCID" 8 | }*/ 9 | variable "compartment_ocid" { 10 | description = "Compartment name" 11 | } 12 | variable "availability_domain" { 13 | description = "Availability domain" 14 | type = "list" 15 | } 16 | variable "AD" { 17 | description = "Availability domain" 18 | type = "list" 19 | } 20 | 21 | # Virtual Cloud Network (VCN) variables 22 | variable "vcn_id" { 23 | description = "VCN OCID" 24 | } 25 | variable "route_table_id" { 26 | description = "VCN Route Table OCID" 27 | } 28 | 29 | variable "dhcp_options_id" { 30 | description = "VCN DHCP options OCID" 31 | } 32 | variable "vcn_subnet_cidr" { 33 | description = "CIDR for VCN subnet" 34 | type = "list" 35 | } 36 | variable "security_list_ids" { 37 | description = "Security List OCID" 38 | type = "list" 39 | } 40 | variable "dns_label" { 41 | description = "VCN DNS Label" 42 | } 43 | variable "private_subnet" { 44 | description = "Whether private or public subnet" 45 | } -------------------------------------------------------------------------------- /EBusinessSuite/modules/network/vcn/vcn.data.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Get name of object storage 7 | data "oci_core_services" "svcgtw_services" { 8 | filter { 9 | name = "name" 10 | values = [".*Object.*Storage"] 11 | regex = true 12 | } 13 | } -------------------------------------------------------------------------------- /EBusinessSuite/modules/network/vcn/vcn.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "vcnid" { 7 | description = "ocid of VCN" 8 | value = "${oci_core_virtual_network.vcn.id}" 9 | } 10 | output "default_dhcp_id" { 11 | description = "ocid of default DHCP options" 12 | value = "${oci_core_virtual_network.vcn.default_dhcp_options_id}" 13 | } 14 | 15 | output "igw_id" { 16 | description = "ocid of internet gateway" 17 | value = "${oci_core_internet_gateway.igw.id}" 18 | } 19 | 20 | output "natgtw_id" { 21 | description = "ocid of service gateway" 22 | value = "${oci_core_nat_gateway.natgtw.id}" 23 | } 24 | output "svcgtw_id" { 25 | description = "ocid of service gateway" 26 | value = "${oci_core_service_gateway.svcgtw.id}" 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /EBusinessSuite/modules/network/vcn/vcn.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Virtual Cloud Network (VCN) 7 | resource "oci_core_virtual_network" "vcn" { 8 | compartment_id = "${var.compartment_ocid}" 9 | cidr_block = "${var.vcn_cidr}" 10 | dns_label = "${var.vcn_dns_label}" 11 | display_name = "${var.vcn_dns_label}" 12 | } 13 | 14 | 15 | # Internet Gateway 16 | resource "oci_core_internet_gateway" "igw" { 17 | compartment_id = "${var.compartment_ocid}" 18 | vcn_id = "${oci_core_virtual_network.vcn.id}" 19 | display_name = "${var.vcn_dns_label}igw" 20 | } 21 | 22 | # NAT (Network Address Translation) Gateway 23 | resource "oci_core_nat_gateway" "natgtw" { 24 | compartment_id = "${var.compartment_ocid}" 25 | vcn_id = "${oci_core_virtual_network.vcn.id}" 26 | display_name = "${var.vcn_dns_label}natgtw" 27 | } 28 | 29 | 30 | # Service Gateway 31 | resource "oci_core_service_gateway" "svcgtw" { 32 | compartment_id = "${var.compartment_ocid}" 33 | 34 | services { 35 | service_id = "${lookup(data.oci_core_services.svcgtw_services.services[0], "id")}" 36 | } 37 | vcn_id = "${oci_core_virtual_network.vcn.id}" 38 | display_name = "${var.vcn_dns_label}svcgtw" 39 | } 40 | 41 | # Dynamic Routing Gateway (DRG) 42 | resource "oci_core_drg" "drg" { 43 | compartment_id = "${var.compartment_ocid}" 44 | display_name = "${var.vcn_dns_label}drg" 45 | } 46 | resource "oci_core_drg_attachment" "drg_attachment" { 47 | drg_id = "${oci_core_drg.drg.id}" 48 | vcn_id = "${oci_core_virtual_network.vcn.id}" 49 | display_name = "${var.vcn_dns_label}drgattchmt" 50 | } 51 | -------------------------------------------------------------------------------- /EBusinessSuite/modules/network/vcn/vcn.vars.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment OCID" 8 | } 9 | 10 | # VCN Variables 11 | variable "vcn_cidr" { 12 | description = "VCN CIDR" 13 | } 14 | variable "vcn_dns_label" { 15 | description = "VCN DNS Label" 16 | } 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /EBusinessSuite/outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "BastionPublicIPs" { 7 | value = ["${module.create_bastion.Bastion_Public_IPs}"] 8 | } 9 | 10 | output "ApplicationPrivateIPs" { 11 | value = ["${module.create_app.AppsPrvIPs}"] 12 | } 13 | 14 | output "FSSDetails" { 15 | value = ["${module.create_app.FSSFstabs}"] 16 | } 17 | -------------------------------------------------------------------------------- /EBusinessSuite/provider.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | # Terraform version 6 | 7 | terraform { 8 | required_version = ">= 0.11.8" 9 | } 10 | 11 | # Oracle Cloud Infrastructure (OCI) Provider 12 | 13 | provider "oci" { 14 | version = "=3.5.0" 15 | tenancy_ocid = "${var.tenancy_ocid}" 16 | user_ocid = "${var.user_ocid}" 17 | fingerprint = "${var.fingerprint}" 18 | private_key_path = "${var.private_key_path}" 19 | region = "${var.region}" 20 | } -------------------------------------------------------------------------------- /EBusinessSuite/routetables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | # Public Route Table 6 | resource "oci_core_route_table" "PublicRT" { 7 | compartment_id = "${var.compartment_ocid}" 8 | vcn_id = "${module.create_vcn.vcnid}" 9 | display_name = "${var.vcn_dns_label}pubrt" 10 | 11 | route_rules { 12 | destination = "${local.anywhere}" 13 | network_entity_id = "${module.create_vcn.igw_id}" 14 | } 15 | } 16 | 17 | # Private Route Table 18 | resource "oci_core_route_table" "PrivateRT" { 19 | compartment_id = "${var.compartment_ocid}" 20 | vcn_id = "${module.create_vcn.vcnid}" 21 | display_name = "${var.vcn_dns_label}pvtrt" 22 | 23 | route_rules { 24 | destination = "${lookup(data.oci_core_services.svcgtw_services.services[0], "cidr_block")}" 25 | destination_type = "SERVICE_CIDR_BLOCK" 26 | network_entity_id = "${module.create_vcn.svcgtw_id}" 27 | }, 28 | route_rules { 29 | destination = "${local.anywhere}" 30 | destination_type = "CIDR_BLOCK" 31 | network_entity_id = "${module.create_vcn.natgtw_id}" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /EBusinessSuite/terraform.tfvars: -------------------------------------------------------------------------------- 1 | # AD (Availability Domain to use for creating EBS infrastructure) 2 | AD = "[]" 3 | 4 | # CIDR block of VCN to be created 5 | vcn_cidr = "" 6 | 7 | # DNS label of VCN to be created 8 | vcn_dns_label = "" 9 | 10 | # Operating system version to be used for application instances 11 | linux_os_version = "" 12 | 13 | # Timezone of compute instance 14 | timezone = "" 15 | 16 | # Login user for bastion host 17 | bastion_user = "" 18 | 19 | # Size of boot volume (in gb) of application instances 20 | compute_boot_volume_size_in_gb = "" 21 | 22 | # Login user for compute instance 23 | compute_instance_user = "" 24 | 25 | #Environment prefix to define name of resources 26 | ebs_env_prefix = "" 27 | 28 | # Number of application instances to be created 29 | ebs_app_instance_count = "" 30 | 31 | # Shape of app instance 32 | ebs_app_instance_shape = "" 33 | 34 | # Listen port of the application instance 35 | ebs_app_instance_listen_port = "" 36 | 37 | # Mount path for application filesystem 38 | ebs_fss_primary_mount_path = "" 39 | 40 | # Set filesystem limit 41 | ebs_fss_limit_size_in_gb = "" 42 | 43 | # Datbase Edition 44 | db_edition = "" 45 | 46 | # Licensing model for database 47 | db_license_model = "" 48 | 49 | # Database version 50 | db_version = "" 51 | 52 | # Number of database nodes 53 | db_node_count = "" 54 | 55 | #Shape of Database nodes 56 | db_instance_shape = "" 57 | 58 | #Database name 59 | db_name = "" 60 | 61 | #Size of Database 62 | db_size_in_gb = "" 63 | 64 | # Database administration (sys) password 65 | db_admin_password = "" 66 | 67 | # Characterset of database 68 | db_characterset = "" 69 | 70 | # National Characterset of database 71 | db_nls_characterset = "" 72 | 73 | # Pluggable database name 74 | db_pdb_name = "" 75 | 76 | # Hostname of Load Balancer 77 | load_balancer_hostname = "" 78 | 79 | # Shape of Load Balancer 80 | load_balancer_shape = "" 81 | 82 | #Listen port of load balancer 83 | load_balancer_listen_port = "" -------------------------------------------------------------------------------- /EBusinessSuite/variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "tenancy_ocid" {} 7 | variable "region" {} 8 | 9 | variable "compartment_ocid" {} 10 | 11 | variable "AD" { 12 | description = "Availbility domain number" 13 | type = "list" 14 | } 15 | variable "user_ocid" {} 16 | variable "fingerprint" {} 17 | variable "private_key_path" {} 18 | variable "ssh_public_key" { 19 | description = "SSH public key for instances" 20 | } 21 | variable "ssh_private_key" { 22 | description = "SSH private key for instances" 23 | } 24 | 25 | variable "bastion_ssh_public_key" { 26 | description = "SSH public key for bastion instance" 27 | } 28 | variable "bastion_ssh_private_key" { 29 | description = "SSH private key for bastion_instance" 30 | } 31 | variable "InstanceOS" { 32 | description = "Operating system for compute instances" 33 | default = "Oracle Linux" 34 | } 35 | variable "linux_os_version" { 36 | description = "Operating system version for compute instances except NAT" 37 | default = "7.5" 38 | } 39 | 40 | # VCN variables 41 | variable "vcn_cidr" { 42 | description = "CIDR for Virtual Cloud Network (VCN)" 43 | } 44 | variable "vcn_dns_label" { 45 | description = "DNS label for Virtual Cloud Network (VCN)" 46 | } 47 | 48 | # Bastion host variables 49 | variable "bastion_instance_shape" { 50 | description = "Instance shape of bastion host" 51 | default = "VM.Standard2.1" 52 | } 53 | 54 | # Application Server variables 55 | variable "ebs_env_prefix" { 56 | } 57 | 58 | variable "ebs_app_instance_count" { 59 | description = "Application Server count" 60 | } 61 | 62 | variable "ebs_app_instance_shape" { 63 | description = "Application Instance shape" 64 | } 65 | variable "ebs_app_instance_listen_port" { 66 | description = "Application instance listen port" 67 | } 68 | 69 | variable "ebs_fss_primary_mount_path" { 70 | description = "Mountpoint for primary application servers" 71 | } 72 | 73 | variable "ebs_fss_limit_size_in_gb" { 74 | description = "Mountpoint for primary application servers" 75 | } 76 | 77 | variable "compute_boot_volume_size_in_gb" { 78 | description = "Boot volume size of application servers" 79 | } 80 | 81 | variable "timezone" { 82 | description = "Set timezone for servers" 83 | } 84 | 85 | # Database variables 86 | variable "db_edition" { 87 | description = "DB Edition" 88 | default = "ENTERPRISE_EDITION_EXTREME_PERFORMANCE" 89 | } 90 | 91 | variable "db_instance_shape" { 92 | description = "DB Instance shape" 93 | } 94 | 95 | variable "db_node_count" { 96 | description = "Number of DB Nodes" 97 | } 98 | variable "db_size_in_gb" { 99 | description = "Size of database in GB" 100 | } 101 | variable "db_license_model" { 102 | description = "Database License model" 103 | } 104 | 105 | variable "db_admin_password" { 106 | description = "Database Admin password" 107 | } 108 | variable "db_name" { 109 | description = "Database Name" 110 | } 111 | variable "db_characterset" { 112 | description = "Database Characterset" 113 | } 114 | variable "db_nls_characterset" { 115 | description = "Database National Characterset" 116 | } 117 | 118 | variable "db_version" { 119 | description = "Database version" 120 | } 121 | variable "db_pdb_name" { 122 | description = "Pluggable database Name" 123 | } 124 | 125 | variable load_balancer_shape { 126 | description = "Load Balancer shape" 127 | } 128 | variable load_balancer_private { 129 | description = "Whether private Load balancer" 130 | default = true 131 | } 132 | variable load_balancer_hostname { 133 | description = "Load Balancer hostname" 134 | } 135 | 136 | variable load_balancer_listen_port { 137 | description = "Load balancer listen port" 138 | } 139 | 140 | variable "timeout" { 141 | description = "Timeout setting for resource creation" 142 | default = "10m" 143 | } 144 | 145 | variable "compute_instance_user" { 146 | description = "Login user for application instance" 147 | } 148 | 149 | variable "bastion_user" { 150 | description = "Login user for bastion host" 151 | } -------------------------------------------------------------------------------- /JDEdwards/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/JDEdwards/.gitignore -------------------------------------------------------------------------------- /JDEdwards/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0 4 | 5 | Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this software, associated documentation and/or data (collectively the "Software"), free of charge and under any and all copyright rights in the Software, and any and all patent rights owned or freely licensable by each licensor hereunder covering either (i) the unmodified Software as contributed to or provided by such licensor, or (ii) the Larger Works (as defined below), to deal in both 6 | 7 | (a) the Software, and 8 | 9 | (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if one is included with the Software (each a “Larger Work” to which the Software is contributed by such licensors), 10 | 11 | without restriction, including without limitation the rights to copy, create derivative works of, display, perform, and distribute the Software and make, use, sell, offer for sale, import, export, have made, and have sold the Software and the Larger Work(s), and to sublicense the foregoing rights on either these or other terms. 12 | 13 | This license is subject to the following condition: 14 | 15 | The above copyright notice and either this complete permission notice or at a minimum a reference to the UPL must be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /JDEdwards/_docs/multiple_availability_domain_jd_edwards_deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/JDEdwards/_docs/multiple_availability_domain_jd_edwards_deployment.png -------------------------------------------------------------------------------- /JDEdwards/_docs/single_availability_domain_jd_edwards_deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/JDEdwards/_docs/single_availability_domain_jd_edwards_deployment.png -------------------------------------------------------------------------------- /JDEdwards/env-vars: -------------------------------------------------------------------------------- 1 | ### Authentication details 2 | export TF_VAR_tenancy_ocid="" 3 | export TF_VAR_user_ocid="" 4 | export TF_VAR_fingerprint="" 5 | export TF_VAR_private_key_path="" 6 | 7 | ### Region 8 | export TF_VAR_region="" 9 | 10 | ### Compartment 11 | export TF_VAR_compartment_ocid="" 12 | 13 | ### Public/private keys used on the instance 14 | export TF_VAR_ssh_public_key= 15 | export TF_VAR_ssh_private_key= 16 | 17 | ### Public/private keys used on the bastion instance 18 | export TF_VAR_bastion_ssh_public_key= 19 | export TF_VAR_bastion_ssh_private_key= -------------------------------------------------------------------------------- /JDEdwards/env-vars.ps1: -------------------------------------------------------------------------------- 1 | #Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | #The Universal Permissive License (UPL), Version 1.0 4 | 5 | 6 | ### Authentication details 7 | $env:TF_VAR_tenancy_ocid="" 8 | $env:TF_VAR_user_ocid="" 9 | $env:TF_VAR_fingerprint="" 10 | $env:TF_VAR_private_key_path="" 11 | 12 | ### Region 13 | $env:TF_VAR_region="" 14 | 15 | ### Compartment 16 | $env:TF_VAR_compartment_ocid="" 17 | 18 | ### Public/private keys used on the instance 19 | $env:TF_VAR_ssh_public_key="" 20 | $env:TF_VAR_ssh_private_key="" 21 | 22 | ### Public/private keys used on the bastion instance 23 | $env:TF_VAR_bastion_ssh_public_key="" 24 | $env:TF_VAR_bastion_ssh_private_key="" 25 | -------------------------------------------------------------------------------- /JDEdwards/global/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/JDEdwards/global/.gitignore -------------------------------------------------------------------------------- /JDEdwards/global/bastion/bastion.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "Bastion_Public_IPs" { 7 | value = ["${oci_core_instance.bastion.*.public_ip}"] 8 | } -------------------------------------------------------------------------------- /JDEdwards/global/bastion/bastion.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_core_instance" "bastion" { 7 | compartment_id = "${var.compartment_ocid}" 8 | count = "${length(var.availability_domain)}" 9 | availability_domain = "${element(var.availability_domain, count.index)}" 10 | display_name = "${var.bastion_hostname_prefix}${count.index+1}" 11 | shape = "${var.bastion_instance_shape}" 12 | 13 | create_vnic_details { 14 | subnet_id = "${element(var.bastion_subnet, count.index)}" 15 | display_name = "${var.bastion_hostname_prefix}${count.index+1}" 16 | assign_public_ip = true 17 | hostname_label = "${var.bastion_hostname_prefix}${count.index+1}" 18 | }, 19 | source_details { 20 | source_type = "image" 21 | source_id = "${var.bastion_image}" 22 | boot_volume_size_in_gbs = "60" 23 | } 24 | metadata { 25 | ssh_authorized_keys = "${trimspace(file(var.bastion_ssh_public_key))}" 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /JDEdwards/global/bastion/bastion.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | variable "availability_domain" { 10 | type = "list" 11 | description = "Availability domain" 12 | } 13 | 14 | variable "AD" { 15 | type= "list" 16 | } 17 | #Bastion host variables 18 | variable "bastion_hostname_prefix" {} 19 | 20 | variable "bastion_instance_shape" { 21 | description = "Instance shape of bastion host" 22 | } 23 | 24 | variable "bastion_subnet" { 25 | type = "list" 26 | description = "Subnet for Bastion host" 27 | } 28 | 29 | variable "bastion_image" { 30 | description ="OS Image" 31 | } 32 | 33 | variable "bastion_ssh_public_key" { 34 | description = "Bastion Host SSH public key" 35 | } 36 | -------------------------------------------------------------------------------- /JDEdwards/global/global.datasources.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Get list of Availability Domains 7 | data "oci_identity_availability_domains" "ADs" { 8 | compartment_id = "${var.tenancy_ocid}" 9 | } 10 | 11 | # Get name of Availability Domains 12 | data "template_file" "deployment_ad" { 13 | count = "${length(var.AD)}" 14 | template = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[var.AD[count.index] - 1], "name")}" 15 | } 16 | 17 | 18 | # Get latest Oracle Linux image 19 | data "oci_core_images" "InstanceImageOCID" { 20 | compartment_id = "${var.tenancy_ocid}" 21 | operating_system = "${var.InstanceOS}" 22 | operating_system_version = "${var.linux_os_version}" 23 | filter { 24 | name = "display_name" 25 | values = ["^.*Oracle[^G]*$"] 26 | regex = true 27 | } 28 | } 29 | 30 | # Get swift object storage name for Service Gateway 31 | data "oci_core_services" "svcgtw_services" { 32 | filter { 33 | name = "name" 34 | values = [".*Object.*Storage"] 35 | regex = true 36 | } 37 | } -------------------------------------------------------------------------------- /JDEdwards/global/global.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "vcn_id" { 7 | value = "${module.create_vcn.vcn_id}" 8 | } 9 | output "bastion_public_ip" { 10 | value = ["${module.create_bastion.Bastion_Public_IPs}"] 11 | } 12 | 13 | 14 | 15 | output "bassubid" { 16 | value = ["${module.bas_subnet.subnet_ids}"] 17 | } 18 | 19 | output "psntsubid" { 20 | value = ["${module.psnt_subnet.subnet_ids}"] 21 | } 22 | 23 | output "midsubid" { 24 | value = ["${module.mid_subnet.subnet_ids}"] 25 | } 26 | 27 | output "dbsubid" { 28 | value = ["${module.db_subnet.subnet_ids}"] 29 | } 30 | 31 | output "adminsubid" { 32 | value = ["${module.admin_subnet.subnet_ids}"] 33 | } 34 | 35 | output "lbsubid" { 36 | value = ["${module.lb_subnet.subnet_ids}"] 37 | } 38 | 39 | output "bassubname" { 40 | value = ["${module.bas_subnet.subnet_names}"] 41 | } 42 | 43 | 44 | 45 | output "adminsubname" { 46 | value = ["${module.admin_subnet.subnet_names}"] 47 | } 48 | 49 | output "psntsubname" { 50 | value = ["${module.psnt_subnet.subnet_names}"] 51 | } 52 | 53 | output "midsubname" { 54 | value = ["${module.mid_subnet.subnet_names}"] 55 | } 56 | 57 | output "dbsubname" { 58 | value = ["${module.db_subnet.subnet_names}"] 59 | } 60 | 61 | output "lbsubname" { 62 | value = ["${module.lb_subnet.subnet_names}"] 63 | } 64 | -------------------------------------------------------------------------------- /JDEdwards/global/global.provider.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | # Terraform version 6 | 7 | terraform { 8 | required_version = ">= 0.11.8" 9 | } 10 | 11 | # Oracle Cloud Infrastructure (OCI) Provider 12 | 13 | provider "oci" { 14 | version = "=3.5.0" 15 | tenancy_ocid = "${var.tenancy_ocid}" 16 | user_ocid = "${var.user_ocid}" 17 | fingerprint = "${var.fingerprint}" 18 | private_key_path = "${var.private_key_path}" 19 | region = "${var.region}" 20 | } -------------------------------------------------------------------------------- /JDEdwards/global/global.routetables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | locals { 6 | anywhere = "0.0.0.0/0" 7 | } 8 | 9 | # Public Route Table 10 | resource "oci_core_route_table" "PublicRT" { 11 | compartment_id = "${var.compartment_ocid}" 12 | vcn_id = "${module.create_vcn.vcn_id}" 13 | display_name = "${var.vcn_dns_label}pubrt" 14 | 15 | route_rules { 16 | destination = "${local.anywhere}" 17 | network_entity_id = "${module.create_vcn.igw_id}" 18 | } 19 | } 20 | 21 | # Private Route Table 22 | resource "oci_core_route_table" "PrivateRT" { 23 | compartment_id = "${var.compartment_ocid}" 24 | vcn_id = "${module.create_vcn.vcn_id}" 25 | display_name = "${var.vcn_dns_label}pvtrt" 26 | 27 | route_rules { 28 | destination = "${lookup(data.oci_core_services.svcgtw_services.services[0], "cidr_block")}" 29 | destination_type = "SERVICE_CIDR_BLOCK" 30 | network_entity_id = "${module.create_vcn.svcgtw_id}" 31 | }, 32 | route_rules { 33 | destination = "${local.anywhere}" 34 | destination_type = "CIDR_BLOCK" 35 | network_entity_id = "${module.create_vcn.natgtw_id}" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /JDEdwards/global/global.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "tenancy_ocid" {} 7 | variable "user_ocid" {} 8 | variable "fingerprint" {} 9 | variable "region" {} 10 | 11 | variable "compartment_ocid" {} 12 | 13 | variable "private_key_path" {} 14 | 15 | variable "ssh_public_key" {} 16 | variable "ssh_private_key" {} 17 | variable "AD" { 18 | type= "list" 19 | } 20 | 21 | 22 | # VCN variables 23 | variable "vcn_cidr" { 24 | description = "CIDR for Virtual Cloud Network (VCN)" 25 | } 26 | 27 | variable "vcn_dns_label" { 28 | description = "DNS label for Virtual Cloud Network (VCN)" 29 | } 30 | 31 | variable "lbaas_es_port" { 32 | type = "list" 33 | } 34 | 35 | variable "lbaas_standalone_html" { 36 | type = "string" 37 | } 38 | 39 | variable "lbaas_html" { 40 | type = "string" 41 | } 42 | 43 | variable "lbaas_ais" { 44 | type = "string" 45 | } 46 | 47 | variable "standalone_jas_pd" { 48 | type = "list" 49 | } 50 | 51 | variable "jas_pd" { 52 | type = "list" 53 | } 54 | 55 | variable "ais_pd" { 56 | type = "list" 57 | } 58 | variable "web_nonpd" { 59 | type = "list" 60 | } 61 | 62 | variable "InstanceOS" { 63 | description = "Operating system for compute instances" 64 | default = "Oracle Linux" 65 | } 66 | 67 | variable "linux_os_version" { 68 | description = "Operating system version for all compute instances except NAT" 69 | default = "7.5" 70 | } 71 | 72 | variable "bastion_instance_shape" { 73 | description = "Instance shape of bastion host" 74 | default = "VM.Standard2.1" 75 | } 76 | 77 | variable "bastion_ssh_public_key" {} 78 | 79 | variable "env_prefix" { 80 | } 81 | -------------------------------------------------------------------------------- /JDEdwards/global/network/subnets/subnets.output.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | output "subnet_ids" { 6 | value = ["${oci_core_subnet.subnet.*.id}"] 7 | } 8 | 9 | output "subnet_names" { 10 | value = ["${oci_core_subnet.subnet.*.subnet_domain_name}"] 11 | } -------------------------------------------------------------------------------- /JDEdwards/global/network/subnets/subnets.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_core_subnet" "subnet" { 7 | count = "${length(var.availability_domain)}" 8 | availability_domain = "${element(var.availability_domain, count.index)}" 9 | cidr_block = "${var.vcn_subnet_cidr[count.index]}" 10 | display_name = "${var.dns_label}${var.AD[count.index]}" 11 | dns_label = "${var.dns_label}${var.AD[count.index]}" 12 | compartment_id = "${var.compartment_ocid}" 13 | vcn_id = "${var.vcn_id}" 14 | route_table_id = "${var.route_table_id}" 15 | security_list_ids = ["${var.security_list_ids}"] 16 | prohibit_public_ip_on_vnic = "${var.private_subnet}" 17 | dhcp_options_id = "${var.dhcp_options_id}" 18 | lifecycle { 19 | ignore_changes = ["availability_domain"] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /JDEdwards/global/network/subnets/subnets.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" {} 7 | 8 | 9 | 10 | variable "vcn_id" {} 11 | 12 | variable "route_table_id" {} 13 | 14 | variable "availability_domain" { 15 | type = "list" 16 | default = [] 17 | } 18 | 19 | 20 | variable "AD" { 21 | type = "list" 22 | } 23 | variable "dhcp_options_id" {} 24 | 25 | variable "vcn_subnet_cidr" { 26 | type = "list" 27 | default = [] 28 | } 29 | variable "security_list_ids" {} 30 | 31 | variable "dns_label" {} 32 | 33 | variable "private_subnet" {} 34 | -------------------------------------------------------------------------------- /JDEdwards/global/network/vcn/vcn.data.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | data "oci_core_services" "svcgtw_services" { 7 | filter { 8 | name = "name" 9 | #values = ["Test-Casper-Service", ".*ObjectStorage"] 10 | values = [".*Object.*Storage"] 11 | regex = true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /JDEdwards/global/network/vcn/vcn.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "vcn_id" { 7 | description = "ocid of VCN" 8 | value = "${oci_core_virtual_network.vcn.id}" 9 | } 10 | output "default_dhcp_id" { 11 | description = "ocid of default DHCP options" 12 | value = "${oci_core_virtual_network.vcn.default_dhcp_options_id}" 13 | } 14 | 15 | output "igw_id" { 16 | description = "ocid of internet gateway" 17 | value = "${oci_core_internet_gateway.igw.id}" 18 | } 19 | 20 | output "natgtw_id" { 21 | description = "ocid of service gateway" 22 | value = "${oci_core_nat_gateway.natgtw.id}" 23 | } 24 | output "svcgtw_id" { 25 | description = "ocid of service gateway" 26 | value = "${oci_core_service_gateway.svcgtw.id}" 27 | } 28 | 29 | 30 | 31 | output "pubslid" { 32 | value = "${oci_core_security_list.publicsl.id}" 33 | } 34 | 35 | 36 | 37 | output "dbslid" { 38 | value = "${oci_core_security_list.dbsl.id}" 39 | } 40 | 41 | output "psntslid" { 42 | value = "${oci_core_security_list.psntsl.id}" 43 | } 44 | output "midslid" { 45 | value = "${oci_core_security_list.middlesl.id}" 46 | } 47 | 48 | output "admslid" { 49 | value = "${oci_core_security_list.adminsl.id}" 50 | } 51 | 52 | output "lbslid" { 53 | value = "${oci_core_security_list.lbsl.id}" 54 | } 55 | -------------------------------------------------------------------------------- /JDEdwards/global/network/vcn/vcn.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Virtual Cloud Network (VCN) 7 | resource "oci_core_virtual_network" "vcn" { 8 | compartment_id = "${var.compartment_ocid}" 9 | cidr_block = "${var.vcn_cidr}" 10 | dns_label = "${var.vcn_dns_label}" 11 | display_name = "${var.vcn_dns_label}" 12 | } 13 | 14 | 15 | # Internet Gateway 16 | resource "oci_core_internet_gateway" "igw" { 17 | compartment_id = "${var.compartment_ocid}" 18 | vcn_id = "${oci_core_virtual_network.vcn.id}" 19 | display_name = "${var.vcn_dns_label}igw" 20 | } 21 | 22 | # NAT (Network Address Translation) Gateway 23 | resource "oci_core_nat_gateway" "natgtw" { 24 | compartment_id = "${var.compartment_ocid}" 25 | vcn_id = "${oci_core_virtual_network.vcn.id}" 26 | display_name = "${var.vcn_dns_label}natgtw" 27 | } 28 | 29 | 30 | # Service Gateway 31 | resource "oci_core_service_gateway" "svcgtw" { 32 | compartment_id = "${var.compartment_ocid}" 33 | 34 | services { 35 | service_id = "${lookup(data.oci_core_services.svcgtw_services.services[0], "id")}" 36 | } 37 | vcn_id = "${oci_core_virtual_network.vcn.id}" 38 | display_name = "${var.vcn_dns_label}svcgtw" 39 | } 40 | 41 | # Dynamic Routing Gateway (DRG) 42 | resource "oci_core_drg" "drg" { 43 | compartment_id = "${var.compartment_ocid}" 44 | display_name = "${var.vcn_dns_label}drg" 45 | } 46 | resource "oci_core_drg_attachment" "drg_attachment" { 47 | drg_id = "${oci_core_drg.drg.id}" 48 | vcn_id = "${oci_core_virtual_network.vcn.id}" 49 | display_name = "${var.vcn_dns_label}drgattchmt" 50 | } 51 | -------------------------------------------------------------------------------- /JDEdwards/global/network/vcn/vcn.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" {} 7 | 8 | # VCN Variables 9 | variable "vcn_cidr" {} 10 | 11 | variable "vcn_dns_label" {} 12 | 13 | variable "lbaas_es_port" { 14 | type = "list" 15 | } 16 | 17 | variable "lbaas_standalone_html" { 18 | type = "string" 19 | } 20 | 21 | variable "lbaas_html" { 22 | type = "string" 23 | } 24 | 25 | variable "lbaas_ais" { 26 | type = "string" 27 | } 28 | 29 | variable "standalone_jas_pd" { 30 | type = "list" 31 | } 32 | 33 | variable "jas_pd" { 34 | type = "list" 35 | } 36 | 37 | variable "ais_pd" { 38 | type = "list" 39 | } 40 | 41 | variable "web_nonpd" { 42 | type = "list" 43 | } 44 | -------------------------------------------------------------------------------- /JDEdwards/inputJson/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/JDEdwards/inputJson/.gitkeep -------------------------------------------------------------------------------- /JDEdwards/inputJson/sample.network.json: -------------------------------------------------------------------------------- 1 | { 2 | "AD": [ 3 | "1", 4 | "2" 5 | ], 6 | "vcn_dns_label": "jdevcn", 7 | "vcn_cidr": "172.16.0.0/16", 8 | "linux_os_version": "7.5", 9 | "env_prefix": "jde", 10 | "lbaas_es_port": [ 11 | "6017", 12 | "6022" 13 | ], 14 | "standalone_jas_pd": [ 15 | "8000", 16 | "8003" 17 | ], 18 | "lbaas_standalone_html": "8000", 19 | "jas_pd": [ 20 | "8010", 21 | "8013" 22 | ], 23 | "lbaas_html": "8010", 24 | "ais_pd": [ 25 | "8020", 26 | "8023" 27 | ], 28 | "lbaas_ais": "8020", 29 | "web_nonpd": [ 30 | "8030", 31 | "8050" 32 | ] 33 | } -------------------------------------------------------------------------------- /JDEdwards/inputJson/sample.nonpd.json: -------------------------------------------------------------------------------- 1 | { 2 | "AD": [ 3 | "1" 4 | ], 5 | "env_prefix": "npd", 6 | "sm_instance_count": "0", 7 | "sm_instance_shape": "VM.Standard2.2", 8 | "sm_bv_size": "80", 9 | "dep_instance_count": "0", 10 | "dep_instance_shape": "VM.Standard2.2", 11 | "logic_instance_count": "1", 12 | "logic_instance_shape": "VM.Standard2.2", 13 | "logic_bv_size": "50", 14 | "batch_instance_count": "0", 15 | "batch_instance_shape": "VM.Standard2.2", 16 | "batch_bv_size": "50", 17 | "wls_instance_count": "1", 18 | "wls_instance_shape": "VM.Standard2.2", 19 | "wls_bv_size": "50", 20 | "unix_mount_directory": "//u01", 21 | "db_count": "1", 22 | "db_admin_password": "", 23 | "db_characterset": "AL32UTF8", 24 | "db_edition": "ENTERPRISE_EDITION_EXTREME_PERFORMANCE", 25 | "db_instance_shape": "VM.Standard2.2", 26 | "db_license_model": "LICENSE_INCLUDED", 27 | "db_name": "ORCL", 28 | "db_nls_characterset": "AL16UTF16", 29 | "db_node_count": "1", 30 | "db_pdb_name": "JDEPDB", 31 | "db_size_in_gb": "256", 32 | "db_version": "12.1.0.2" 33 | } -------------------------------------------------------------------------------- /JDEdwards/inputJson/sample.nonpdsubnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "adminsubid": [ 3 | "ocid1.subnet.oc1.iad.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 4 | ], 5 | "bassubid": [ 6 | "ocid1.subnet.oc1.iad.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 7 | ], 8 | "dbsubid": [ 9 | "ocid1.subnet.oc1.iad.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 10 | ], 11 | "midsubid": [ 12 | "ocid1.subnet.oc1.iad.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 13 | ], 14 | "psntsubid": [ 15 | "ocid1.subnet.oc1.iad.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 16 | ], 17 | "lbsubid": [ 18 | "ocid1.subnet.oc1.iad.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 19 | ], 20 | "bastion_public_ip": "x.x.x.x" 21 | } -------------------------------------------------------------------------------- /JDEdwards/inputJson/sample.pd.json: -------------------------------------------------------------------------------- 1 | { 2 | "AD": [ 3 | "1", 4 | "2" 5 | ], 6 | "env_prefix": "jde", 7 | "linux_os_version": "7.5", 8 | "dns_server_zone_name": "example.com", 9 | "sm_instance_count": "1", 10 | "sm_instance_shape": "VM.Standard2.2", 11 | "sm_bv_size": "80", 12 | "dep_instance_count": "1", 13 | "dep_instance_shape": "VM.Standard2.2", 14 | "logic_instance_count": "2", 15 | "logic_instance_shape": "VM.Standard2.2", 16 | "logic_bv_size": "50", 17 | "load_balancer_logic_alias_name": "LogicLB", 18 | "batch_instance_count": "2", 19 | "batch_instance_shape": "VM.Standard2.2", 20 | "batch_bv_size": "50", 21 | "load_balancer_batch_alias_name": "BatchLB", 22 | "wls_instance_count": "2", 23 | "wls_instance_shape": "VM.Standard2.2", 24 | "wls_bv_size": "50", 25 | "load_balancer_web_alias_name": "WebLB", 26 | "unix_mount_directory": "//u01", 27 | "db_count": "2", 28 | "db_admin_password": "", 29 | "db_characterset": "AL32UTF8", 30 | "db_edition": "ENTERPRISE_EDITION_EXTREME_PERFORMANCE", 31 | "db_instance_shape": "VM.Standard2.2", 32 | "db_license_model": "LICENSE_INCLUDED", 33 | "db_name": "ORCL", 34 | "db_nls_characterset": "AL16UTF16", 35 | "db_node_count": "2", 36 | "db_pdb_name": "JDEPDB", 37 | "db_size_in_gb": "256", 38 | "db_version": "12.1.0.2", 39 | "lbaas_listen_port_standalone_html": "8000", 40 | "listen_port_range_standalone_html": [ 41 | "8000", 42 | "8001", 43 | "8002", 44 | "8003" 45 | ], 46 | "lbaas_listen_port_html": "8010", 47 | "listen_port_range_html": [ 48 | "8010", 49 | "8011", 50 | "8012", 51 | "8013" 52 | ], 53 | "lbaas_listen_port_ais": "8020", 54 | "listen_port_range_ais": [ 55 | "8020", 56 | "8021", 57 | "8022", 58 | "8023" 59 | ], 60 | "load_balancer_shape": "100Mbps", 61 | "load_balancer_certificate_name": "jdelb", 62 | "load_balancer_ca_certificate": "", 63 | "load_balancer_certificate_passphrase": "", 64 | "load_balancer_certificate_private_key": "", 65 | "load_balancer_certificate_public_certificate": "load_balancer_certificate_public_certificate>", 66 | "pdHtmlCount": "4", 67 | "pdAISCount": "2" 68 | } -------------------------------------------------------------------------------- /JDEdwards/inputJson/sample.pdsubnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "adminsubid": [ 3 | "ocid1.subnet.oc1.phx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 4 | ], 5 | "bassubid": [ 6 | "ocid1.subnet.oc1.phx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 7 | "ocid1.subnet.oc1.phx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 8 | ], 9 | "dbsubid": [ 10 | "ocid1.subnet.oc1.phx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 11 | "ocid1.subnet.oc1.phx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 12 | ], 13 | "midsubid": [ 14 | "ocid1.subnet.oc1.phx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 15 | "ocid1.subnet.oc1.phx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 16 | ], 17 | "psntsubid": [ 18 | "ocid1.subnet.oc1.phx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 19 | "ocid1.subnet.oc1.phx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 20 | ], 21 | "lbsubid": [ 22 | "ocid1.subnet.oc1.phx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 23 | "ocid1.subnet.oc1.phx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 24 | ], 25 | "bastion_public_ip": "x.x.x.x" 26 | } -------------------------------------------------------------------------------- /JDEdwards/modules/app/app.bv.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_core_volume" "app_block" { 7 | #count = "${var.app_instance_count}" 8 | count = "${var.app_block_size != 0 ? var.app_instance_count : 0}" 9 | availability_domain = "${element(var.availability_domain, count.index)}" 10 | compartment_id = "${var.compartment_ocid}" 11 | display_name = "${var.app_hostname_prefix}vol${count.index+1}" 12 | size_in_gbs = "${var.app_block_size}" 13 | } 14 | 15 | resource "oci_core_volume_attachment" "app_block_attach" { 16 | attachment_type = "iscsi" 17 | #count = "${var.app_instance_count}" 18 | count = "${var.app_block_size != 0 ? var.app_instance_count : 0}" 19 | compartment_id = "${var.compartment_ocid}" 20 | instance_id = "${element(oci_core_instance.jdeapp.*.id, count.index)}" 21 | volume_id = "${element(oci_core_volume.app_block.*.id, count.index)}" 22 | 23 | provisioner "remote-exec" { 24 | connection { 25 | agent = false 26 | timeout = "30m" 27 | host = "${element(oci_core_instance.jdeapp.*.private_ip, count.index)}" 28 | user = "opc" 29 | private_key = "${file(var.app_ssh_private_key)}" 30 | bastion_host = "${var.bastion_public_ip}" 31 | bastion_port = "22" 32 | bastion_user = "opc" 33 | bastion_private_key = "${file(var.bastion_ssh_private_key)}" 34 | } 35 | 36 | inline = [ 37 | "sudo mkdir /u01", 38 | "sudo service iscsi reload", 39 | "sudo -s bash -c 'iscsiadm -m node -o new -T ${self.iqn} -p ${self.ipv4}:${self.port}'", 40 | "sudo -s bash -c 'iscsiadm -m node -o update -T ${self.iqn} -n node.startup -v automatic '", 41 | "sudo -s bash -c 'iscsiadm -m node -T ${self.iqn} -p ${self.ipv4}:${self.port} -l '", 42 | "sudo -s bash -c 'mkfs.ext4 -F /dev/sdb'", 43 | "sudo -s bash -c 'mount -t ext4 /dev/sdb /u01'", 44 | "sudo -s bash -c 'echo \"/dev/sdb /u01 ext4 defaults,noatime,_netdev,nofail 0 2\" >> /etc/fstab'", 45 | ] 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /JDEdwards/modules/app/app.init.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "null_resource" "remote-exec" { 7 | count = "${var.app_instance_count}" 8 | 9 | depends_on = ["oci_core_instance.jdeapp", 10 | "oci_core_volume.app_block", 11 | "oci_core_volume_attachment.app_block_attach", 12 | ] 13 | provisioner "remote-exec" { 14 | connection { 15 | agent = false 16 | timeout = "30m" 17 | host = "${oci_core_instance.jdeapp.*.private_ip[count.index % var.app_instance_count]}" 18 | user = "opc" 19 | private_key = "${file(var.app_ssh_private_key)}" 20 | bastion_host = "${var.bastion_public_ip}" 21 | bastion_port = "22" 22 | bastion_user = "opc" 23 | bastion_private_key = "${file(var.bastion_ssh_private_key)}" 24 | } 25 | 26 | inline = [ 27 | "sudo mkdir -p /u01/jde_tf/${var.init_dir_name}", 28 | "sudo chmod -R 777 /u01/jde_tf/${var.init_dir_name}", 29 | ] 30 | } 31 | 32 | provisioner "file" { 33 | connection { 34 | agent = false 35 | timeout = "30m" 36 | host = "${oci_core_instance.jdeapp.*.private_ip[count.index % var.app_instance_count]}" 37 | user = "opc" 38 | private_key = "${file(var.app_ssh_private_key)}" 39 | bastion_host = "${var.bastion_public_ip}" 40 | bastion_port = "22" 41 | bastion_user = "opc" 42 | bastion_private_key = "${file(var.bastion_ssh_private_key)}" 43 | } 44 | 45 | source = "../modules/userdata/${var.init_dir_name}/" 46 | destination = "/u01/jde_tf/${var.init_dir_name}" 47 | } 48 | 49 | provisioner "remote-exec" { 50 | connection { 51 | agent = false 52 | timeout = "30m" 53 | host = "${oci_core_instance.jdeapp.*.private_ip[count.index % var.app_instance_count]}" 54 | user = "opc" 55 | private_key = "${file(var.app_ssh_private_key)}" 56 | bastion_host = "${var.bastion_public_ip}" 57 | bastion_port = "22" 58 | bastion_user = "opc" 59 | bastion_private_key = "${file(var.bastion_ssh_private_key)}" 60 | } 61 | 62 | inline = [ 63 | "sudo chmod -R 755 /u01/jde_tf/${var.init_dir_name}", 64 | "sudo setenforce 0", 65 | "sudo cd /u01/jde_tf/${var.init_dir_name}", 66 | "if [ -f /u01/jde_tf/${var.init_dir_name}/JDE_OCProv_*.tgz ]; then sudo tar -xvf /u01/jde_tf/${var.init_dir_name}/JDE_OCProv_*.tgz --directory /u01/; fi", 67 | "sudo chmod 770 /u01", 68 | ] 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /JDEdwards/modules/app/app.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "PrvIPs" { 7 | value = ["${oci_core_instance.jdeapp.*.private_ip}"] 8 | } 9 | 10 | output "HostNames" { 11 | value = ["${oci_core_instance.jdeapp.*.display_name}"] 12 | } 13 | -------------------------------------------------------------------------------- /JDEdwards/modules/app/app.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_core_instance" "jdeapp" { 7 | count = "${var.app_instance_count}" 8 | availability_domain = "${element(var.availability_domain, count.index)}" 9 | compartment_id = "${var.compartment_ocid}" 10 | display_name = "${var.app_hostname_prefix}${count.index+1}" 11 | shape = "${var.app_instance_shape}" 12 | fault_domain = "${element(var.fault_domain, count.index)}" 13 | 14 | create_vnic_details { 15 | subnet_id = "${element(var.app_subnet, count.index)}" 16 | display_name = "${var.app_hostname_prefix}${count.index+1}" 17 | assign_public_ip = false 18 | hostname_label = "${var.app_hostname_prefix}${count.index+1}" 19 | } 20 | 21 | source_details { 22 | source_type = "image" 23 | source_id = "${var.app_image}" 24 | } 25 | 26 | metadata { 27 | ssh_authorized_keys = "${file(var.app_ssh_public_key)}" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /JDEdwards/modules/app/app.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | 10 | variable "app_instance_count" {} 11 | 12 | variable "app_instance_shape" {} 13 | 14 | variable "app_hostname_prefix" { 15 | description = "Host name" 16 | } 17 | 18 | variable "app_image" { 19 | description = "OS Image" 20 | } 21 | 22 | variable "app_ssh_private_key" { 23 | description = "SSH key" 24 | } 25 | 26 | variable "app_ssh_public_key" { 27 | description = "SSH key" 28 | } 29 | 30 | variable "app_subnet" { 31 | type = "list" 32 | description = "subnet" 33 | } 34 | 35 | variable "availability_domain" { 36 | type = "list" 37 | } 38 | 39 | variable "fault_domain" { 40 | description = "Fault Domain" 41 | type = "list" 42 | } 43 | 44 | variable "AD" { 45 | type = "list" 46 | } 47 | 48 | variable "bastion_public_ip" { 49 | type = "string" 50 | } 51 | 52 | variable "bastion_ssh_private_key" {} 53 | 54 | variable "app_block_size" {} 55 | 56 | variable "unix_mount_directory" {} 57 | 58 | variable "init_dir_name" {} 59 | -------------------------------------------------------------------------------- /JDEdwards/modules/db/db.dbsystem.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_database_db_system" "jdedb" { 7 | count = "${var.db_count}" 8 | compartment_id = "${var.compartment_ocid}" 9 | availability_domain = "${element(var.availability_domain, count.index)}" 10 | #cpu_core_count = "${lookup(data.oci_database_db_system_shapes.db_system_shapes.db_system_shapes[0], "minimum_core_count")}" 11 | database_edition = "${var.db_edition}" 12 | 13 | db_home { 14 | database { 15 | "admin_password" = "${var.db_admin_password}" 16 | "db_name" = "${var.db_name}" 17 | "character_set" = "${var.db_characterset}" 18 | "ncharacter_set" = "${var.db_nls_characterset}" 19 | "db_workload" = "${var.db_workload}" 20 | "pdb_name" = "${var.db_pdb_name}" 21 | } 22 | db_version = "${var.db_version}" 23 | display_name = "${var.db_name}" 24 | } 25 | shape = "${var.db_instance_shape}" 26 | node_count = "${var.db_node_count}" 27 | data_storage_size_in_gb = "${var.db_size_in_gb}" 28 | license_model = "${var.db_license_model}" 29 | disk_redundancy = "${var.db_disk_redundancy}" 30 | subnet_id = "${element(var.db_subnet, count.index)}" 31 | ssh_public_keys = ["${trimspace(file("${var.db_ssh_public_key}"))}"] 32 | display_name = "${var.db_hostname_prefix}${count.index + 1}" 33 | hostname = "${var.db_hostname_prefix}${count.index + 1}" 34 | } 35 | -------------------------------------------------------------------------------- /JDEdwards/modules/db/db.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "DBNodeHostname" { 7 | value = ["${oci_database_db_system.jdedb.*.display_name}"] 8 | } 9 | -------------------------------------------------------------------------------- /JDEdwards/modules/db/db.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" {} 7 | 8 | variable "db_subnet" { 9 | type="list" 10 | } 11 | variable "availability_domain" { 12 | type = "list" 13 | } 14 | 15 | # DBSystem specific 16 | #variable "db_cpucorecount" {} 17 | 18 | variable "db_edition" {} 19 | 20 | variable "db_admin_password" {} 21 | 22 | variable "db_name" {} 23 | 24 | variable "db_version" {} 25 | 26 | variable "db_disk_redundancy" { 27 | description = "Database disk redundancy for Bare Metal DB System" 28 | default="NORMAL" 29 | } 30 | 31 | variable "db_hostname_prefix" {} 32 | variable "db_instance_shape" {} 33 | 34 | variable "db_ssh_public_key" {} 35 | 36 | variable "db_ssh_private_key" {} 37 | 38 | variable "db_count" {} 39 | 40 | variable "db_nls_characterset" { 41 | default = "AL16UTF16" 42 | } 43 | 44 | variable "db_characterset" { 45 | default = "AL32UTF8" 46 | } 47 | 48 | variable "db_workload" { 49 | default = "OLTP" 50 | } 51 | 52 | variable "db_pdb_name" { 53 | default = "pdbName" 54 | } 55 | 56 | variable "db_size_in_gb" { 57 | default = "256" 58 | } 59 | 60 | variable "db_license_model" { 61 | default = "LICENSE_INCLUDED" 62 | } 63 | 64 | variable "db_node_count" { 65 | default = "1" 66 | } 67 | variable "init_dir_name" {} 68 | 69 | variable "bastion_public_ip" { 70 | type = "string" 71 | } 72 | 73 | variable "bastion_ssh_private_key" {} 74 | -------------------------------------------------------------------------------- /JDEdwards/modules/dns/dns.datasources.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | data "oci_dns_zones" "zs" { 7 | compartment_id = "${var.compartment_ocid}" 8 | name = "${var.dns_server_zone_name}" 9 | #name_contains = "${var.dns_server_zone_name}" 10 | state = "ACTIVE" 11 | sort_by = "name" # name|zoneType|timeCreated 12 | sort_order = "DESC" # ASC|DESC 13 | } 14 | 15 | data "oci_dns_records" "rs" { 16 | zone_name_or_id = "${oci_dns_zone.jde_zone.name}" 17 | 18 | # optional 19 | compartment_id = "${var.compartment_ocid}" 20 | domain = "${var.dns_server_zone_name}" 21 | } 22 | -------------------------------------------------------------------------------- /JDEdwards/modules/dns/dns.main.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_dns_zone" "jde_zone" { 7 | compartment_id = "${var.compartment_ocid}" 8 | name = "${var.dns_server_zone_name}" 9 | zone_type = "PRIMARY" 10 | } 11 | 12 | resource "oci_dns_record" "batch_alias" { 13 | count = "2" 14 | zone_name_or_id = "${oci_dns_zone.jde_zone.name}" 15 | domain = "${var.batch_alias}.${oci_dns_zone.jde_zone.name}" 16 | rtype = "A" 17 | rdata = "${element(flatten(var.batch_rdata), count.index)}" 18 | ttl = 300 19 | } 20 | 21 | resource "oci_dns_record" "logic_alias" { 22 | count = "2" 23 | zone_name_or_id = "${oci_dns_zone.jde_zone.name}" 24 | domain = "${var.logic_alias}.${oci_dns_zone.jde_zone.name}" 25 | rtype = "A" 26 | rdata = "${element(flatten(var.logic_rdata), count.index)}" 27 | ttl = 300 28 | } 29 | 30 | resource "oci_dns_record" "web_alias" { 31 | count = "2" 32 | zone_name_or_id = "${var.dns_server_zone_name}" 33 | domain = "${var.web_alias}.${oci_dns_zone.jde_zone.name}" 34 | rtype = "A" 35 | rdata = "${element(flatten(var.web_rdata), count.index)}" 36 | ttl = 300 37 | } 38 | -------------------------------------------------------------------------------- /JDEdwards/modules/dns/dns.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "zones" { 7 | value = "${data.oci_dns_zones.zs.zones}" 8 | } 9 | 10 | output "records" { 11 | value = "${data.oci_dns_records.rs.records}" 12 | } 13 | -------------------------------------------------------------------------------- /JDEdwards/modules/dns/dns.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | } 8 | 9 | variable "dns_server_zone_name" { 10 | } 11 | 12 | variable "batch_alias" { 13 | default = "batch" 14 | } 15 | 16 | variable "logic_alias" { 17 | default = "logic" 18 | } 19 | 20 | variable "web_alias" { 21 | default = "web" 22 | } 23 | 24 | variable "batch_rdata" { 25 | type = "list" 26 | } 27 | 28 | variable "logic_rdata" { 29 | type = "list" 30 | } 31 | 32 | variable "web_rdata" { 33 | type = "list" 34 | } 35 | -------------------------------------------------------------------------------- /JDEdwards/modules/lbaas/lbaas.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "lb_private_ip" { 7 | value = ["${oci_load_balancer.lb.*.ip_addresses}"] 8 | } 9 | output "lb_id" { 10 | value = ["${oci_load_balancer.lb.*.id}"] 11 | } 12 | -------------------------------------------------------------------------------- /JDEdwards/modules/lbaas/lbaas.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | 7 | /* Load Balancer */ 8 | resource "oci_load_balancer" "lb" { 9 | shape = "100Mbps" 10 | count = "${length(var.load_balancer_subnet)}" 11 | compartment_id = "${var.compartment_ocid}" 12 | subnet_ids = ["${element(var.load_balancer_subnet, count.index)}"] 13 | display_name = "${var.load_balancer_name}${count.index+1}" 14 | is_private = "True" 15 | } 16 | 17 | resource "oci_load_balancer_backend_set" "lb1-bes" { 18 | count = "${length(var.load_balancer_listen_port)}" 19 | name = "lb1-bes${count.index + 1}" 20 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, 0)}" 21 | policy = "ROUND_ROBIN" 22 | 23 | health_checker { 24 | port = "0" 25 | protocol = "TCP" 26 | response_body_regex = ".*" 27 | } 28 | session_persistence_configuration { 29 | cookie_name = "*" 30 | #disable_fallback = true 31 | } 32 | } 33 | 34 | resource "oci_load_balancer_backend_set" "lb2-bes" { 35 | count = "${length(var.load_balancer_listen_port)}" 36 | name = "lb2-bes${count.index + 1}" 37 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, 1)}" 38 | policy = "ROUND_ROBIN" 39 | 40 | health_checker { 41 | port = "0" 42 | protocol = "TCP" 43 | response_body_regex = ".*" 44 | } 45 | session_persistence_configuration { 46 | cookie_name = "*" 47 | #disable_fallback = true 48 | } 49 | } 50 | 51 | # Backends for LB 1. 52 | resource "oci_load_balancer_backend" "lb1-be" { 53 | count = "${var.app_instance_count * length(var.load_balancer_listen_port)}" 54 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, 0)}" 55 | backendset_name = "${element(oci_load_balancer_backend_set.lb1-bes.*.name, count.index % length(var.load_balancer_listen_port))}" 56 | ip_address = "${element(var.be1_ip_address1, count.index / length(var.load_balancer_listen_port))}" 57 | port = "${element(var.load_balancer_listen_port, count.index % length(var.load_balancer_listen_port))}" 58 | backup = false 59 | drain = false 60 | offline = false 61 | weight = 1 62 | } 63 | 64 | # Backends for LB 2 65 | resource "oci_load_balancer_backend" "lb2-be" { 66 | count = "${var.app_instance_count * length(var.load_balancer_listen_port)}" 67 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, 1)}" 68 | backendset_name = "${element(oci_load_balancer_backend_set.lb2-bes.*.name, count.index % length(var.load_balancer_listen_port))}" 69 | ip_address = "${element(var.be1_ip_address1, count.index / length(var.load_balancer_listen_port))}" 70 | port = "${element(var.load_balancer_listen_port, count.index % length(var.load_balancer_listen_port))}" 71 | backup = false 72 | drain = false 73 | offline = false 74 | weight = 1 75 | } 76 | 77 | resource "oci_load_balancer_listener" "jdelb-listener1" { 78 | count = "${length(var.load_balancer_listen_port)}" 79 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, 0)}" 80 | name = "${var.load_balancer_name}-lsnr${count.index + 1}" 81 | default_backend_set_name = "${element(oci_load_balancer_backend_set.lb1-bes.*.name, count.index)}" 82 | port = "${element(var.load_balancer_listen_port, count.index)}" 83 | protocol = "${var.load_balancer_protocol}" 84 | connection_configuration { 85 | idle_timeout_in_seconds = "300" 86 | } 87 | } 88 | 89 | resource "oci_load_balancer_listener" "jdelb-listener2" { 90 | count = "${length(var.load_balancer_listen_port)}" 91 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, 1)}" 92 | name = "${var.load_balancer_name}-lsnr${count.index + 1}" 93 | default_backend_set_name = "${element(oci_load_balancer_backend_set.lb2-bes.*.name, count.index)}" 94 | port = "${element(var.load_balancer_listen_port, count.index)}" 95 | protocol = "${var.load_balancer_protocol}" 96 | connection_configuration { 97 | idle_timeout_in_seconds = "300" 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /JDEdwards/modules/lbaas/lbaas.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" {} 7 | 8 | variable "be1_ip_address1" { 9 | type="list" 10 | } 11 | 12 | variable "app_instance_count" {} 13 | 14 | variable "load_balancer_count" {} 15 | 16 | variable "load_balancer_private" { 17 | default = "True" 18 | } 19 | 20 | variable "load_balancer_name" { 21 | } 22 | 23 | variable "load_balancer_shape" { 24 | default = "100Mbps" 25 | } 26 | 27 | variable "load_balancer_protocol" {} 28 | 29 | variable "load_balancer_subnet" { 30 | type = "list" 31 | } 32 | 33 | variable "load_balancer_listen_port" { 34 | type = "list" 35 | default= ["6017", "6018", "6019", "6020", "6021", "6022"] 36 | } 37 | 38 | variable "app_instance_listen_port" { 39 | type = "list" 40 | default= ["6017", "6018", "6019", "6020", "6021", "6022"] 41 | } 42 | -------------------------------------------------------------------------------- /JDEdwards/modules/userdata/db/.gitignore: -------------------------------------------------------------------------------- 1 | # Terraform files 2 | .terraform 3 | terraform.tfstate 4 | terraform.tfvars 5 | *.tfstate* 6 | 7 | # OS X files 8 | .history 9 | .DS_Store 10 | -------------------------------------------------------------------------------- /JDEdwards/modules/userdata/dep/.gitignore: -------------------------------------------------------------------------------- 1 | # Terraform files 2 | .terraform 3 | terraform.tfstate 4 | terraform.tfvars 5 | *.tfstate* 6 | 7 | # OS X files 8 | .history 9 | .DS_Store 10 | -------------------------------------------------------------------------------- /JDEdwards/modules/userdata/ent/.gitignore: -------------------------------------------------------------------------------- 1 | # Terraform files 2 | .terraform 3 | terraform.tfstate 4 | terraform.tfvars 5 | *.tfstate* 6 | 7 | # OS X files 8 | .history 9 | .DS_Store 10 | -------------------------------------------------------------------------------- /JDEdwards/modules/userdata/sm/.gitignore: -------------------------------------------------------------------------------- 1 | # Terraform files 2 | .terraform 3 | terraform.tfstate 4 | terraform.tfvars 5 | *.tfstate* 6 | 7 | # OS X files 8 | .history 9 | .DS_Store 10 | -------------------------------------------------------------------------------- /JDEdwards/modules/userdata/web/.gitignore: -------------------------------------------------------------------------------- 1 | # Terraform files 2 | .terraform 3 | terraform.tfstate 4 | terraform.tfvars 5 | *.tfstate* 6 | 7 | # OS X files 8 | .history 9 | .DS_Store 10 | -------------------------------------------------------------------------------- /JDEdwards/modules/win/win.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | output "PrvIPs" { 6 | value = ["${oci_core_instance.jdeapp.*.private_ip}"] 7 | } 8 | 9 | output "HostNames" { 10 | value = ["${oci_core_instance.jdeapp.*.display_name}"] 11 | } 12 | -------------------------------------------------------------------------------- /JDEdwards/modules/win/win.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_core_instance" "jdeapp" { 7 | count = "${var.app_instance_count}" 8 | availability_domain = "${element(var.availability_domain, count.index)}" 9 | compartment_id = "${var.compartment_ocid}" 10 | display_name = "${var.app_hostname_prefix}${count.index+1}" 11 | shape = "${var.app_instance_shape}" 12 | fault_domain = "${element(var.fault_domain, count.index)}" 13 | 14 | create_vnic_details { 15 | subnet_id = "${element(var.app_subnet, count.index)}" 16 | display_name = "${var.app_hostname_prefix}${count.index+1}" 17 | assign_public_ip = false 18 | hostname_label = "${var.app_hostname_prefix}${count.index+1}" 19 | } 20 | 21 | source_details { 22 | source_type = "image" 23 | source_id = "${var.app_image}" 24 | } 25 | 26 | metadata {} 27 | } 28 | -------------------------------------------------------------------------------- /JDEdwards/modules/win/win.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | 10 | variable "app_instance_count" {} 11 | 12 | variable "app_instance_shape" {} 13 | 14 | variable "app_hostname_prefix" { 15 | description = "Host name" 16 | } 17 | 18 | variable "app_image" { 19 | description = "OS Image" 20 | } 21 | 22 | variable "app_subnet" { 23 | type = "list" 24 | description = "subnet" 25 | } 26 | 27 | variable "availability_domain" { 28 | type = "list" 29 | } 30 | 31 | variable "fault_domain" { 32 | description = "Fault Domain" 33 | type = "list" 34 | } 35 | 36 | variable "AD" { 37 | type = "list" 38 | } 39 | -------------------------------------------------------------------------------- /JDEdwards/nonpd/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/JDEdwards/nonpd/.gitignore -------------------------------------------------------------------------------- /JDEdwards/nonpd/nonpd.datasources.tf: -------------------------------------------------------------------------------- 1 | # Gets a list of Availability Domains 2 | data "oci_identity_availability_domains" "ADs" { 3 | compartment_id = "${var.tenancy_ocid}" 4 | } 5 | 6 | # Gets a list of all Oracle Linux 6.9 images that support a given Instance shape 7 | data "oci_core_images" "InstanceImageOCID" { 8 | compartment_id = "${var.tenancy_ocid}" 9 | operating_system = "${var.InstanceOS}" 10 | operating_system_version = "${var.linux_os_version}" 11 | filter { 12 | name = "display_name" 13 | values = ["^.*Oracle[^G]*$"] 14 | regex = true 15 | } 16 | } 17 | 18 | data "oci_core_images" "WinInstanceImageOCID" { 19 | compartment_id = "${var.tenancy_ocid}" 20 | operating_system = "${var.WinInstanceOS}" 21 | operating_system_version = "${var.WinInstanceOSVersion}" 22 | } 23 | 24 | data "template_file" "user_ad" { 25 | count = "${length(var.AD)}" 26 | template = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[var.AD[count.index] - 1], "name")}" 27 | } 28 | 29 | # Gets name of Fault Domains 30 | 31 | data "oci_identity_fault_domains" "fds" { 32 | count = "${length(var.AD)}" 33 | availability_domain = "${element(data.template_file.user_ad.*.rendered, count.index)}" 34 | compartment_id = "${var.compartment_ocid}" 35 | } 36 | 37 | locals { 38 | fds = "${flatten(concat(data.oci_identity_fault_domains.fds.*.fault_domains))}" 39 | fd_per_ad = 3 40 | } 41 | 42 | data "template_file" "deployment_fd" { 43 | template = "$${name}" 44 | count = "${length(var.AD) * (local.fd_per_ad) }" 45 | vars = { 46 | name = "${lookup(local.fds[count.index], "name")}" 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /JDEdwards/nonpd/nonpd.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "WLShostNames" { 7 | value = ["${module.create_wls.HostNames}"] 8 | } 9 | 10 | output "WLSPrivateIPs" { 11 | value = ["${module.create_wls.PrvIPs}"] 12 | } 13 | 14 | output "LogicPrivateIPs" { 15 | value = ["${module.create_logic.PrvIPs}"] 16 | } 17 | 18 | output "LogichostNames" { 19 | value = ["${module.create_logic.HostNames}"] 20 | } 21 | 22 | output "BatchPrivateIPs" { 23 | value = ["${module.create_batch.PrvIPs}"] 24 | } 25 | 26 | output "BatchhostNames" { 27 | value = ["${module.create_batch.HostNames}"] 28 | } 29 | 30 | output "SMPrivateIPs" { 31 | value = ["${module.create_sm.PrvIPs}"] 32 | } 33 | 34 | output "SMhostNames" { 35 | value = ["${module.create_sm.HostNames}"] 36 | } 37 | 38 | output "DepPrivateIP" { 39 | value = ["${module.create_depsvr.PrvIPs}"] 40 | } 41 | 42 | output "DephostName" { 43 | value = ["${module.create_depsvr.HostNames}"] 44 | } 45 | 46 | output "DBhostNames" { 47 | value = ["${module.create_db.DBNodeHostname}"] 48 | } 49 | -------------------------------------------------------------------------------- /JDEdwards/nonpd/nonpd.provider.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | # Terraform version 6 | 7 | terraform { 8 | required_version = ">= 0.11.8" 9 | } 10 | 11 | # Oracle Cloud Infrastructure (OCI) Provider 12 | 13 | provider "oci" { 14 | version = "=3.5.0" 15 | tenancy_ocid = "${var.tenancy_ocid}" 16 | user_ocid = "${var.user_ocid}" 17 | fingerprint = "${var.fingerprint}" 18 | private_key_path = "${var.private_key_path}" 19 | region = "${var.region}" 20 | } -------------------------------------------------------------------------------- /JDEdwards/nonpd/nonpd.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "tenancy_ocid" {} 7 | 8 | variable "region" {} 9 | 10 | variable "compartment_ocid" {} 11 | 12 | variable "AD" { 13 | type = "list" 14 | } 15 | 16 | variable "user_ocid" {} 17 | 18 | variable "fingerprint" {} 19 | 20 | variable "private_key_path" {} 21 | 22 | variable "ssh_public_key" {} 23 | 24 | variable "ssh_private_key" {} 25 | 26 | variable "bastion_ssh_private_key" {} 27 | 28 | variable "InstanceOS" { 29 | description = "Operating system for compute instances" 30 | default = "Oracle Linux" 31 | } 32 | 33 | variable "linux_os_version" { 34 | description = "Operating system version for all compute instances except NAT" 35 | default = "7.5" 36 | } 37 | 38 | variable "WinInstanceOS" { 39 | description = "Operating system for compute instances" 40 | default = "Windows" 41 | } 42 | 43 | variable "WinInstanceOSVersion" { 44 | description = "Operating system version for all compute instances except NAT" 45 | default = "Server 2016 Standard" 46 | } 47 | 48 | # JDE DB Server Specfic 49 | variable "db_count" {} 50 | 51 | #variable "db_cpucorecount" {} 52 | 53 | variable "db_edition" {} 54 | 55 | variable "db_instance_shape" {} 56 | 57 | variable "db_node_count" {} 58 | 59 | 60 | variable "db_size_in_gb" { 61 | default = "256" 62 | } 63 | 64 | variable "db_license_model" {} 65 | 66 | variable "db_admin_password" {} 67 | 68 | variable "db_name" {} 69 | 70 | variable "db_characterset" {} 71 | 72 | variable "db_nls_characterset" {} 73 | 74 | variable "db_workload" { 75 | default="OLTP" 76 | } 77 | 78 | variable "db_version" {} 79 | 80 | variable "db_pdb_name" {} 81 | 82 | variable "db_disk_redundancy" { 83 | default="NORMAL" 84 | } 85 | 86 | variable "env_prefix" { 87 | } 88 | 89 | variable "unix_mount_directory" { 90 | default = "//u01" 91 | } 92 | 93 | variable "logic_instance_count" {} 94 | 95 | variable "logic_instance_shape" {} 96 | 97 | variable "batch_instance_count" {} 98 | 99 | variable "batch_instance_shape" {} 100 | 101 | variable "wls_instance_count" {} 102 | 103 | variable "wls_instance_shape" {} 104 | 105 | variable "sm_instance_shape" {} 106 | 107 | variable "sm_instance_count" {} 108 | 109 | variable "dep_instance_shape" {} 110 | 111 | variable "dep_instance_count" {} 112 | 113 | variable "psntsubid" { 114 | type= "list" 115 | } 116 | 117 | variable "midsubid" { 118 | type= "list" 119 | } 120 | 121 | variable "adminsubid" { 122 | type= "list" 123 | } 124 | 125 | variable "dbsubid" { 126 | type= "list" 127 | } 128 | 129 | variable "bastion_public_ip" {} 130 | 131 | variable "wls_bv_size" {} 132 | 133 | variable "logic_bv_size" {} 134 | 135 | variable "batch_bv_size" {} 136 | 137 | variable "sm_bv_size" {} 138 | -------------------------------------------------------------------------------- /JDEdwards/pd/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/JDEdwards/pd/.gitignore -------------------------------------------------------------------------------- /JDEdwards/pd/pd.datasources.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Get list of Availability Domains 7 | data "oci_identity_availability_domains" "ADs" { 8 | compartment_id = "${var.tenancy_ocid}" 9 | } 10 | 11 | # Get name of Availability Domains 12 | data "template_file" "deployment_ad" { 13 | count = "${length(var.AD)}" 14 | template = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[var.AD[count.index] - 1], "name")}" 15 | } 16 | 17 | # Get list of Fault Domains 18 | data "oci_identity_fault_domains" "fds" { 19 | count = "${length(var.AD)}" 20 | availability_domain = "${element(data.template_file.deployment_ad.*.rendered, count.index)}" 21 | compartment_id = "${var.compartment_ocid}" 22 | } 23 | 24 | locals { 25 | fds = "${flatten(concat(data.oci_identity_fault_domains.fds.*.fault_domains))}" 26 | faultdomains_per_ad = 3 27 | } 28 | 29 | # Get name of Fault Domains 30 | data "template_file" "deployment_fd" { 31 | template = "$${name}" 32 | count = "${length(var.AD) * (local.faultdomains_per_ad) }" 33 | vars = { 34 | name = "${lookup(local.fds[count.index], "name")}" 35 | } 36 | } 37 | 38 | # Get latest Oracle Linux image 39 | data "oci_core_images" "InstanceImageOCID" { 40 | compartment_id = "${var.tenancy_ocid}" 41 | operating_system = "${var.InstanceOS}" 42 | operating_system_version = "${var.linux_os_version}" 43 | filter { 44 | name = "display_name" 45 | values = ["^.*Oracle[^G]*$"] 46 | regex = true 47 | } 48 | } 49 | 50 | # Get latest Windows image 51 | data "oci_core_images" "WinInstanceImageOCID" { 52 | compartment_id = "${var.tenancy_ocid}" 53 | operating_system = "${var.WinInstanceOS}" 54 | operating_system_version = "${var.WinInstanceOSVersion}" 55 | } -------------------------------------------------------------------------------- /JDEdwards/pd/pd.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "WLShostNames" { 7 | value = ["${module.create_wls.HostNames}"] 8 | } 9 | output "WLSPrivateIPs" { 10 | value = ["${module.create_wls.PrvIPs}"] 11 | } 12 | 13 | output "LogicPrivateIPs" { 14 | value = ["${module.create_logic.PrvIPs}"] 15 | } 16 | 17 | output "LogichostNames" { 18 | value = ["${module.create_logic.HostNames}"] 19 | } 20 | 21 | output "BatchPrivateIPs" { 22 | value = ["${module.create_batch.PrvIPs}"] 23 | } 24 | 25 | output "BatchhostNames" { 26 | value = ["${module.create_batch.HostNames}"] 27 | } 28 | 29 | output "SMPrivateIPs" { 30 | value = ["${module.create_sm.PrvIPs}"] 31 | } 32 | 33 | output "SMhostNames" { 34 | value = ["${module.create_sm.HostNames}"] 35 | } 36 | 37 | output "DepPrivateIP" { 38 | value = ["${module.create_depsvr.PrvIPs}"] 39 | } 40 | 41 | output "DephostName" { 42 | value = ["${module.create_depsvr.HostNames}"] 43 | } 44 | 45 | output "DBhostNames" { 46 | value = ["${module.create_db.DBNodeHostname}"] 47 | } 48 | 49 | output "LogicLBPrivateIPs" { 50 | value = ["${module.create_logic_lb.lb_private_ip}"] 51 | } 52 | 53 | output "BatchLBPrivateIPs" { 54 | value = ["${module.create_batch_lb.lb_private_ip}"] 55 | } 56 | 57 | output "DNS_Zone" { 58 | value = "${module.create_dns.zones}" 59 | } 60 | 61 | output "DNS_Records" { 62 | value = "${module.create_dns.records}" 63 | } 64 | -------------------------------------------------------------------------------- /JDEdwards/pd/pd.provider.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | # Terraform version 6 | 7 | terraform { 8 | required_version = ">= 0.11.8" 9 | } 10 | 11 | # Oracle Cloud Infrastructure (OCI) Provider 12 | 13 | provider "oci" { 14 | version = "=3.5.0" 15 | tenancy_ocid = "${var.tenancy_ocid}" 16 | user_ocid = "${var.user_ocid}" 17 | fingerprint = "${var.fingerprint}" 18 | private_key_path = "${var.private_key_path}" 19 | region = "${var.region}" 20 | } -------------------------------------------------------------------------------- /JDEdwards/pd/pd.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "tenancy_ocid" {} 7 | 8 | variable "region" {} 9 | 10 | variable "compartment_ocid" {} 11 | 12 | variable "AD" { 13 | type = "list" 14 | } 15 | 16 | variable "user_ocid" {} 17 | 18 | variable "fingerprint" {} 19 | 20 | variable "private_key_path" {} 21 | 22 | variable "ssh_public_key" {} 23 | 24 | variable "ssh_private_key" {} 25 | 26 | variable "bastion_ssh_private_key" {} 27 | 28 | variable "InstanceOS" { 29 | description = "Operating system for compute instances" 30 | default = "Oracle Linux" 31 | } 32 | 33 | variable "linux_os_version" { 34 | description = "Operating system version for all compute instances except NAT" 35 | default = "7.5" 36 | } 37 | 38 | 39 | 40 | variable "WinInstanceOS" { 41 | description = "Operating system for compute instances" 42 | default = "Windows" 43 | } 44 | 45 | variable "WinInstanceOSVersion" { 46 | description = "Operating system version for all compute instances except NAT" 47 | default = "Server 2016 Standard" 48 | } 49 | 50 | # JDE DBS Specfic 51 | variable "db_count" {} 52 | 53 | #variable "db_cpucorecount" {} 54 | 55 | variable "db_edition" {} 56 | 57 | variable "db_instance_shape" {} 58 | 59 | variable "db_node_count" {} 60 | 61 | variable "db_size_in_gb" { 62 | default = "256" 63 | } 64 | 65 | variable "db_license_model" {} 66 | 67 | variable "db_admin_password" {} 68 | 69 | variable "db_name" {} 70 | 71 | variable "db_characterset" {} 72 | 73 | variable "db_nls_characterset" {} 74 | 75 | variable "db_workload" { 76 | default = "OLTP" 77 | } 78 | 79 | variable "db_version" {} 80 | 81 | variable "db_pdb_name" {} 82 | 83 | #variable "db_disk_redundancy" {} 84 | 85 | #JDE LBaaS Specific 86 | variable "logic_load_balancer_count" { 87 | default = "2" 88 | } 89 | 90 | variable "batch_load_balancer_count" { 91 | default = "2" 92 | } 93 | 94 | variable "load_balancer_name" { 95 | default = "jdelb" 96 | } 97 | 98 | variable "load_balancer_shape" { 99 | default = "100Mbps" 100 | } 101 | 102 | variable "load_balancer_listen_port" { 103 | type = "list" 104 | default= ["6017", "6018", "6019", "6020", "6021", "6022"] 105 | } 106 | 107 | variable "app_instance_listen_port" { 108 | type = "list" 109 | default= ["6017", "6018", "6019", "6020", "6021", "6022"] 110 | } 111 | 112 | variable "lbaas_listen_port_standalone_html"{ 113 | default = "9001" 114 | } 115 | 116 | variable "lbaas_listen_port_html"{ 117 | default = "9002" 118 | } 119 | 120 | variable "lbaas_listen_port_ais"{ 121 | default = "9003" 122 | } 123 | 124 | variable "listen_port_range_standalone_html"{ 125 | type = "list" 126 | default = ["8001", "8004"] 127 | } 128 | 129 | variable "listen_port_range_html"{ 130 | type = "list" 131 | default = ["8005", "8088"] 132 | } 133 | 134 | variable "listen_port_range_ais"{ 135 | type = "list" 136 | default = ["8010", "8014"] 137 | } 138 | 139 | variable "load_balancer_certificate_name" {} 140 | 141 | variable "load_balancer_ca_certificate" {} 142 | 143 | variable "load_balancer_certificate_passphrase" {} 144 | 145 | variable "load_balancer_certificate_private_key" {} 146 | 147 | variable "load_balancer_certificate_public_certificate" {} 148 | 149 | 150 | variable "env_prefix" { 151 | default = "myenv" 152 | } 153 | 154 | variable "unix_mount_directory" { 155 | default = "//u01" 156 | } 157 | 158 | variable "logic_instance_count" {} 159 | 160 | variable "logic_instance_shape" {} 161 | 162 | variable "batch_instance_count" {} 163 | 164 | variable "batch_instance_shape" {} 165 | 166 | variable "wls_instance_count" {} 167 | 168 | variable "wls_instance_shape" {} 169 | 170 | variable "sm_instance_shape" {} 171 | 172 | variable "sm_instance_count" {} 173 | 174 | variable "dep_instance_shape" {} 175 | 176 | variable "dep_instance_count" {} 177 | 178 | variable "psntsubid" { 179 | type= "list" 180 | } 181 | variable "midsubid" { 182 | type= "list" 183 | } 184 | 185 | variable "adminsubid" { 186 | type= "list" 187 | } 188 | 189 | variable "dbsubid" { 190 | type= "list" 191 | } 192 | 193 | variable "lbsubid" { 194 | type= "list" 195 | } 196 | 197 | variable "bastion_public_ip" {} 198 | 199 | variable "wls_bv_size" {} 200 | 201 | variable "logic_bv_size" {} 202 | 203 | variable "batch_bv_size" {} 204 | 205 | variable "sm_bv_size" {} 206 | 207 | #DNS specific variables 208 | variable "dns_server_zone_name" {} 209 | 210 | variable "load_balancer_logic_alias_name" {} 211 | 212 | variable "load_balancer_batch_alias_name" {} 213 | 214 | variable "load_balancer_web_alias_name" {} 215 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0 4 | 5 | Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this software, associated documentation and/or data (collectively the "Software"), free of charge and under any and all copyright rights in the Software, and any and all patent rights owned or freely licensable by each licensor hereunder covering either (i) the unmodified Software as contributed to or provided by such licensor, or (ii) the Larger Works (as defined below), to deal in both 6 | 7 | (a) the Software, and 8 | 9 | (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if one is included with the Software (each a “Larger Work” to which the Software is contributed by such licensors), 10 | 11 | without restriction, including without limitation the rights to copy, create derivative works of, display, perform, and distribute the Software and make, use, sell, offer for sale, import, export, have made, and have sold the Software and the Larger Work(s), and to sublicense the foregoing rights on either these or other terms. 12 | 13 | This license is subject to the following condition: 14 | 15 | The above copyright notice and either this complete permission notice or at a minimum a reference to the UPL must be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /Peoplesoft/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/Peoplesoft/.gitignore -------------------------------------------------------------------------------- /Peoplesoft/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0 4 | 5 | Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this software, associated documentation and/or data (collectively the "Software"), free of charge and under any and all copyright rights in the Software, and any and all patent rights owned or freely licensable by each licensor hereunder covering either (i) the unmodified Software as contributed to or provided by such licensor, or (ii) the Larger Works (as defined below), to deal in both 6 | 7 | (a) the Software, and 8 | 9 | (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if one is included with the Software (each a “Larger Work” to which the Software is contributed by such licensors), 10 | 11 | without restriction, including without limitation the rights to copy, create derivative works of, display, perform, and distribute the Software and make, use, sell, offer for sale, import, export, have made, and have sold the Software and the Larger Work(s), and to sublicense the foregoing rights on either these or other terms. 12 | 13 | This license is subject to the following condition: 14 | 15 | The above copyright notice and either this complete permission notice or at a minimum a reference to the UPL must be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /Peoplesoft/_docs/peoplesoft_multiple_availability_domain_ha_topology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/Peoplesoft/_docs/peoplesoft_multiple_availability_domain_ha_topology.png -------------------------------------------------------------------------------- /Peoplesoft/_docs/peoplesoft_single_availability_domain_ha_topology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/Peoplesoft/_docs/peoplesoft_single_availability_domain_ha_topology.png -------------------------------------------------------------------------------- /Peoplesoft/datasources.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Get list of Availability Domains 7 | data "oci_identity_availability_domains" "ADs" { 8 | compartment_id = "${var.tenancy_ocid}" 9 | } 10 | 11 | # Get name of Availability Domains 12 | data "template_file" "deployment_ad" { 13 | count = "${length(var.AD)}" 14 | template = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[var.AD[count.index] - 1], "name")}" 15 | } 16 | 17 | 18 | # Get list of Fault Domains 19 | data "oci_identity_fault_domains" "fds" { 20 | count = "${length(var.AD)}" 21 | availability_domain = "${element(data.template_file.deployment_ad.*.rendered, count.index)}" 22 | compartment_id = "${var.compartment_ocid}" 23 | } 24 | 25 | locals { 26 | fault_domains = "${flatten(concat(data.oci_identity_fault_domains.fds.*.fault_domains))}" 27 | faultdomains_per_ad = 3 28 | } 29 | 30 | # Get name of Fault Domains 31 | data "template_file" "deployment_fd" { 32 | template = "$${name}" 33 | count = "${length(var.AD) * (local.faultdomains_per_ad) }" 34 | vars = { 35 | name = "${lookup(local.fault_domains[count.index], "name")}" 36 | } 37 | } 38 | 39 | # Get latest Oracle Linux image 40 | data "oci_core_images" "InstanceImageOCID" { 41 | compartment_id = "${var.tenancy_ocid}" 42 | operating_system = "${var.instance_os}" 43 | operating_system_version = "${var.linux_os_version}" 44 | 45 | filter { 46 | name = "display_name" 47 | values = ["^.*Oracle[^G]*$"] 48 | regex = true 49 | } 50 | } 51 | 52 | # Get Windows image 53 | data "oci_core_images" "WinInstanceImageOCID" { 54 | compartment_id = "${var.tenancy_ocid}" 55 | operating_system = "${var.WinInstanceOS}" 56 | operating_system_version = "${var.WinInstanceOSVersion}" 57 | } 58 | 59 | # Get swift object storage name for Service Gateway 60 | data "oci_core_services" "svcgtw_services" { 61 | filter { 62 | name = "name" 63 | values = [".*Object.*Storage"] 64 | regex = true 65 | } 66 | } 67 | 68 | # Render inputs for mounting Filesystem storage service 69 | data "template_file" "bootstrap" { 70 | template = "${file("${path.module}/userdata/bootstrap.tpl")}" 71 | vars { 72 | timezone = "${var.timezone}" 73 | fss_mount_path = "${var.psft_stage_filesystem_path}/" 74 | fss_export_path = "${element(module.create_fss.FilesystemExports, 0)}" 75 | fss_mount_target_private_ip = "${element(module.create_fss.FilesystemPrivateIPs, 0)}" 76 | } 77 | } -------------------------------------------------------------------------------- /Peoplesoft/env-vars: -------------------------------------------------------------------------------- 1 | ### Authentication details 2 | export TF_VAR_tenancy_ocid="" 3 | export TF_VAR_user_ocid="" 4 | export TF_VAR_fingerprint="" 5 | export TF_VAR_private_key_path="" 6 | 7 | ### Region 8 | export TF_VAR_region="" 9 | 10 | ### Compartment 11 | export TF_VAR_compartment_ocid="" 12 | 13 | ### Public/private keys used on the instance 14 | export TF_VAR_ssh_public_key= 15 | export TF_VAR_ssh_private_key= 16 | 17 | ### Public/private keys used on the bastion instance 18 | export TF_VAR_bastion_ssh_public_key= 19 | export TF_VAR_bastion_ssh_private_key= -------------------------------------------------------------------------------- /Peoplesoft/env-vars.ps1: -------------------------------------------------------------------------------- 1 | #Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | #The Universal Permissive License (UPL), Version 1.0 4 | 5 | 6 | ### Authentication details 7 | $env:TF_VAR_tenancy_ocid="" 8 | $env:TF_VAR_user_ocid="" 9 | $env:TF_VAR_fingerprint="" 10 | $env:TF_VAR_private_key_path="" 11 | 12 | ### Region 13 | $env:TF_VAR_region="" 14 | 15 | ### Compartment 16 | $env:TF_VAR_compartment_ocid="" 17 | 18 | ### Public/private keys used on the instance 19 | $env:TF_VAR_ssh_public_key="" 20 | $env:TF_VAR_ssh_private_key="" 21 | 22 | ### Public/private keys used on the bastion instance 23 | $env:TF_VAR_bastion_ssh_public_key="" 24 | $env:TF_VAR_bastion_ssh_private_key="" 25 | -------------------------------------------------------------------------------- /Peoplesoft/modules/bastion/bastion.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "Bastion_Public_IPs" { 7 | value = ["${oci_core_instance.bastion.*.public_ip}"] 8 | } -------------------------------------------------------------------------------- /Peoplesoft/modules/bastion/bastion.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_core_instance" "bastion" { 7 | compartment_id = "${var.compartment_ocid}" 8 | count = "${length(var.availability_domain)}" 9 | availability_domain = "${element(var.availability_domain, count.index)}" 10 | display_name = "${var.bastion_hostname_prefix}${element(var.AD,count.index)}${count.index+1}" 11 | shape = "${var.bastion_instance_shape}" 12 | 13 | create_vnic_details { 14 | subnet_id = "${element(var.bastion_subnet, count.index)}" 15 | display_name = "${var.bastion_hostname_prefix}${element(var.AD,count.index)}${count.index+1}" 16 | assign_public_ip = true 17 | hostname_label = "${var.bastion_hostname_prefix}${element(var.AD,count.index)}${count.index+1}" 18 | }, 19 | 20 | source_details { 21 | source_type = "image" 22 | source_id = "${var.bastion_image}" 23 | boot_volume_size_in_gbs = "60" 24 | } 25 | 26 | metadata { 27 | ssh_authorized_keys = "${trimspace(file("${var.bastion_ssh_public_key}"))}" 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Peoplesoft/modules/bastion/bastion.vars.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | variable "availability_domain" { 10 | description = "Availability domain" 11 | type = "list" 12 | } 13 | 14 | variable "AD" { 15 | description = "Availability domain" 16 | type= "list" 17 | } 18 | #Bastion host variables 19 | variable "bastion_hostname_prefix" { 20 | description = "Prefix for bastion hostname" 21 | } 22 | 23 | variable "bastion_instance_shape" { 24 | description = "Instance shape of bastion host" 25 | } 26 | variable "bastion_subnet" { 27 | description = "Subnet for Bastion host" 28 | type = "list" 29 | } 30 | variable "bastion_image" { 31 | description ="OS Image" 32 | } 33 | variable "bastion_ssh_public_key" { 34 | description = "Bastion Host SSH public key" 35 | } 36 | -------------------------------------------------------------------------------- /Peoplesoft/modules/compute/compute.blockvolume.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_core_volume" "blockvolume" { 7 | #count = "${var.compute_instance_count}" 8 | count = "${var.compute_platform == "linux" ? var.compute_instance_count : 0}" 9 | availability_domain = "${element(var.availability_domain, count.index)}" 10 | compartment_id = "${var.compartment_ocid}" 11 | display_name = "${var.compute_hostname_prefix}vol${count.index+1}" 12 | size_in_gbs = "${var.compute_block_volume_size_in_gb}" 13 | } 14 | 15 | resource "oci_core_volume_attachment" "blockvolume_attach" { 16 | attachment_type = "iscsi" 17 | #count = "${var.compute_instance_count}" 18 | count = "${var.compute_platform == "linux" ? var.compute_instance_count : 0}" 19 | compartment_id = "${var.compartment_ocid}" 20 | instance_id = "${element(oci_core_instance.compute.*.id, count.index)}" 21 | volume_id = "${element(oci_core_volume.blockvolume.*.id, count.index)}" 22 | 23 | provisioner "remote-exec" { 24 | connection { 25 | agent = false 26 | timeout = "30m" 27 | host = "${element(oci_core_instance.compute.*.private_ip, count.index)}" 28 | user = "${var.compute_instance_user}" 29 | private_key = "${file("${var.compute_ssh_private_key}")}" 30 | bastion_host = "${var.bastion_public_ip}" 31 | bastion_port = "22" 32 | bastion_user = "${var.bastion_user}" 33 | bastion_private_key = "${file("${var.bastion_ssh_private_key}")}" 34 | } 35 | 36 | inline = [ 37 | "sudo -s bash -c 'iscsiadm -m node -o new -T ${self.iqn} -p ${self.ipv4}:${self.port}'", 38 | "sudo -s bash -c 'iscsiadm -m node -o update -T ${self.iqn} -n node.startup -v automatic '", 39 | "sudo -s bash -c 'iscsiadm -m node -T ${self.iqn} -p ${self.ipv4}:${self.port} -l '", 40 | "sudo -s bash -c 'mkfs.ext4 -F /dev/sdb'", 41 | "sudo -s bash -c 'mkdir -p /u01'", 42 | "sudo -s bash -c 'mount -t ext4 /dev/sdb /u01'", 43 | "sudo -s bash -c 'echo \"/dev/sdb /u01 ext4 defaults,noatime,_netdev,nofail 0 2\" >> /etc/fstab'", 44 | ] 45 | } 46 | } -------------------------------------------------------------------------------- /Peoplesoft/modules/compute/compute.datasources.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Fetch Windows instance credemtials 7 | data "oci_core_instance_credentials" "win" { 8 | count = "${var.compute_platform != "linux" ? var.compute_instance_count : 0}" 9 | instance_id = "${oci_core_instance.compute.*.id[count.index]}" 10 | } 11 | -------------------------------------------------------------------------------- /Peoplesoft/modules/compute/compute.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "ComputePrivateIPs" { 7 | value = ["${oci_core_instance.compute.*.private_ip}"] 8 | } 9 | 10 | output "ComputeWinHostNames" { 11 | value = ["${oci_core_instance.compute.*.display_name}"] 12 | } 13 | 14 | output "ComputeWinusers" { 15 | value = ["${data.oci_core_instance_credentials.win.*.username}"] 16 | } 17 | 18 | output "ComputeWincreds" { 19 | value = ["${data.oci_core_instance_credentials.win.*.password}"] 20 | } 21 | 22 | -------------------------------------------------------------------------------- /Peoplesoft/modules/compute/compute.remote-exec.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "random_integer" "rand" { 7 | min = 1000000000 8 | max = 9999999999 9 | } 10 | 11 | locals { 12 | remote_exec_script_enabled = "${var.remote_exec_script != "" ? 1 : 0}" 13 | } 14 | 15 | resource "null_resource" "initlnx" { 16 | depends_on = ["oci_core_instance.compute", "oci_core_volume_attachment.blockvolume_attach"] 17 | count = "${local.remote_exec_script_enabled && var.compute_platform == "linux" ? var.compute_instance_count : 0}" 18 | 19 | provisioner "file" { 20 | connection { 21 | agent = false 22 | timeout = "${var.timeout}" 23 | host = "${oci_core_instance.compute.*.private_ip[count.index % var.compute_instance_count]}" 24 | user = "${var.compute_instance_user}" 25 | private_key = "${file("${var.compute_ssh_private_key}")}" 26 | 27 | bastion_host = "${var.bastion_public_ip}" 28 | bastion_user = "${var.bastion_user}" 29 | bastion_private_key = "${file("${var.bastion_ssh_private_key}")}" 30 | } 31 | source = "userdata/${var.remote_exec_script}" 32 | #content = "${file("${var.remote_exec_script}")}" 33 | destination = "/tmp/init_${random_integer.rand.result}.sh" 34 | } 35 | 36 | provisioner "remote-exec" { 37 | connection { 38 | agent = false 39 | timeout = "${var.timeout}" 40 | host = "${oci_core_instance.compute.*.private_ip[count.index % var.compute_instance_count]}" 41 | user = "${var.compute_instance_user}" 42 | private_key = "${file("${var.compute_ssh_private_key}")}" 43 | 44 | bastion_host = "${var.bastion_public_ip}" 45 | bastion_user = "${var.bastion_user}" 46 | bastion_private_key = "${file("${var.bastion_ssh_private_key}")}" 47 | } 48 | 49 | inline = [ 50 | "chmod +x /tmp/init_${random_integer.rand.result}.sh", 51 | "while [ ! -f /tmp/init.done ]; do /tmp/init_${random_integer.rand.result}.sh; sleep 10; done", 52 | ] 53 | } 54 | } -------------------------------------------------------------------------------- /Peoplesoft/modules/compute/compute.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_core_instance" "compute" { 7 | count = "${var.compute_instance_count}" 8 | availability_domain = "${element(var.availability_domain, count.index)}" 9 | display_name = "${var.compute_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 10 | fault_domain = "${element(var.fault_domain, count.index)}" 11 | compartment_id = "${var.compartment_ocid}" 12 | shape = "${var.compute_instance_shape}" 13 | 14 | create_vnic_details { 15 | subnet_id = "${element(var.compute_subnet, count.index)}" 16 | display_name = "${var.compute_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 17 | assign_public_ip = false 18 | hostname_label = "${var.compute_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 19 | }, 20 | 21 | source_details { 22 | source_type = "image" 23 | source_id = "${var.compute_image}" 24 | boot_volume_size_in_gbs = "${var.compute_boot_volume_size_in_gb}" 25 | } 26 | 27 | metadata { 28 | ssh_authorized_keys = "${trimspace(file("${var.compute_ssh_public_key}"))}" 29 | user_data = "${base64encode(var.user_data)}" 30 | } 31 | 32 | timeouts { 33 | create = "${var.timeout}" 34 | } 35 | } -------------------------------------------------------------------------------- /Peoplesoft/modules/compute/compute.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | 10 | variable "fault_domain" { 11 | description = "Fault Domainr" 12 | type = "list" 13 | } 14 | variable "compute_instance_count" {} 15 | variable "compute_instance_shape" {} 16 | 17 | variable "compute_hostname_prefix" { 18 | description = "Host name" 19 | } 20 | variable "compute_image" { 21 | description ="OS Image" 22 | } 23 | 24 | variable "compute_ssh_private_key" { 25 | description = "SSH key" 26 | } 27 | variable "compute_ssh_public_key" { 28 | description = "SSH key" 29 | } 30 | variable "bastion_ssh_private_key" { 31 | description = "SSH key" 32 | } 33 | variable "compute_subnet" { 34 | type = "list" 35 | description = "subnet" 36 | } 37 | variable "availability_domain" { 38 | type = "list" 39 | } 40 | variable "AD" { 41 | type = "list" 42 | } 43 | 44 | variable "bastion_public_ip" { 45 | type="string" 46 | } 47 | 48 | variable "compute_boot_volume_size_in_gb" {} 49 | variable "compute_block_volume_size_in_gb" {} 50 | variable "timeout" { 51 | description = "Timeout setting for resource creation " 52 | default = "10m" 53 | } 54 | variable timezone {} 55 | variable bastion_user {} 56 | variable compute_instance_user {} 57 | variable user_data {} 58 | variable remote_exec_script {} 59 | variable compute_platform {} 60 | -------------------------------------------------------------------------------- /Peoplesoft/modules/dbsystem/db.datasources.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Get CPU and node and node count for a db shape 7 | data "oci_database_db_system_shapes" "db_system_shapes" { 8 | availability_domain = "${element(var.availability_domain, count.index)}" 9 | compartment_id = "${var.compartment_ocid}" 10 | filter { 11 | name = "name" 12 | values = ["${var.db_instance_shape}"] 13 | } 14 | } -------------------------------------------------------------------------------- /Peoplesoft/modules/dbsystem/db.dbsystem.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_database_db_system" "database" { 7 | count = "${length(var.availability_domain)}" 8 | compartment_id = "${var.compartment_ocid}" 9 | availability_domain = "${element(var.availability_domain, count.index)}" 10 | cpu_core_count = "${lookup(data.oci_database_db_system_shapes.db_system_shapes.db_system_shapes[0], "minimum_core_count")}" 11 | database_edition = "${var.db_edition}" 12 | db_home { 13 | database { 14 | "admin_password" = "${var.db_admin_password}" 15 | "db_name" = "${var.db_name}" 16 | "character_set" = "${var.db_characterset}" 17 | "ncharacter_set" = "${var.db_nls_characterset}" 18 | "db_workload" = "${var.db_workload}" 19 | "pdb_name" = "${var.db_pdb_name}" 20 | } 21 | db_version = "${var.db_version}" 22 | display_name = "${var.db_name}" 23 | } 24 | shape = "${var.db_instance_shape}" 25 | node_count = "${var.db_node_count}" 26 | data_storage_size_in_gb = "${var.db_size_in_gb}" 27 | #data_storage_percentage = "40" 28 | license_model = "${var.db_license_model}" 29 | disk_redundancy = "${var.db_disk_redundancy}" 30 | subnet_id = "${element(var.db_subnet, count.index)}" 31 | ssh_public_keys = ["${trimspace(file("${var.db_ssh_public_key}"))}"] 32 | display_name = "${var.db_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 33 | hostname = "${var.db_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 34 | } -------------------------------------------------------------------------------- /Peoplesoft/modules/dbsystem/db.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | variable "availability_domain" { 10 | description = "Availability domain" 11 | type = "list" 12 | } 13 | variable "AD" { 14 | description = "Availability domain" 15 | type= "list" 16 | } 17 | variable "db_subnet" { 18 | description = "Subnet for Bastion host" 19 | type = "list" 20 | } 21 | # Database System variables 22 | variable "db_edition" { 23 | description = "Database Edition" 24 | } 25 | variable "db_version" { 26 | description = "Database version" 27 | } 28 | variable "db_admin_password" { 29 | description = "Database admin password" 30 | } 31 | variable "db_name" { 32 | description = "Database Name" 33 | } 34 | variable "db_disk_redundancy" { 35 | description = "Database disk redundancy for Bare Metal DB System" 36 | default="NORMAL" 37 | } 38 | variable "db_hostname_prefix" { 39 | description = "Database hostname prefix" 40 | } 41 | variable "db_instance_shape" { 42 | description = "Database system shape" 43 | 44 | } 45 | variable "db_ssh_public_key" { 46 | description = "Database public ssh key" 47 | } 48 | 49 | variable "db_characterset" { 50 | description = "Database characterset" 51 | } 52 | variable "db_nls_characterset" { 53 | description = "Database National characterset" 54 | } 55 | variable "db_workload" { 56 | description = "Database Workload" 57 | default = "OLTP" 58 | } 59 | variable "db_pdb_name" { 60 | } 61 | variable "db_size_in_gb" { 62 | description = "Database size in gb" 63 | } 64 | 65 | variable "db_license_model" { 66 | description = "Database License Model" 67 | } 68 | variable "db_node_count" { 69 | description = "Database Node count" 70 | } -------------------------------------------------------------------------------- /Peoplesoft/modules/filesystem/fss.data.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | locals { 7 | fss_private_ips = "${flatten(concat(data.oci_core_private_ips.ip_mount_target.*.private_ips))}" 8 | } 9 | 10 | locals { 11 | fss_exports = [ 12 | "${oci_file_storage_export.fss_export.*.path}", 13 | ] 14 | fss_fstabs = "${formatlist("%s:%s", data.template_file.fss_ips.*.rendered, oci_file_storage_export.fss_export.*.path)}" 15 | } 16 | 17 | 18 | # Get private IP of Filesystem Storage Service 19 | 20 | data "oci_core_private_ips" "ip_mount_target" { 21 | #count = "${length(var.availability_domain)}" 22 | count = "${var.fss_count}" 23 | subnet_id = "${element(oci_file_storage_mount_target.fss_mt.*.subnet_id, count.index)}" 24 | 25 | filter { 26 | name = "id" 27 | values = ["${element(flatten(oci_file_storage_mount_target.fss_mt.*.private_ip_ids), count.index)}"] 28 | } 29 | } 30 | 31 | data "template_file" "fss_ips" { 32 | template = "$${ip_address}" 33 | #count = "${length(var.availability_domain)}" 34 | count = "${var.fss_count}" 35 | 36 | vars = { 37 | ip_address = "${lookup(local.fss_private_ips[count.index], "ip_address")}" 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /Peoplesoft/modules/filesystem/fss.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "FilesystemPrivateIPs" { 7 | description = "FSS Private IPs" 8 | value = "${data.template_file.fss_ips.*.rendered}" 9 | } 10 | 11 | output "FilesystemExports" { 12 | description = "FSS Exports" 13 | value = "${local.fss_exports}" 14 | } 15 | 16 | output "FilesystemFstabs" { 17 | description = "FSS /etc/fstab Entries" 18 | value = "${local.fss_fstabs}" 19 | } -------------------------------------------------------------------------------- /Peoplesoft/modules/filesystem/fss.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_file_storage_file_system" "fss" { 7 | compartment_id = "${var.compartment_ocid}" 8 | #count = "${length(var.availability_domain)}" 9 | count = "${var.fss_count}" 10 | availability_domain = "${element(var.availability_domain, count.index)}" 11 | display_name = "${var.fss_instance_prefix}${var.AD[count.index]}" 12 | } 13 | 14 | resource "oci_file_storage_mount_target" "fss_mt" { 15 | depends_on = ["oci_file_storage_file_system.fss"] 16 | compartment_id = "${var.compartment_ocid}" 17 | #count = "${length(var.availability_domain)}" 18 | count = "${var.fss_count}" 19 | availability_domain = "${element(var.availability_domain, count.index)}" 20 | hostname_label = "${var.fss_instance_prefix}${var.AD[count.index]}" 21 | subnet_id = "${element(var.fss_subnet, count.index)}" 22 | display_name = "${var.fss_instance_prefix}${var.AD[count.index]}_mt" 23 | } 24 | 25 | resource "oci_file_storage_export_set" "fss_export_set" { 26 | #count = "${length(var.availability_domain)}" 27 | count = "${var.fss_count}" 28 | mount_target_id = "${element(oci_file_storage_mount_target.fss_mt.*.id, count.index)}" 29 | max_fs_stat_bytes = "${(var.fss_limit_size_in_gb * 1024 * 1024 * 1024)}" 30 | } 31 | resource "oci_file_storage_export" "fss_export" { 32 | #count = "${length(var.availability_domain)}" 33 | count = "${var.fss_count}" 34 | export_set_id = "${element(oci_file_storage_mount_target.fss_mt.*.export_set_id,count.index)}" 35 | file_system_id = "${element(oci_file_storage_file_system.fss.*.id, count.index)}" 36 | path = "/${var.fss_instance_prefix}${var.AD[count.index]}" 37 | 38 | export_options = [ 39 | { 40 | source = "0.0.0.0/0" 41 | access = "READ_WRITE" 42 | identity_squash = "NONE" 43 | require_privileged_source_port = false 44 | }, 45 | ] 46 | } 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Peoplesoft/modules/filesystem/fss.vars.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | 10 | variable "availability_domain" { 11 | type = "list" 12 | } 13 | variable "AD" { 14 | type = "list" 15 | } 16 | variable "fss_instance_prefix" {} 17 | variable "fss_subnet" { 18 | type = "list" 19 | } 20 | variable "export_path_fs1_mt1" { 21 | default = "/stage/software" 22 | } 23 | 24 | variable "fss_limit_size_in_gb" { 25 | } 26 | 27 | variable fss_count {} 28 | 29 | 30 | -------------------------------------------------------------------------------- /Peoplesoft/modules/loadbalancer/lb.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_load_balancer" "lb" { 7 | shape = "${var.load_balancer_shape}" 8 | count = "${length(var.availability_domain)}" 9 | compartment_id = "${var.compartment_ocid}" 10 | subnet_ids = ["${element(var.load_balancer_subnet, count.index)}"] 11 | display_name = "${var.load_balancer_name}${element(var.AD,count.index)}${count.index+1}" 12 | is_private = "${var.load_balancer_private}" 13 | } 14 | 15 | resource "oci_load_balancer_backend_set" "lb-bset" { 16 | count = "${length(var.availability_domain)}" 17 | name = "${var.load_balancer_name}${element(var.AD,count.index)}-bes${count.index + 1}" 18 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, count.index)}" 19 | policy = "ROUND_ROBIN" 20 | 21 | health_checker { 22 | port = "${var.web_instance_listen_port}" 23 | protocol = "HTTP" 24 | response_body_regex = ".*" 25 | url_path = "/" 26 | } 27 | session_persistence_configuration { 28 | cookie_name = "lb-session1" 29 | disable_fallback = true 30 | } 31 | lifecycle { 32 | ignore_changes = ["availability_domain"] 33 | } 34 | } 35 | 36 | resource "oci_load_balancer_backend" "lb-bset-be" { 37 | count = "${var.web_instance_count}" 38 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, count.index)}" 39 | backendset_name = "${element(oci_load_balancer_backend_set.lb-bset.*.name, count.index)}" 40 | ip_address = "${element(var.be_ip_addresses, count.index)}" 41 | port = "${var.web_instance_listen_port}" 42 | backup = false 43 | drain = false 44 | offline = false 45 | weight = 1 46 | 47 | lifecycle { 48 | ignore_changes = ["availability_domain"] 49 | } 50 | } 51 | 52 | resource "oci_load_balancer_hostname" "hostname" { 53 | count = "${length(var.availability_domain)}" 54 | hostname = "${var.load_balancer_hostname}" 55 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, count.index)}" 56 | name = "hostname${count.index + 1}" 57 | } 58 | 59 | resource "oci_load_balancer_listener" "lb-listener" { 60 | depends_on = ["oci_load_balancer_hostname.hostname"] 61 | count = "${length(var.availability_domain)}" 62 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, count.index)}" 63 | name = "${var.load_balancer_name}${element(var.AD,count.index)}-lsnr${count.index + 1}" 64 | default_backend_set_name = "${element(oci_load_balancer_backend_set.lb-bset.*.name, count.index)}" 65 | hostname_names = ["${element(oci_load_balancer_hostname.hostname.*.name, count.index)}"] 66 | port = "${var.load_balancer_listen_port}" 67 | protocol = "HTTP" 68 | connection_configuration { 69 | idle_timeout_in_seconds = "2" 70 | } 71 | } 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Peoplesoft/modules/loadbalancer/lb.vars.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable load_balancer_subnet { 7 | type = "list" 8 | } 9 | 10 | variable "availability_domain" { 11 | type = "list" 12 | description = "Availability domain" 13 | } 14 | 15 | variable "AD" { 16 | type= "list" 17 | } 18 | variable load_balancer_name {} 19 | variable compartment_ocid {} 20 | variable load_balancer_shape {} 21 | variable load_balancer_private { 22 | default = "True" 23 | } 24 | /*variable be1_ip_address1 { 25 | type="string" 26 | } 27 | */ 28 | 29 | 30 | variable be_ip_addresses { 31 | type="list" 32 | } 33 | variable load_balancer_hostname {} 34 | 35 | variable web_instance_listen_port {} 36 | variable load_balancer_listen_port {} 37 | 38 | variable web_instance_count {} -------------------------------------------------------------------------------- /Peoplesoft/modules/network/subnets/subnets.output.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "subnetid" { 7 | value = ["${oci_core_subnet.subnet.*.id}"] 8 | } 9 | 10 | output "cidr_block" { 11 | value = ["${oci_core_subnet.subnet.*.cidr_block}"] 12 | } -------------------------------------------------------------------------------- /Peoplesoft/modules/network/subnets/subnets.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | # Module to create subnet 6 | resource "oci_core_subnet" "subnet" { 7 | count = "${length(var.availability_domain)}" 8 | availability_domain = "${element(var.availability_domain, count.index)}" 9 | compartment_id = "${var.compartment_ocid}" 10 | vcn_id = "${var.vcn_id}" 11 | cidr_block = "${var.vcn_subnet_cidr[count.index]}" 12 | display_name = "${var.dns_label}${var.AD[count.index]}" 13 | dns_label = "${var.dns_label}${var.AD[count.index]}" 14 | dhcp_options_id = "${var.dhcp_options_id}" 15 | route_table_id = "${var.route_table_id}" 16 | security_list_ids = ["${var.security_list_ids}"] 17 | prohibit_public_ip_on_vnic = "${var.private_subnet}" 18 | } -------------------------------------------------------------------------------- /Peoplesoft/modules/network/subnets/subnets.vars.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | variable "availability_domain" { 10 | description = "Availability domain" 11 | type = "list" 12 | } 13 | variable "AD" { 14 | description = "Availability domain" 15 | type = "list" 16 | } 17 | 18 | # Virtual Cloud Network (VCN) variables 19 | variable "vcn_id" { 20 | description = "VCN OCID" 21 | } 22 | variable "route_table_id" { 23 | description = "VCN Route Table OCID" 24 | } 25 | 26 | variable "dhcp_options_id" { 27 | description = "VCN DHCP options OCID" 28 | } 29 | variable "vcn_subnet_cidr" { 30 | description = "CIDR for VCN subnet" 31 | type = "list" 32 | } 33 | variable "security_list_ids" { 34 | description = "Security List OCID" 35 | type = "list" 36 | } 37 | variable "dns_label" { 38 | description = "VCN DNS Label" 39 | } 40 | variable "private_subnet" { 41 | description = "Whether private or public subnet" 42 | } -------------------------------------------------------------------------------- /Peoplesoft/modules/network/vcn/vcn.data.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Get name of object storage 7 | data "oci_core_services" "svcgtw_services" { 8 | filter { 9 | name = "name" 10 | values = [".*Object.*Storage"] 11 | regex = true 12 | } 13 | } -------------------------------------------------------------------------------- /Peoplesoft/modules/network/vcn/vcn.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "vcnid" { 7 | description = "ocid of VCN" 8 | value = "${oci_core_virtual_network.vcn.id}" 9 | } 10 | output "default_dhcp_id" { 11 | description = "ocid of default DHCP options" 12 | value = "${oci_core_virtual_network.vcn.default_dhcp_options_id}" 13 | } 14 | 15 | output "igw_id" { 16 | description = "ocid of internet gateway" 17 | value = "${oci_core_internet_gateway.igw.id}" 18 | } 19 | 20 | output "natgtw_id" { 21 | description = "ocid of service gateway" 22 | value = "${oci_core_nat_gateway.natgtw.id}" 23 | } 24 | output "svcgtw_id" { 25 | description = "ocid of service gateway" 26 | value = "${oci_core_service_gateway.svcgtw.id}" 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /Peoplesoft/modules/network/vcn/vcn.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Virtual Cloud Network (VCN) 7 | resource "oci_core_virtual_network" "vcn" { 8 | compartment_id = "${var.compartment_ocid}" 9 | cidr_block = "${var.vcn_cidr}" 10 | dns_label = "${var.vcn_dns_label}" 11 | display_name = "${var.vcn_dns_label}" 12 | } 13 | 14 | # Internet Gateway 15 | resource "oci_core_internet_gateway" "igw" { 16 | compartment_id = "${var.compartment_ocid}" 17 | display_name = "${var.vcn_dns_label}igw" 18 | vcn_id = "${oci_core_virtual_network.vcn.id}" 19 | } 20 | 21 | # NAT (Network Address Translation) Gateway 22 | resource "oci_core_nat_gateway" "natgtw" { 23 | compartment_id = "${var.compartment_ocid}" 24 | vcn_id = "${oci_core_virtual_network.vcn.id}" 25 | display_name = "${var.vcn_dns_label}natgtw" 26 | } 27 | 28 | # Service Gateway 29 | resource "oci_core_service_gateway" "svcgtw" { 30 | compartment_id = "${var.compartment_ocid}" 31 | services { 32 | service_id = "${lookup(data.oci_core_services.svcgtw_services.services[0], "id")}" 33 | } 34 | vcn_id = "${oci_core_virtual_network.vcn.id}" 35 | display_name = "${var.vcn_dns_label}svcgtw" 36 | } 37 | 38 | # Dynamic Routing Gateway (DRG) 39 | resource "oci_core_drg" "drg" { 40 | compartment_id = "${var.compartment_ocid}" 41 | display_name = "${var.vcn_dns_label}drg" 42 | } 43 | resource "oci_core_drg_attachment" "drg_attachment" { 44 | drg_id = "${oci_core_drg.drg.id}" 45 | vcn_id = "${oci_core_virtual_network.vcn.id}" 46 | display_name = "${var.vcn_dns_label}drgattch" 47 | } -------------------------------------------------------------------------------- /Peoplesoft/modules/network/vcn/vcn.vars.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment OCID" 8 | } 9 | # VCN Variables 10 | variable "vcn_cidr" { 11 | description = "VCN CIDR" 12 | } 13 | variable "vcn_dns_label" { 14 | description = "VCN DNS Label" 15 | } 16 | -------------------------------------------------------------------------------- /Peoplesoft/outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | output "BastionPublicIPs" { 6 | value = ["${module.create_bastion.Bastion_Public_IPs}"] 7 | } 8 | 9 | output "PsftAppServerPrivateIPs" { 10 | value = ["${module.create_app.ComputePrivateIPs}"] 11 | } 12 | 13 | output "PsftWebServerPrivateIPs" { 14 | value = ["${module.create_web.ComputePrivateIPs}"] 15 | } 16 | 17 | output "PsftProcSchdServerPrivateIPs" { 18 | value = ["${module.create_process_schd.ComputePrivateIPs}"] 19 | } 20 | 21 | output "PsftElasticSrchServerPrivateIPs" { 22 | value = ["${module.create_elastic_search.ComputePrivateIPs}"] 23 | } 24 | 25 | output "PsftToolsServerDetails" { 26 | value = "${formatlist("%s:%s:%s: %s ", module.create_ptools.ComputePrivateIPs, module.create_ptools.ComputeWinHostNames, module.create_ptools.ComputeWinusers, module.create_ptools.ComputeWincreds)}" 27 | } 28 | 29 | output "PsftFilesystemFstabs" { 30 | value = ["${module.create_fss.FilesystemFstabs}"] 31 | } 32 | 33 | 34 | -------------------------------------------------------------------------------- /Peoplesoft/provider.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Terraform version 7 | 8 | terraform { 9 | required_version = ">= 0.11.8" 10 | } 11 | 12 | # Oracle Cloud Infrastructure (OCI) Provider 13 | 14 | provider "oci" { 15 | version = "=3.5.0" 16 | tenancy_ocid = "${var.tenancy_ocid}" 17 | user_ocid = "${var.user_ocid}" 18 | fingerprint = "${var.fingerprint}" 19 | private_key_path = "${var.private_key_path}" 20 | region = "${var.region}" 21 | } -------------------------------------------------------------------------------- /Peoplesoft/routetables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Public Route Table 7 | resource "oci_core_route_table" "PublicRT" { 8 | compartment_id = "${var.compartment_ocid}" 9 | vcn_id = "${module.create_vcn.vcnid}" 10 | display_name = "${var.vcn_dns_label}pubrt" 11 | 12 | route_rules { 13 | destination = "${local.anywhere}" 14 | network_entity_id = "${module.create_vcn.igw_id}" 15 | } 16 | } 17 | 18 | # Private Route Table 19 | resource "oci_core_route_table" "PrivateRT" { 20 | compartment_id = "${var.compartment_ocid}" 21 | vcn_id = "${module.create_vcn.vcnid}" 22 | display_name = "${var.vcn_dns_label}pvtrt" 23 | 24 | route_rules { 25 | destination = "${lookup(data.oci_core_services.svcgtw_services.services[0], "cidr_block")}" 26 | destination_type = "SERVICE_CIDR_BLOCK" 27 | network_entity_id = "${module.create_vcn.svcgtw_id}" 28 | }, 29 | route_rules { 30 | destination = "${local.anywhere}" 31 | destination_type = "CIDR_BLOCK" 32 | network_entity_id = "${module.create_vcn.natgtw_id}" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Peoplesoft/terraform.tfvars: -------------------------------------------------------------------------------- 1 | # AD (Availability Domain to use for creating Peoplesoft infrastructure) 2 | AD = "[]" 3 | 4 | # CIDR block of VCN to be created 5 | vcn_cidr = "" 6 | 7 | # DNS label of VCN to be created 8 | vcn_dns_label = "" 9 | 10 | # Operating system version to be used for compute instances 11 | linux_os_version = "" 12 | 13 | # Size of boot volume (in gb) of compute instances 14 | compute_boot_volume_size_in_gb = "" 15 | 16 | # Size of block volume (in gb) of compute instances 17 | compute_block_volume_size_in_gb = "" 18 | 19 | # Login user for compute instance 20 | compute_instance_user = "" 21 | 22 | # Login user for bastion host 23 | bastion_user = "" 24 | 25 | # Timezone of compute instance 26 | timezone = "" 27 | 28 | #Environment prefix to define name of resources 29 | psft_env_prefix = "" 30 | 31 | # Number of application instances to be created 32 | psft_app_instance_count = "" 33 | 34 | # Shape of app instance 35 | psft_app_instance_shape = "" 36 | 37 | # Listen port range of the application instance 38 | psft_app_instance_listen_port_range = "[]" 39 | 40 | # Number of process scheduler instances to be created 41 | psft_ps_instance_count = "" 42 | 43 | # Shape of process scheduler instance 44 | psft_ps_instance_shape = "" 45 | 46 | # Listen port range of the process scheduler instance 47 | psft_ps_instance_listen_port_range = "[]" 48 | 49 | # Number of elastic search instances to be created 50 | psft_es_instance_count = "" 51 | 52 | # Shape of elastic search instance 53 | psft_es_instance_shape = "" 54 | 55 | # Listen port of the elastic search instance 56 | psft_es_instance_listen_port = "" 57 | 58 | # Shape of tools instance 59 | psft_tls_instance_shape = "" 60 | 61 | # Listen port range of the tools instance 62 | psft_tls_instance_listen_port_range = "[]" 63 | 64 | # Number of web instances to be created 65 | psft_web_instance_count = "" 66 | 67 | # Shape of web instance 68 | psft_web_instance_shape = "" 69 | 70 | # Listen port of the web instance 71 | psft_web_instance_listen_port = "" 72 | 73 | # Mount path for software stage filesystem 74 | psft_stage_filesystem_path = "" 75 | 76 | # Set software stage filesystem limit 77 | psft_stage_filesystem_size_limit_in_gb = "" 78 | 79 | # Datbase Edition 80 | db_edition = "" 81 | 82 | # Licensing model for database 83 | db_license_model = "" 84 | 85 | # Database version 86 | db_version = "" 87 | 88 | # Number of database nodes 89 | db_node_count = "" 90 | 91 | #Shape of Database nodes 92 | db_instance_shape = "" 93 | 94 | #Database name 95 | db_name = "" 96 | 97 | #Size of Database 98 | db_size_in_gb = "" 99 | 100 | # Database administration (sys) password 101 | db_admin_password = "" 102 | 103 | # Characterset of database 104 | db_characterset = "" 105 | 106 | # National Characterset of database 107 | db_nls_characterset = "" 108 | 109 | # Pluggable database name 110 | db_pdb_name = "" 111 | 112 | # Hostname of Load Balancer 113 | load_balancer_hostname = "" 114 | 115 | # Shape of Load Balancer 116 | load_balancer_shape = "" 117 | 118 | #Listen port of load balancer 119 | load_balancer_listen_port = "" -------------------------------------------------------------------------------- /Peoplesoft/userdata/bootstrap.tpl: -------------------------------------------------------------------------------- 1 | #cloud-config 2 | timezone: "${timezone}" 3 | 4 | packages: 5 | - nfs-utils 6 | - oracle-rdbms-server-12cR1-preinstall.x86_64 7 | - glibc.i686 8 | - libstdc++.i686 9 | - firefox.x86_64 10 | - nc 11 | - samba 12 | 13 | runcmd: 14 | - mkdir -p ${fss_mount_path} 15 | - sudo mount ${fss_mount_target_private_ip}:${fss_export_path} ${fss_mount_path} 16 | - echo '${fss_mount_target_private_ip}:${fss_export_path} ${fss_mount_path} nfs tcp,vers=3' | sudo tee -a /etc/fstab 17 | - mount -a -t nfs -------------------------------------------------------------------------------- /Peoplesoft/userdata/init.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | touch /tmp/init.done -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | 3 | This is a repository of Terraform modules for Oracle Applications. The repository contain modules for these applications. 4 | 5 | * [**Oracle E-Business Suite**](https://github.com/oracle/cloud-asset-appsul-terraform-samples/tree/master/EBusinessSuite) 6 | * [**JD Edwards**](https://github.com/oracle/cloud-asset-appsul-terraform-samples/tree/master/JDEdwards) 7 | * [**Siebel CRM**](https://github.com/oracle/cloud-asset-appsul-terraform-samples/tree/master/SiebelCRM) 8 | * [**Peoplesoft**](https://github.com/oracle/cloud-asset-appsul-terraform-samples/tree/master/Peoplesoft) 9 | 10 | All these applications can be deployed on Oracle Cloud Infrastructure in single availability domain or multiple availability domain architecture. The Terraform modules allow you to provision infrastructure for these applications on Oracle Cloud Infrastructure using Terraform. 11 | 12 | # Repository Folder Structure 13 | The following directories are contained within this repository: 14 | 15 | **/EBusinessSuite** 16 | * This folder contains Terraform modules for Oracle E-Business Suite. 17 | 18 | **/JDEdwards** 19 | * This folder contains Terraform modules for JD Edwards. 20 | 21 | **/SiebelCRM** 22 | * This folder contains Terraform modules for Siebel CRM. 23 | 24 | **/Peoplesoft** 25 | * This folder contains Terraform modules for Peoplesoft. 26 | 27 | For more information on deployment architecture of Oracle applications on Oracle Cloud Infrastructure, see 28 | 29 | ### Oracle E Business Suite 30 | - [Architecture for Deploying Oracle E-Business Suite in a Single Availability domain](https://docs.oracle.com/en/solutions/deploy-ebusiness-suite-oci/index.html#GUID-1F8ACA7B-C147-446F-A4A4-AD70E4ECCA66) 31 | 32 | - [Architecture for Deploying Oracle E-Business Suite in Multiple Availability domains](https://docs.oracle.com/en/solutions/deploy-ebusiness-suite-oci/index.html#GUID-43B8797E-A2BD-4CA2-A4A9-0E19DB15DA3B) 33 | 34 | 35 | ### JD Edwards 36 | - [Architecture for Deploying JD Edwards in a Single Availability domain](https://docs.oracle.com/en/solutions/learn-architecture-deploy-jd-edwards/index.html#GUID-02AF6D3A-EC4C-4E73-8F07-9FED516A87EC) 37 | 38 | - [Architecture for Deploying JD Edwards in Multiple Availability domains](https://docs.oracle.com/en/solutions/learn-architecture-deploy-jd-edwards/index.html#GUID-70720E0B-0A03-4784-8DF6-4BF58445C15E) 39 | 40 | 41 | ### Siebel CRM 42 | - [Architecture for Deploying Siebel CRM in a Single Availability domain](https://docs.oracle.com/en/solutions/learn-architecture-deploy-siebel/index.html#GUID-CE993A4C-CFEF-4F55-8489-0905D796CBAA) 43 | 44 | ### Peoplesoft 45 | - [Architecture for Deploying PeopleSoft in a Single Availability domain](https://docs.oracle.com/en/solutions/learn-architecture-deploy-peoplesoft/index.html#GUID-3C2AFE54-DE6A-4FF2-9387-64338CBDD428) 46 | - [Architecture for Deploying PeopleSoft in Multiple Availability domains](https://docs.oracle.com/en/solutions/learn-architecture-deploy-peoplesoft/index.html#GUID-5566261F-32FB-4E0A-A00D-6935EC6E5C7A) 47 | 48 | # License 49 | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 50 | The Universal Permissive License (UPL), Version 1.0 51 | Please see LICENSE.md for full details -------------------------------------------------------------------------------- /SiebelCRM/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0 4 | 5 | Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this software, associated documentation and/or data (collectively the "Software"), free of charge and under any and all copyright rights in the Software, and any and all patent rights owned or freely licensable by each licensor hereunder covering either (i) the unmodified Software as contributed to or provided by such licensor, or (ii) the Larger Works (as defined below), to deal in both 6 | 7 | (a) the Software, and 8 | 9 | (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if one is included with the Software (each a “Larger Work” to which the Software is contributed by such licensors), 10 | 11 | without restriction, including without limitation the rights to copy, create derivative works of, display, perform, and distribute the Software and make, use, sell, offer for sale, import, export, have made, and have sold the Software and the Larger Work(s), and to sublicense the foregoing rights on either these or other terms. 12 | 13 | This license is subject to the following condition: 14 | 15 | The above copyright notice and either this complete permission notice or at a minimum a reference to the UPL must be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /SiebelCRM/_docs/single_availability_domain_siebel_crm_deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/SiebelCRM/_docs/single_availability_domain_siebel_crm_deployment.png -------------------------------------------------------------------------------- /SiebelCRM/_docs/terraform-init.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/cloud-asset-appsul-terraform-samples/ba6acefaefc8ca6086a1cd00f2e45a29ff85f1cc/SiebelCRM/_docs/terraform-init.png -------------------------------------------------------------------------------- /SiebelCRM/datasources.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Get list of Availability Domains 7 | data "oci_identity_availability_domains" "ADs" { 8 | compartment_id = "${var.tenancy_ocid}" 9 | } 10 | 11 | # Get name of Availability Domains 12 | data "template_file" "deployment_ad" { 13 | count = "${length(var.AD)}" 14 | template = "${lookup(data.oci_identity_availability_domains.ADs.availability_domains[var.AD[count.index] - 1], "name")}" 15 | } 16 | 17 | # Get list of Fault Domains 18 | data "oci_identity_fault_domains" "fds" { 19 | count = "${length(var.AD)}" 20 | availability_domain = "${element(data.template_file.deployment_ad.*.rendered, count.index)}" 21 | compartment_id = "${var.compartment_ocid}" 22 | } 23 | 24 | locals { 25 | fds = "${flatten(concat(data.oci_identity_fault_domains.fds.*.fault_domains))}" 26 | faultdomains_per_ad = 3 27 | } 28 | 29 | # Get name of Fault Domains 30 | data "template_file" "deployment_fd" { 31 | template = "$${name}" 32 | count = "${length(var.AD) * (local.faultdomains_per_ad) }" 33 | vars = { 34 | name = "${lookup(local.fds[count.index], "name")}" 35 | } 36 | } 37 | 38 | # Get latest Oracle Linux image 39 | data "oci_core_images" "InstanceImageOCID" { 40 | compartment_id = "${var.tenancy_ocid}" 41 | operating_system = "${var.InstanceOS}" 42 | operating_system_version = "${var.linux_os_version}" 43 | filter { 44 | name = "display_name" 45 | values = ["^.*Oracle[^G]*$"] 46 | regex = true 47 | } 48 | } 49 | 50 | # Gets swift object storage name for Service Gateway 51 | data "oci_core_services" "svcgtw_services" { 52 | filter { 53 | name = "name" 54 | values = [".*Object.*Storage"] 55 | regex = true 56 | } 57 | } 58 | 59 | 60 | # Render inputs for mounting Filesystem storage service 61 | data "template_file" "mountfss" { 62 | template = "${file("${path.module}/userdata/mountfss.sh")}" 63 | 64 | vars { 65 | fss_mount_path = "${var.siebel_filesystem_path}/" 66 | fss_export_path = "${element(module.create_fss.FilesystemExports, 0)}" 67 | fss_mount_target_private_ip = "${element(module.create_fss.FilesystemPrivateIPs, 0)}" 68 | } 69 | } 70 | 71 | data "template_file" "bootstrap" { 72 | template = "${file("${path.module}/userdata/bootstrap.tpl")}" 73 | vars { 74 | timezone = "${var.timezone}" 75 | } 76 | } -------------------------------------------------------------------------------- /SiebelCRM/env-vars: -------------------------------------------------------------------------------- 1 | ### Authentication details 2 | export TF_VAR_tenancy_ocid="" 3 | export TF_VAR_user_ocid="" 4 | export TF_VAR_fingerprint="" 5 | export TF_VAR_private_key_path="" 6 | 7 | ### Region 8 | export TF_VAR_region="" 9 | 10 | ### Compartment 11 | export TF_VAR_compartment_ocid="" 12 | 13 | ### Public/private keys used on the instance 14 | export TF_VAR_ssh_public_key= 15 | export TF_VAR_ssh_private_key= 16 | 17 | ### Public/private keys used on the bastion instance 18 | export TF_VAR_bastion_ssh_public_key= 19 | export TF_VAR_bastion_ssh_private_key= -------------------------------------------------------------------------------- /SiebelCRM/env-vars.ps1: -------------------------------------------------------------------------------- 1 | #Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | #The Universal Permissive License (UPL), Version 1.0 4 | 5 | 6 | ### Authentication details 7 | $env:TF_VAR_tenancy_ocid="" 8 | $env:TF_VAR_user_ocid="" 9 | $env:TF_VAR_fingerprint="" 10 | $env:TF_VAR_private_key_path="" 11 | 12 | ### Region 13 | $env:TF_VAR_region="" 14 | 15 | ### Compartment 16 | $env:TF_VAR_compartment_ocid="" 17 | 18 | ### Public/private keys used on the instance 19 | $env:TF_VAR_ssh_public_key="" 20 | $env:TF_VAR_ssh_private_key="" 21 | 22 | ### Public/private keys used on the bastion instance 23 | $env:TF_VAR_bastion_ssh_public_key="" 24 | $env:TF_VAR_bastion_ssh_private_key="" 25 | -------------------------------------------------------------------------------- /SiebelCRM/fss-remote-exec.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "random_integer" "rand" { 7 | min = 1000000000 8 | max = 9999999999 9 | } 10 | 11 | resource "null_resource" "mountfss" { 12 | count = "${var.siebel_server_instance_count}" 13 | provisioner "local-exec" { 14 | command = "sleep 120" # Wait 15 | } 16 | provisioner "file" { 17 | connection { 18 | agent = false 19 | timeout = "${var.timeout}" 20 | host = "${module.create_app.ComputePrivateIPs[count.index % var.siebel_server_instance_count]}" 21 | user = "${var.compute_instance_user}" 22 | private_key = "${file("${var.ssh_private_key}")}" 23 | 24 | bastion_host = "${module.create_bastion.Bastion_Public_IPs[0]}" 25 | bastion_user = "${var.bastion_user}" 26 | bastion_private_key = "${file("${var.bastion_ssh_private_key}")}" 27 | } 28 | content = "${data.template_file.mountfss.rendered}" 29 | destination = "/tmp/fssmount_${random_integer.rand.result}.sh" 30 | } 31 | 32 | provisioner "remote-exec" { 33 | connection { 34 | agent = false 35 | timeout = "${var.timeout}" 36 | host = "${module.create_app.ComputePrivateIPs[count.index % var.siebel_server_instance_count]}" 37 | user = "${var.compute_instance_user}" 38 | private_key = "${file("${var.ssh_private_key}")}" 39 | 40 | bastion_host = "${module.create_bastion.Bastion_Public_IPs[0]}" 41 | bastion_user = "${var.bastion_user}" 42 | bastion_private_key = "${file("${var.bastion_ssh_private_key}")}" 43 | } 44 | 45 | inline = [ 46 | "chmod +x /tmp/fssmount_${random_integer.rand.result}.sh", 47 | "while [ ! -f /tmp/fss.mounted ]; do /tmp/fssmount_${random_integer.rand.result}.sh; sleep 10; done", 48 | ] 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /SiebelCRM/modules/bastion/bastion.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "Bastion_Public_IPs" { 7 | value = ["${oci_core_instance.bastion.*.public_ip}"] 8 | } -------------------------------------------------------------------------------- /SiebelCRM/modules/bastion/bastion.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_core_instance" "bastion" { 7 | compartment_id = "${var.compartment_ocid}" 8 | count = "${length(var.availability_domain)}" 9 | availability_domain = "${element(var.availability_domain, count.index)}" 10 | display_name = "${var.bastion_hostname_prefix}${element(var.AD,count.index)}${count.index+1}" 11 | shape = "${var.bastion_instance_shape}" 12 | 13 | create_vnic_details { 14 | subnet_id = "${element(var.bastion_subnet, count.index)}" 15 | display_name = "${var.bastion_hostname_prefix}${element(var.AD,count.index)}${count.index+1}" 16 | assign_public_ip = true 17 | hostname_label = "${var.bastion_hostname_prefix}${element(var.AD,count.index)}${count.index+1}" 18 | }, 19 | 20 | source_details { 21 | source_type = "image" 22 | source_id = "${var.bastion_image}" 23 | boot_volume_size_in_gbs = "60" 24 | } 25 | 26 | metadata { 27 | ssh_authorized_keys = "${trimspace(file("${var.bastion_ssh_public_key}"))}" 28 | } 29 | } -------------------------------------------------------------------------------- /SiebelCRM/modules/bastion/bastion.vars.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | variable "availability_domain" { 10 | description = "Availability domain" 11 | type = "list" 12 | } 13 | 14 | variable "AD" { 15 | description = "Availability domain" 16 | type= "list" 17 | } 18 | 19 | # Bastion host variables 20 | variable "bastion_hostname_prefix" { 21 | description = "Prefix for bastion hostname" 22 | } 23 | 24 | variable "bastion_instance_shape" { 25 | description = "Instance shape of bastion host" 26 | } 27 | 28 | variable "bastion_subnet" { 29 | description = "Subnet for Bastion host" 30 | type = "list" 31 | } 32 | 33 | variable "bastion_image" { 34 | description ="Bation Operating System Image" 35 | } 36 | variable "bastion_ssh_public_key" { 37 | description = "Bastion Host SSH public key" 38 | } 39 | -------------------------------------------------------------------------------- /SiebelCRM/modules/compute/compute.blockvolume.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_core_volume" "blockvolume" { 7 | count = "${var.compute_instance_count}" 8 | availability_domain = "${element(var.availability_domain, count.index)}" 9 | compartment_id = "${var.compartment_ocid}" 10 | display_name = "${var.compute_hostname_prefix}vol${count.index+1}" 11 | size_in_gbs = "${var.compute_block_volume_size_in_gb}" 12 | } 13 | 14 | resource "oci_core_volume_attachment" "blockvolume_attach" { 15 | attachment_type = "iscsi" 16 | count = "${var.compute_instance_count}" 17 | compartment_id = "${var.compartment_ocid}" 18 | instance_id = "${element(oci_core_instance.compute.*.id, count.index)}" 19 | volume_id = "${element(oci_core_volume.blockvolume.*.id, count.index)}" 20 | 21 | 22 | 23 | provisioner "remote-exec" { 24 | connection { 25 | agent = false 26 | timeout = "30m" 27 | host = "${element(oci_core_instance.compute.*.private_ip, count.index)}" 28 | user = "${var.compute_instance_user}" 29 | private_key = "${file("${var.compute_ssh_private_key}")}" 30 | bastion_host = "${var.bastion_public_ip}" 31 | bastion_port = "22" 32 | bastion_user = "${var.bastion_user}" 33 | bastion_private_key = "${file("${var.bastion_ssh_private_key}")}" 34 | } 35 | 36 | inline = [ 37 | "sudo -s bash -c 'iscsiadm -m node -o new -T ${self.iqn} -p ${self.ipv4}:${self.port}'", 38 | "sudo -s bash -c 'iscsiadm -m node -o update -T ${self.iqn} -n node.startup -v automatic '", 39 | "sudo -s bash -c 'iscsiadm -m node -T ${self.iqn} -p ${self.ipv4}:${self.port} -l '", 40 | "sudo -s bash -c 'mkfs.ext4 -F /dev/sdb'", 41 | "sudo -s bash -c 'mkdir -p /u01'", 42 | "sudo -s bash -c 'mount -t ext4 /dev/sdb /u01'", 43 | "sudo -s bash -c 'echo \"/dev/sdb /u01 ext4 defaults,noatime,_netdev,nofail 0 2\" >> /etc/fstab'", 44 | ] 45 | } 46 | } 47 | 48 | /* 49 | resource "null_resource" "remote-exec" { 50 | depends_on = ["oci_core_instance.compute", "oci_core_volume_attachment.blockvolume_attach"] 51 | count = "${var.compute_instance_count}" 52 | 53 | provisioner "remote-exec" { 54 | connection { 55 | agent = false 56 | timeout = "30m" 57 | host = "${oci_core_instance.compute.*.private_ip[count.index % var.compute_instance_count]}" 58 | user = "${var.app_instance_user}" 59 | private_key = "${file(var.app_ssh_private_key)}" 60 | bastion_host = "${var.bastion_public_ip}" 61 | bastion_port = "22" 62 | bastion_user = "${var.bastion_user}" 63 | bastion_private_key = "${file(var.bastion_ssh_private_key)}" 64 | } 65 | 66 | inline = [ 67 | "touch ~/IMadeAFile.Right.Here", 68 | "sudo mkdir /u01", 69 | "sudo service iscsi reload", 70 | "sudo iscsiadm -m node -o new -T ${oci_core_volume_attachment.blockvolume_attach.*.iqn[count.index]} -p ${oci_core_volume_attachment.blockvolume_attach.*.ipv4[count.index]}:${oci_core_volume_attachment.blockvolume_attach.*.port[count.index]}", 71 | "sudo iscsiadm -m node -o update -T ${oci_core_volume_attachment.blockvolume_attach.*.iqn[count.index]} -n node.startup -v automatic", 72 | "echo sudo iscsiadm -m node -T ${oci_core_volume_attachment.blockvolume_attach.*.iqn[count.index]} -p ${oci_core_volume_attachment.blockvolume_attach.*.ipv4[count.index]}:${oci_core_volume_attachment.blockvolume_attach.*.port[count.index]} -l >> ~/.bashrc", 73 | "sudo -s bash -c 'mkfs.ext4 -F /dev/sdb'", 74 | "sudo -s bash -c 'mount -t ext4 /dev/sdb /u01'", 75 | "sudo -s bash -c 'echo \"/dev/sdb /u01 ext4 defaults,noatime,_netdev,nofail 0 2\" >> /etc/fstab'", 76 | ] 77 | } 78 | } 79 | */ -------------------------------------------------------------------------------- /SiebelCRM/modules/compute/compute.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "ComputePrivateIPs" { 7 | value = ["${oci_core_instance.compute.*.private_ip}"] 8 | } -------------------------------------------------------------------------------- /SiebelCRM/modules/compute/compute.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_core_instance" "compute" { 7 | count = "${var.compute_instance_count}" 8 | availability_domain = "${element(var.availability_domain, count.index)}" 9 | display_name = "${var.compute_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 10 | fault_domain = "${element(var.fault_domain, count.index)}" 11 | compartment_id = "${var.compartment_ocid}" 12 | shape = "${var.compute_instance_shape}" 13 | 14 | create_vnic_details { 15 | subnet_id = "${element(var.compute_subnet, count.index)}" 16 | display_name = "${var.compute_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 17 | assign_public_ip = false 18 | hostname_label = "${var.compute_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 19 | }, 20 | 21 | source_details { 22 | source_type = "image" 23 | source_id = "${var.compute_image}" 24 | boot_volume_size_in_gbs = "${var.compute_boot_volume_size_in_gb}" 25 | } 26 | 27 | metadata { 28 | ssh_authorized_keys = "${trimspace(file("${var.compute_ssh_public_key}"))}" 29 | user_data = "${base64encode(var.user_data)}" 30 | } 31 | 32 | timeouts { 33 | create = "${var.timeout}" 34 | } 35 | } -------------------------------------------------------------------------------- /SiebelCRM/modules/compute/compute.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | 10 | variable "fault_domain" { 11 | description = "Fault Domainr" 12 | type = "list" 13 | } 14 | variable "compute_instance_count" {} 15 | variable "compute_instance_shape" {} 16 | variable "compute_hostname_prefix" { 17 | description = "Host name" 18 | } 19 | variable "compute_image" { 20 | description ="OS Image" 21 | } 22 | 23 | variable "compute_ssh_private_key" { 24 | description = "SSH key" 25 | } 26 | variable "compute_ssh_public_key" { 27 | description = "SSH key" 28 | } 29 | variable "bastion_ssh_private_key" { 30 | description = "SSH key" 31 | } 32 | variable "compute_subnet" { 33 | type = "list" 34 | description = "subnet" 35 | } 36 | variable "availability_domain" { 37 | type = "list" 38 | } 39 | variable "AD" { 40 | type = "list" 41 | } 42 | /*variable "fss_instance_prefix" {} 43 | variable "fss_subnet" { 44 | type = "list" 45 | } 46 | variable "export_path_fs1_mt1" { 47 | default = "/sieblelfs" 48 | } 49 | */ 50 | variable "bastion_public_ip" { 51 | type="string" 52 | } 53 | 54 | 55 | variable "compute_boot_volume_size_in_gb" {} 56 | variable "compute_block_volume_size_in_gb" {} 57 | 58 | 59 | variable "timeout" { 60 | description = "Timeout setting for resource creation " 61 | default = "10m" 62 | } 63 | 64 | 65 | variable timezone {} 66 | variable bastion_user {} 67 | 68 | variable compute_instance_user {} 69 | 70 | 71 | variable user_data {} 72 | -------------------------------------------------------------------------------- /SiebelCRM/modules/dbsystem/db.datasources.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Get a list of Availability Domains 7 | 8 | data "oci_database_db_system_shapes" "db_system_shapes" { 9 | availability_domain = "${element(var.availability_domain, count.index)}" 10 | compartment_id = "${var.compartment_ocid}" 11 | filter { 12 | name = "shape" 13 | values = ["${var.db_instance_shape}"] 14 | } 15 | } 16 | 17 | data "oci_database_db_nodes" "DBNodeList" { 18 | compartment_id = "${var.compartment_ocid}" 19 | count = "${length(var.availability_domain)}" 20 | #count = "${length(var.availability_domain)}" 21 | #db_system_id = "${oci_database_db_system.ebsdb.0.id}" 22 | db_system_id ="${element(flatten(oci_database_db_system.database.*.id), count.index)}" 23 | /*filter { 24 | name = "id" 25 | #values = ["${oci_file_storage_mount_target.ebsappfss_mt1.*.private_ip_ids[count.index]}"] 26 | values = ["${element(flatten(oci_database_db_system.ebsdb.*.db_nodes), count.index)}"] 27 | }*/ 28 | } 29 | /* 30 | data "oci_database_db_node" "db_node_details" { 31 | #count = "${length(var.availability_domain) * var.db_node_count}" 32 | count = "${length(var.availability_domain) * (var.db_node_count)}" 33 | #db_node_id = "${lookup(data.oci_database_db_nodes.db_nodes.db_nodes[0], "id")}" 34 | db_node_id = "${element(data.oci_database_db_nodes.DBNodeList.*.db_nodes, count.index)}" 35 | }*/ 36 | /* 37 | data "oci_core_private_ips" "DBNodeIPs" { 38 | count = "${length(var.availability_domain) * var.db_node_count}" 39 | #subnet_id= "${oci_file_storage_mount_target.ebsappfss_mt1.*.subnet_id[count.index]}" 40 | vnic_id= "${lookup(data.oci_database_db_nodes.DBNodeList.*.db_nodes, count.index)}" 41 | 42 | filter { 43 | name = "id" 44 | #values = ["${oci_file_storage_mount_target.ebsappfss_mt1.*.private_ip_ids[count.index]}"] 45 | values = ["${element(flatten(data.oci_database_db_nodes.DBNodeList.*.vnic_id), count.index)}"] 46 | #values = ["${element(flatten(oci_file_storage_mount_target.ebsappfss_mt1.*.private_ip_ids), count.index)}"] 47 | } 48 | } 49 | 50 | */ 51 | 52 | 53 | /* 54 | locals { 55 | fss-private-ips = "${flatten(concat(data.oci_core_private_ips.ip_mount_target.*.private_ips))}" 56 | } 57 | 58 | data "template_file" "fss-ips" { 59 | template = "$${ip_address}" 60 | count = "${length(var.availability_domain)}" 61 | 62 | vars = { 63 | ip_address = "${lookup(local.fss-private-ips[count.index], "ip_address")}" 64 | } 65 | } 66 | 67 | */ 68 | 69 | -------------------------------------------------------------------------------- /SiebelCRM/modules/dbsystem/db.dbsystem.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_database_db_system" "database" { 7 | count = "${length(var.availability_domain)}" 8 | compartment_id = "${var.compartment_ocid}" 9 | availability_domain = "${element(var.availability_domain, count.index)}" 10 | cpu_core_count = "${lookup(data.oci_database_db_system_shapes.db_system_shapes.db_system_shapes[0], "minimum_core_count")}" 11 | database_edition = "${var.db_edition}" 12 | db_home { 13 | database { 14 | "admin_password" = "${var.db_admin_password}" 15 | "db_name" = "${var.db_name}" 16 | "character_set" = "${var.db_characterset}" 17 | "ncharacter_set" = "${var.db_nls_characterset}" 18 | "db_workload" = "${var.db_workload}" 19 | "pdb_name" = "${var.db_pdb_name}" 20 | } 21 | db_version = "${var.db_version}" 22 | display_name = "${var.db_name}" 23 | } 24 | shape = "${var.db_instance_shape}" 25 | node_count = "${var.db_node_count}" 26 | data_storage_size_in_gb = "${var.db_size_in_gb}" 27 | #data_storage_percentage = "40" 28 | license_model = "${var.db_license_model}" 29 | disk_redundancy = "${var.db_disk_redundancy}" 30 | subnet_id = "${element(var.db_subnet, count.index)}" 31 | ssh_public_keys = ["${trimspace(file("${var.db_ssh_public_key}"))}"] 32 | display_name = "${var.db_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 33 | hostname = "${var.db_hostname_prefix}${element(var.AD,count.index)}${count.index + 1}" 34 | } -------------------------------------------------------------------------------- /SiebelCRM/modules/dbsystem/db.variables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" {} 7 | 8 | variable "db_subnet" { 9 | type="list" 10 | } 11 | variable "availability_domain" { 12 | type = "list" 13 | } 14 | 15 | variable "AD" { 16 | type= "list" 17 | } 18 | 19 | # DBSystem specific 20 | variable "db_edition" {} 21 | 22 | variable "db_admin_password" {} 23 | 24 | variable "db_name" {} 25 | 26 | variable "db_version" {} 27 | 28 | variable "db_disk_redundancy" { 29 | default="NORMAL" 30 | } 31 | 32 | variable "db_hostname_prefix" {} 33 | variable "db_instance_shape" {} 34 | 35 | variable "db_ssh_public_key" {} 36 | 37 | variable "db_nls_characterset" { 38 | } 39 | variable "db_characterset" { 40 | } 41 | variable "db_workload" { 42 | default = "OLTP" 43 | } 44 | variable "db_pdb_name" { 45 | } 46 | variable "db_size_in_gb" { 47 | } 48 | 49 | variable "db_license_model" { 50 | } 51 | variable "db_node_count" { 52 | } -------------------------------------------------------------------------------- /SiebelCRM/modules/filesystem/fss.data.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | locals { 7 | fss_private_ips = "${flatten(concat(data.oci_core_private_ips.ip_mount_target.*.private_ips))}" 8 | } 9 | 10 | locals { 11 | fss_exports = [ 12 | "${oci_file_storage_export.fss_export.*.path}", 13 | ] 14 | fss_fstabs = "${formatlist("%s:%s", data.template_file.fss_ips.*.rendered, oci_file_storage_export.fss_export.*.path)}" 15 | } 16 | 17 | 18 | # Get private IP of Filesystem Storage Service 19 | 20 | data "oci_core_private_ips" "ip_mount_target" { 21 | count = "${length(var.availability_domain)}" 22 | subnet_id = "${element(oci_file_storage_mount_target.fss_mt.*.subnet_id, count.index)}" 23 | 24 | filter { 25 | name = "id" 26 | values = ["${element(flatten(oci_file_storage_mount_target.fss_mt.*.private_ip_ids), count.index)}"] 27 | } 28 | } 29 | 30 | data "template_file" "fss_ips" { 31 | template = "$${ip_address}" 32 | count = "${length(var.availability_domain)}" 33 | 34 | vars = { 35 | ip_address = "${lookup(local.fss_private_ips[count.index], "ip_address")}" 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /SiebelCRM/modules/filesystem/fss.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "FilesystemPrivateIPs" { 7 | description = "FSS Private IPs" 8 | value = "${data.template_file.fss_ips.*.rendered}" 9 | } 10 | 11 | output "FilesystemExports" { 12 | description = "FSS Exports" 13 | value = "${local.fss_exports}" 14 | } 15 | 16 | output "FilesystemFstabs" { 17 | description = "FSS /etc/fstab Entries" 18 | value = "${local.fss_fstabs}" 19 | } -------------------------------------------------------------------------------- /SiebelCRM/modules/filesystem/fss.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_file_storage_file_system" "fss" { 7 | compartment_id = "${var.compartment_ocid}" 8 | count = "${length(var.availability_domain)}" 9 | availability_domain = "${element(var.availability_domain, count.index)}" 10 | display_name = "${var.fss_instance_prefix}${var.AD[count.index]}" 11 | } 12 | 13 | resource "oci_file_storage_mount_target" "fss_mt" { 14 | depends_on = ["oci_file_storage_file_system.fss"] 15 | compartment_id = "${var.compartment_ocid}" 16 | count = "${length(var.availability_domain)}" 17 | availability_domain = "${element(var.availability_domain, count.index)}" 18 | hostname_label = "${var.fss_instance_prefix}${var.AD[count.index]}" 19 | subnet_id = "${element(var.fss_subnet, count.index)}" 20 | display_name = "${var.fss_instance_prefix}${var.AD[count.index]}_mt" 21 | } 22 | 23 | resource "oci_file_storage_export_set" "fss_export_set" { 24 | count = "${length(var.availability_domain)}" 25 | mount_target_id = "${element(oci_file_storage_mount_target.fss_mt.*.id, count.index)}" 26 | max_fs_stat_bytes = "${(var.fss_limit_size_in_gb * 1024 * 1024 * 1024)}" 27 | } 28 | resource "oci_file_storage_export" "fss_export" { 29 | count = "${length(var.availability_domain)}" 30 | export_set_id = "${element(oci_file_storage_mount_target.fss_mt.*.export_set_id,count.index)}" 31 | file_system_id = "${element(oci_file_storage_file_system.fss.*.id, count.index)}" 32 | path = "/${var.fss_instance_prefix}${var.AD[count.index]}" 33 | 34 | export_options = [ 35 | { 36 | source = "0.0.0.0/0" 37 | access = "READ_WRITE" 38 | identity_squash = "NONE" 39 | require_privileged_source_port = true 40 | }, 41 | ] 42 | } 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /SiebelCRM/modules/filesystem/fss.vars.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment name" 8 | } 9 | 10 | variable "availability_domain" { 11 | type = "list" 12 | } 13 | variable "AD" { 14 | type = "list" 15 | } 16 | variable "fss_instance_prefix" {} 17 | variable "fss_subnet" { 18 | type = "list" 19 | } 20 | variable "export_path_fs1_mt1" { 21 | default = "/sieblelfs" 22 | } 23 | 24 | variable "fss_limit_size_in_gb" { 25 | } 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /SiebelCRM/modules/loadbalancer/lb.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | resource "oci_load_balancer" "lb" { 7 | shape = "${var.load_balancer_shape}" 8 | count = "${length(var.availability_domain)}" 9 | compartment_id = "${var.compartment_ocid}" 10 | subnet_ids = ["${element(var.load_balancer_subnet, count.index)}"] 11 | display_name = "${var.load_balancer_name}${element(var.AD,count.index)}${count.index+1}" 12 | is_private = "${var.load_balancer_private}" 13 | } 14 | 15 | resource "oci_load_balancer_backend_set" "lb-bset" { 16 | count = "${length(var.availability_domain)}" 17 | name = "${var.load_balancer_name}${element(var.AD,count.index)}-bes${count.index + 1}" 18 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, count.index)}" 19 | policy = "ROUND_ROBIN" 20 | 21 | health_checker { 22 | port = "${var.app_instance_listen_port}" 23 | protocol = "HTTP" 24 | response_body_regex = ".*" 25 | url_path = "/" 26 | } 27 | session_persistence_configuration { 28 | cookie_name = "lb-session1" 29 | disable_fallback = true 30 | } 31 | lifecycle { 32 | ignore_changes = ["availability_domain"] 33 | } 34 | } 35 | 36 | resource "oci_load_balancer_backend" "lb-bset-be" { 37 | count = "${var.app_instance_count}" 38 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, count.index)}" 39 | backendset_name = "${element(oci_load_balancer_backend_set.lb-bset.*.name, count.index)}" 40 | ip_address = "${element(var.be_ip_addresses, count.index)}" 41 | port = "${var.app_instance_listen_port}" 42 | backup = false 43 | drain = false 44 | offline = false 45 | weight = 1 46 | 47 | lifecycle { 48 | ignore_changes = ["availability_domain"] 49 | } 50 | } 51 | 52 | resource "oci_load_balancer_hostname" "hostname" { 53 | count = "${length(var.availability_domain)}" 54 | hostname = "${var.load_balancer_hostname}" 55 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, count.index)}" 56 | name = "hostname${count.index + 1}" 57 | } 58 | 59 | resource "oci_load_balancer_listener" "lb-listener" { 60 | depends_on = ["oci_load_balancer_hostname.hostname"] 61 | count = "${length(var.availability_domain)}" 62 | load_balancer_id = "${element(oci_load_balancer.lb.*.id, count.index)}" 63 | name = "${var.load_balancer_name}${element(var.AD,count.index)}-lsnr${count.index + 1}" 64 | default_backend_set_name = "${element(oci_load_balancer_backend_set.lb-bset.*.name, count.index)}" 65 | hostname_names = ["${element(oci_load_balancer_hostname.hostname.*.name, count.index)}"] 66 | port = "${var.load_balancer_listen_port}" 67 | protocol = "HTTP" 68 | connection_configuration { 69 | idle_timeout_in_seconds = "2" 70 | } 71 | } 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /SiebelCRM/modules/loadbalancer/lb.vars.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable load_balancer_subnet { 7 | type = "list" 8 | } 9 | 10 | variable "availability_domain" { 11 | type = "list" 12 | description = "Availability domain" 13 | } 14 | 15 | variable "AD" { 16 | type= "list" 17 | } 18 | variable load_balancer_name {} 19 | variable compartment_ocid {} 20 | variable load_balancer_shape {} 21 | variable load_balancer_private { 22 | default = "True" 23 | } 24 | /*variable be1_ip_address1 { 25 | type="string" 26 | } 27 | */ 28 | 29 | 30 | variable be_ip_addresses { 31 | type="list" 32 | } 33 | variable load_balancer_hostname {} 34 | 35 | variable app_instance_listen_port {} 36 | variable load_balancer_listen_port {} 37 | 38 | variable app_instance_count {} -------------------------------------------------------------------------------- /SiebelCRM/modules/network/subnets/subnets.output.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "subnetid" { 7 | value = ["${oci_core_subnet.subnet.*.id}"] 8 | } 9 | 10 | output "cidr_block" { 11 | value = ["${oci_core_subnet.subnet.*.cidr_block}"] 12 | } -------------------------------------------------------------------------------- /SiebelCRM/modules/network/subnets/subnets.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Create subnet 7 | resource "oci_core_subnet" "subnet" { 8 | count = "${length(var.availability_domain)}" 9 | availability_domain = "${element(var.availability_domain, count.index)}" 10 | compartment_id = "${var.compartment_ocid}" 11 | vcn_id = "${var.vcn_id}" 12 | cidr_block = "${var.vcn_subnet_cidr[count.index]}" 13 | display_name = "${var.dns_label}${var.AD[count.index]}" 14 | dns_label = "${var.dns_label}${var.AD[count.index]}" 15 | dhcp_options_id = "${var.dhcp_options_id}" 16 | route_table_id = "${var.route_table_id}" 17 | security_list_ids = ["${var.security_list_ids}"] 18 | prohibit_public_ip_on_vnic = "${var.private_subnet}" 19 | } -------------------------------------------------------------------------------- /SiebelCRM/modules/network/subnets/subnets.vars.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | /* 6 | variable "tenancy_ocid" { 7 | description = "OCI Tenancy OCID" 8 | }*/ 9 | variable "compartment_ocid" { 10 | description = "Compartment name" 11 | } 12 | variable "availability_domain" { 13 | description = "Availability domain" 14 | type = "list" 15 | } 16 | variable "AD" { 17 | description = "Availability domain" 18 | type = "list" 19 | } 20 | 21 | # Virtual Cloud Network (VCN) variables 22 | variable "vcn_id" { 23 | description = "VCN OCID" 24 | } 25 | variable "route_table_id" { 26 | description = "VCN Route Table OCID" 27 | } 28 | 29 | variable "dhcp_options_id" { 30 | description = "VCN DHCP options OCID" 31 | } 32 | variable "vcn_subnet_cidr" { 33 | description = "CIDR for VCN subnet" 34 | type = "list" 35 | } 36 | variable "security_list_ids" { 37 | description = "Security List OCID" 38 | type = "list" 39 | } 40 | variable "dns_label" { 41 | description = "VCN DNS Label" 42 | } 43 | variable "private_subnet" { 44 | description = "Whether private or public subnet" 45 | } -------------------------------------------------------------------------------- /SiebelCRM/modules/network/vcn/vcn.data.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Get name of object storage 7 | data "oci_core_services" "svcgtw_services" { 8 | filter { 9 | name = "name" 10 | values = [".*Object.*Storage"] 11 | regex = true 12 | } 13 | } -------------------------------------------------------------------------------- /SiebelCRM/modules/network/vcn/vcn.outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "vcnid" { 7 | description = "ocid of VCN" 8 | value = "${oci_core_virtual_network.vcn.id}" 9 | } 10 | output "default_dhcp_id" { 11 | description = "ocid of default DHCP options" 12 | value = "${oci_core_virtual_network.vcn.default_dhcp_options_id}" 13 | } 14 | 15 | output "igw_id" { 16 | description = "ocid of internet gateway" 17 | value = "${oci_core_internet_gateway.igw.id}" 18 | } 19 | 20 | output "natgtw_id" { 21 | description = "ocid of service gateway" 22 | value = "${oci_core_nat_gateway.natgtw.id}" 23 | } 24 | output "svcgtw_id" { 25 | description = "ocid of service gateway" 26 | value = "${oci_core_service_gateway.svcgtw.id}" 27 | } 28 | -------------------------------------------------------------------------------- /SiebelCRM/modules/network/vcn/vcn.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Virtual Cloud Network (VCN) 7 | resource "oci_core_virtual_network" "vcn" { 8 | compartment_id = "${var.compartment_ocid}" 9 | cidr_block = "${var.vcn_cidr}" 10 | dns_label = "${var.vcn_dns_label}" 11 | display_name = "${var.vcn_dns_label}" 12 | } 13 | 14 | # Internet Gateway 15 | resource "oci_core_internet_gateway" "igw" { 16 | compartment_id = "${var.compartment_ocid}" 17 | display_name = "${var.vcn_dns_label}igw" 18 | vcn_id = "${oci_core_virtual_network.vcn.id}" 19 | } 20 | 21 | # NAT (Network Address Translation) Gateway 22 | resource "oci_core_nat_gateway" "natgtw" { 23 | compartment_id = "${var.compartment_ocid}" 24 | vcn_id = "${oci_core_virtual_network.vcn.id}" 25 | display_name = "${var.vcn_dns_label}natgtw" 26 | } 27 | 28 | # Service Gateway 29 | resource "oci_core_service_gateway" "svcgtw" { 30 | compartment_id = "${var.compartment_ocid}" 31 | services { 32 | service_id = "${lookup(data.oci_core_services.svcgtw_services.services[0], "id")}" 33 | } 34 | vcn_id = "${oci_core_virtual_network.vcn.id}" 35 | display_name = "${var.vcn_dns_label}svcgtw" 36 | } 37 | 38 | # Dynamic Routing Gateway (DRG) 39 | resource "oci_core_drg" "drg" { 40 | compartment_id = "${var.compartment_ocid}" 41 | display_name = "${var.vcn_dns_label}drg" 42 | } 43 | resource "oci_core_drg_attachment" "drg_attachment" { 44 | drg_id = "${oci_core_drg.drg.id}" 45 | vcn_id = "${oci_core_virtual_network.vcn.id}" 46 | display_name = "${var.vcn_dns_label}drgattch" 47 | } -------------------------------------------------------------------------------- /SiebelCRM/modules/network/vcn/vcn.vars.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | variable "compartment_ocid" { 7 | description = "Compartment OCID" 8 | } 9 | # VCN Variables 10 | variable "vcn_cidr" { 11 | description = "VCN CIDR" 12 | } 13 | variable "vcn_dns_label" { 14 | description = "VCN DNS Label" 15 | } 16 | -------------------------------------------------------------------------------- /SiebelCRM/outputs.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | output "BastionPublicIPs" { 7 | value = ["${module.create_bastion.Bastion_Public_IPs}"] 8 | } 9 | 10 | output "SiebelServerPrivateIPs" { 11 | value = ["${module.create_app.ComputePrivateIPs}"] 12 | } 13 | 14 | output "SiebelWebServerPrivateIPs" { 15 | value = ["${module.create_web.ComputePrivateIPs}"] 16 | } 17 | 18 | output "SiebelGatewayServerPrivateIPs" { 19 | value = ["${module.create_app_gateway.ComputePrivateIPs}"] 20 | } 21 | 22 | output "SiebelFilesystemFstabs" { 23 | value = ["${module.create_fss.FilesystemFstabs}"] 24 | } 25 | -------------------------------------------------------------------------------- /SiebelCRM/provider.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | 6 | # Terraform version 7 | 8 | terraform { 9 | required_version = ">= 0.11.8" 10 | } 11 | 12 | # Oracle Cloud Infrastructure (OCI) Provider 13 | 14 | provider "oci" { 15 | version = "=3.5.0" 16 | tenancy_ocid = "${var.tenancy_ocid}" 17 | user_ocid = "${var.user_ocid}" 18 | fingerprint = "${var.fingerprint}" 19 | private_key_path = "${var.private_key_path}" 20 | region = "${var.region}" 21 | } -------------------------------------------------------------------------------- /SiebelCRM/routetables.tf: -------------------------------------------------------------------------------- 1 | /*Copyright © 2018, Oracle and/or its affiliates. All rights reserved. 2 | 3 | The Universal Permissive License (UPL), Version 1.0*/ 4 | 5 | # Public Route Table 6 | resource "oci_core_route_table" "PublicRT" { 7 | compartment_id = "${var.compartment_ocid}" 8 | vcn_id = "${module.create_vcn.vcnid}" 9 | display_name = "${var.vcn_dns_label}pubrt" 10 | 11 | route_rules { 12 | destination = "${local.anywhere}" 13 | network_entity_id = "${module.create_vcn.igw_id}" 14 | } 15 | } 16 | 17 | # Private Route Table 18 | resource "oci_core_route_table" "PrivateRT" { 19 | compartment_id = "${var.compartment_ocid}" 20 | vcn_id = "${module.create_vcn.vcnid}" 21 | display_name = "${var.vcn_dns_label}pvtrt" 22 | 23 | route_rules { 24 | destination = "${lookup(data.oci_core_services.svcgtw_services.services[0], "cidr_block")}" 25 | destination_type = "SERVICE_CIDR_BLOCK" 26 | network_entity_id = "${module.create_vcn.svcgtw_id}" 27 | }, 28 | route_rules { 29 | destination = "${local.anywhere}" 30 | destination_type = "CIDR_BLOCK" 31 | network_entity_id = "${module.create_vcn.natgtw_id}" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /SiebelCRM/terraform.tfvars: -------------------------------------------------------------------------------- 1 | # AD (Availability Domain to use for creating Siebel infrastructure) 2 | AD = "[]" 3 | 4 | # CIDR block of VCN to be created 5 | vcn_cidr = "" 6 | 7 | # DNS label of VCN to be created 8 | vcn_dns_label = "" 9 | 10 | # Operating system version to be used for application instances 11 | linux_os_version = "" 12 | 13 | # Timezone of compute instance 14 | timezone = "" 15 | 16 | # Login user for bastion host 17 | bastion_user = "" 18 | 19 | # Size of boot volume (in gb) of application instances 20 | compute_boot_volume_size_in_gb = "" 21 | 22 | # Size of block volume (in gb) of application instances 23 | compute_block_volume_size_in_gb = "" 24 | 25 | # Login user for compute instance 26 | compute_instance_user = "" 27 | 28 | #Environment prefix to define name of resources 29 | siebel_env_prefix = "" 30 | 31 | # Number of application instances to be created 32 | siebel_server_instance_count = "" 33 | 34 | # Shape of app instance 35 | siebel_server_instance_shape = "" 36 | 37 | # Listen port of the application instance 38 | siebel_server_instance_listen_port = "[]" 39 | 40 | # Mount path for application filesystem 41 | siebel_filesystem_path = "" 42 | 43 | # Set filesystem limit 44 | siebel_filesystem_size_limit_in_gb = "" 45 | 46 | # Number of application instances to be created 47 | siebel_web_instance_count ="" 48 | 49 | # Shape of app instance 50 | siebel_web_instance_shape = "" 51 | 52 | # Listen port of the application instance 53 | siebel_web_instance_listen_port = "" 54 | 55 | # Number of application instances to be created 56 | siebel_gateway_instance_count = "" 57 | 58 | # Shape of app instance 59 | siebel_gateway_instance_shape = "" 60 | 61 | # Database Edition 62 | db_edition = "" 63 | 64 | # Licensing model for database 65 | db_license_model = "" 66 | 67 | # Database version 68 | db_version = "" 69 | 70 | # Number of database nodes 71 | db_node_count = "" 72 | 73 | #Shape of Database nodes 74 | db_instance_shape = "" 75 | 76 | #Database name 77 | db_name = "" 78 | 79 | #Size of Database 80 | db_size_in_gb = "" 81 | 82 | # Database administration (sys) password 83 | db_admin_password = "" 84 | 85 | # Characterset of database 86 | db_characterset = "" 87 | 88 | # National Characterset of database 89 | db_nls_characterset = "" 90 | 91 | # Pluggable database name 92 | db_pdb_name = "" 93 | 94 | # Hostname of Load Balancer 95 | load_balancer_hostname = "" 96 | 97 | # Shape of Load Balancer 98 | load_balancer_shape = "" 99 | 100 | #Listen port of load balancer 101 | load_balancer_listen_port = "" -------------------------------------------------------------------------------- /SiebelCRM/userdata/bootstrap.tpl: -------------------------------------------------------------------------------- 1 | #cloud-config 2 | timezone: "${timezone}" 3 | 4 | packages: 5 | - nfs-utils 6 | - oracle-rdbms-server-12cR1-preinstall.x86_64 -------------------------------------------------------------------------------- /SiebelCRM/userdata/mountfss.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | sudo mkdir -p ${fss_mount_path} 3 | sudo mount ${fss_mount_target_private_ip}:${fss_export_path} ${fss_mount_path} 4 | echo '${fss_mount_target_private_ip}:${fss_export_path} ${fss_mount_path} nfs tcp,vers=3' | sudo tee -a /etc/fstab 5 | touch /tmp/fss.mounted --------------------------------------------------------------------------------