Skip to content

Add support for multi-node Data Guard deployments #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jul 17, 2025

Conversation

AlexBasinov
Copy link
Collaborator

@AlexBasinov AlexBasinov commented Jun 24, 2025

Adds support for deploying multi-node Oracle Data Guard configurations on GCE using Terraform.

For multi-instance setups, users provide zone1, zone2, subnetwork1 and subnetwork2. region, zone and network input variables have been removed from variables.tf.

Replaced the use of the terraform-google-modules/vm/google modules with native resources google_compute_instance_template and google_compute_instance_from_template to avoid hardcoded suffixes like -001/-002. Single-instance VMs use var.instance_name directly, and multi-node VMs get -1 and -2 suffixes.

Continue using instance templates to retain automatic disk name generation and support for the existing local.additional_disks structure.

Common flags used by oracle-install.sh are now constructed in Terraform and passed to startup.sh to keep them consistent across both single- and multi-instance deployments.

log from multi-instance deployment

@AlexBasinov
Copy link
Collaborator Author

The most recent log from the startup script for the two-node Data Guard deployment: https://gist.github.com/AlexBasinov/88ad361702086f2622d376a21aca7512

zone = var.zone

zone = var.zone1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing spaces

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I marked this as resolved too soon. I just wanted to add some visual separation between the scheduling {} block and the basic parameter settings.

@AlexBasinov
Copy link
Collaborator Author

Addressed comments. Test run is in progress. Will share startup script log here when the test run is complete.

@AlexBasinov
Copy link
Collaborator Author

The most recent log from the startup script: https://gist.github.com/AlexBasinov/f7671a5795d4b4dcb1f600a17eb42658

@AlexBasinov AlexBasinov marked this pull request as ready for review July 16, 2025 22:23
@AlexBasinov AlexBasinov requested a review from mfielding July 17, 2025 16:28
Copy link
Member

@mfielding mfielding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@google-oss-prow google-oss-prow bot added the lgtm label Jul 17, 2025
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: AlexBasinov, mfielding

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [AlexBasinov,mfielding]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@AlexBasinov AlexBasinov merged commit 556a479 into google:master Jul 17, 2025
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants