The code is intended as an example for automated deployment of two Azure Virtual Machines with Oracle Database Enterprise Edition 19c in a Data Guard configuration using Github Actions. The code is intended to be used as a starting point for your own deployment. The Terraform module for this deployment is located in the terraform/bootstrap/data_guard
directory, and the Ansible playbook is the ansible/bootstrap/oracle/
directory.
Overall if you wish to modify one or more variables in the Terraform module, you can do so by modifying the terraform/bootstrap/data_guard/variables_global.tf
or the terraform/bootstrap/data_guard/variables_local.tf
file.
First, configure your OpenID Connect as described here.
Create a Github Secret in your repo with the name SSH_PRIVATE_KEY, containing the private key you wish to use for the deployment.
To deploy through GitHub actions, please refer to the Data Guard GitHub Terraform workflow and follow the guidance below.
- Modify the following values in Data Guard GitHub Terraform workflow:
- Change AZ_LOCATION: "eastus", to your preferred Azure region
- Change AZ_RG_BASENAME: "Oracle-test", to your preferred resource group name.
- Change VM_PRIMARY_NAME: "vm-primary-0", to your preferred name for the primary node in the data guard configuration.
- Change VM_SECONDARY_NAME: "vm-secondary-0", to your preferred name for the secondary node in the data guard configuration.
- Change ORCL_DB_NAME: "ORCL" to what the database will be named.
- Change _SOFTWARE_RG: "binaryresource" to the resource group where the user assigned identity created to access the storage account with Oracle binaries is placed.
- Change USER_ASSIGNED_IDENTITY: "oraclelza" to the name of the user assigned identity created to access the storage account with Oracle binaries.
- Modify the following values in Ansible variable file:
- Change storage_account: oraclelzabin with the name of the storage account where the Oracle binaries are stored
- Change storage_container: oraclebinaries with the name of the container on the storage account where the Oracle binaries are stored.
- After modifying the values, merge the changes to the main branch of your repo.
- Go to GitHub actions and run the action Deploy an Oracle DB in a Data Guard configuration on Azure with Terraform and Ansible