Skip to content

Commit dcf3be2

Browse files
committed
Merge branch 'development' of https://github.com/oracle-quickstart/weblogic-server-for-oci into development
2 parents deeb7c9 + 4c6ec8d commit dcf3be2

File tree

4 files changed

+85
-10
lines changed

4 files changed

+85
-10
lines changed

solutions/jrf/README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
## WebLogic JRF domain with OCI DB
2+
3+
This solution creates single/multi node Weblogic cluster with OCI Database and Oracle Identity Cloud Service fronted by a load balancer. The solution will create only one stack at time and further modifications that are done will be done on the same stack.
4+
5+
This topology uses existing infrastructure.
6+
- Existing VCN and existing subnets with private WebLogic subnet.
7+
- OCI DB in a different VCN
8+
- Existing public load balancer
9+
10+
Oracle Identity Cloud Service (IDCS) is used to authenticate user.
11+
12+
![Full Topology Diagram](Topology.png)
13+
14+
The above diagram shows a topology that includes most of the components supported by the Terraform scripts.
15+
In this scenario, the WebLogic servers are in a private subnet. To access the applications running on WebLogic, an existing OCI load balancer in public regional subnet is used. A bastion instance with a public IP address is provisioned to allow access to the VMs in the private subnet. The Oracle WebLogic Server domain is configured to use Oracle Identity Cloud Service for authentication.
16+
17+
The diagram shows the stack using a database located in a VCN different from the one used by the WebLogic for OCI stack, with VCN peering. Peering is necessary because DB VCN is different from Weblogic VCN. Since existing VCNs are used here, VCNs for WebLogic Server compute instances and the Oracle Cloud Infrastructure Application Database are peered manually before creating the stack for the Oracle WebLogic Server for OCI domain. To peer the VCNs manually, see [Manual VCN Peering](https://docs.oracle.com/en/cloud/paas/weblogic-cloud/user/configure-database-parameters.html#GUID-6A39A2A7-EF6C-408E-B5C7-C44089A9B134__MANUAL_VCN_PEERING).
18+
19+
## Before You Begin with Oracle WebLogic Server for OCI
20+
Refer to the [documentation](https://docs.oracle.com/en/cloud/paas/weblogic-cloud/user/you-begin-oracle-weblogic-cloud.html) for the pre-requisite steps to using Oracle WebLogic Server for OCI.
21+
22+
## Workspace Checkout
23+
- Install latest version of git from http://git-scm.com/downloads
24+
- For Linux and Mac: Add the git to the PATH
25+
- Clone the code using the command:
26+
27+
```bash
28+
git clone https://github.com/oracle-quickstart/weblogic-server-for-oci.git
29+
```
30+
31+
## Organization
32+
The directory weblogic-server-for-oci/solutions/jrf consists of the following terraform files:
33+
34+
- jrf_instance.tfvars - WebLogic instance, bastion instance and network configuration
35+
- existing_lb.tfvars - Load balancer configuration
36+
- oci_db.tfvars - OCI Database configuration
37+
- idcs.tfvars - IDCS configuration
38+
39+
The directory weblogic-server-for-oci/solutions/common consists of the following:
40+
- tenancy.tfvars - tenancy configuration
41+
42+
## Using the Terraform command line tool
43+
```bash
44+
cd weblogic-server-for-oci/terraform
45+
```
46+
47+
Initialize the terraform provider plugin
48+
```bash
49+
terraform init
50+
```
51+
52+
Update the variable values in tfvars files under directories terraform/solutions/common and terraform/solutions/jrf according to the user specific values
53+
Invoke apply passing all *.tfvars files as input
54+
```bash
55+
terraform apply -var-file=../solutions/common/tenancy.tfvars -var-file=inputs/mp_image_ee_byol.tfvars -var-file=../solutions/jrf/jrf_instance.tfvars -var-file=../solutions/jrf/existing_lb.tfvars -var-file=../solutions/jrf/idcs.tfvars var-file=../solutions/jrf/oci_db.tfvars
56+
```
57+
58+
To destroy the infrastructure
59+
```bash
60+
terraform destroy var-file=../solutions/common/tenancy.tfvars -var-file=inputs/mp_image_ee_byol.tfvars -var-file=../solutions/jrf/jrf_instance.tfvars -var-file=../solutions/jrf/existing_lb.tfvars -var-file=../solutions/jrf/idcs.tfvars var-file=../solutions/jrf/oci_db.tfvars
61+
```
62+
**Important:** Refer to [documentation](https://docs.oracle.com/en/cloud/paas/weblogic-cloud/user/delete-domain.html) for steps to perform before running *terraform destroy*.

solutions/jrf/Topology.png

138 KB
Loading

terraform/modules/validators/validators.tf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022, Oracle and/or its affiliates.
1+
# Copyright (c) 2022, 2023, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
locals {
@@ -45,11 +45,15 @@ locals {
4545
vmscripts_zip_bundle_msg = "WLSC-ERROR: The value for wlsoci vmscripts zip bundle path is not valid. The value must be obsolute path to vmscripts zip bundle."
4646
validate_vmscripts_zip_bundle = local.invalid_vmscripts_zip_bundle ? local.validators_msg_map[local.vmscripts_zip_bundle_msg] : null
4747

48-
missing_lb_availability_domains = !var.use_regional_subnet && local.add_new_load_balancer && (var.is_lb_private ? var.lb_availability_domain_name1 == "" : (var.lb_availability_domain_name1 == "" || var.lb_availability_domain_name2 == ""))
48+
new_ad_subnets = !var.use_regional_subnet && !var.use_existing_subnets
49+
new_ad_subnets_not_supported_msg = "WLSC-ERROR: Creating new AD specific subnets is not supported."
50+
new_ad_subnets_not_supported = local.new_ad_subnets ? local.validators_msg_map[local.new_ad_subnets_not_supported_msg] : null
51+
52+
missing_lb_availability_domains = !var.use_regional_subnet && var.use_existing_subnets && local.add_new_load_balancer && (var.is_lb_private ? var.lb_availability_domain_name1 == "" : (var.lb_availability_domain_name1 == "" || var.lb_availability_domain_name2 == ""))
4953
lb_availability_domains_required_msg = "WLSC-ERROR: The values for lb_subnet_1_availability_domain_name and lb_subnet_2_availability_domain_name are required for AD specific subnets."
5054
missing_lb_availability_domain_names = local.missing_lb_availability_domains ? local.validators_msg_map[local.lb_availability_domains_required_msg] : null
5155

52-
invalid_lb_availability_domain_indexes = !var.use_regional_subnet && local.add_new_load_balancer && var.lb_availability_domain_name1 != "" && (var.lb_availability_domain_name1 == var.lb_availability_domain_name2)
56+
invalid_lb_availability_domain_indexes = !var.use_regional_subnet && var.use_existing_subnets && local.add_new_load_balancer && var.lb_availability_domain_name1 != "" && (var.lb_availability_domain_name1 == var.lb_availability_domain_name2)
5357
lb_availability_domain_indexes_msg = "WLSC-ERROR: The value for lb_subnet_1_availability_domain_name=[${var.lb_availability_domain_name1}] and lb_subnet_2_availability_domain_name=[${var.lb_availability_domain_name2}] cannot be same."
5458
validate_lb_availability_domain_indexes = local.invalid_lb_availability_domain_indexes ? local.validators_msg_map[local.lb_availability_domain_indexes_msg] : null
5559
}

terraform/schema.yaml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022, Oracle and/or its affiliates.
1+
# Copyright (c) 2022, 2023, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl.
33

44
title: Oracle WebLogic Server for Oracle Cloud Infrastructure
@@ -1653,12 +1653,21 @@ variables:
16531653
and:
16541654
- ${orm_create_mode}
16551655
- ${add_JRF}
1656-
- and:
1657-
- ${create_policies}
1658-
- or:
1659-
- ${create_new_vcn}
1660-
- not:
1661-
- ${use_oci_db_connection_string}
1656+
- ${create_policies}
1657+
- or:
1658+
- and:
1659+
- eq:
1660+
- ${db_strategy}
1661+
- "Database System"
1662+
- or:
1663+
- ${create_new_vcn}
1664+
- not:
1665+
- ${use_oci_db_connection_string}
1666+
- and:
1667+
- eq:
1668+
- ${db_strategy}
1669+
- "Autonomous Transaction Processing Database"
1670+
- ${atp_db_uses_private_endpoint}
16621671
type: boolean
16631672
default: true
16641673
title: Create Database Security List

0 commit comments

Comments
 (0)