Deploy the Cloud Topology
When deploying the cloud topology for this method of database migration, the database version must be the same as the source database and the patch version should be the same (or higher) than the source database.
Gather the Information Needed to Provision the Topology
Before configuring the Terraform modules, it's a good idea to gather the information that you'll need to provision the standby database.
terraform.tfvars
file to create the bastion database
architecture:
- CIDR block of the Primary VCN
- DNS label of the VCN
- Compute shape for the bastion server
- Database System display name
- Database name
- Compute shape for the database server
- DB admin password for the database
- Path to the public SSH key to set as the authorized key on the bastion host
- Path to private SSH key to access the bastion host
Deploy the VM Database and Bastion Topology
The Terraform code to deploy the target cloud topology is available on GitHub. You can use the code to provision the required networking resources, a compute instance for the bastion server, and a virtual machine database system.
- Go to GitHub.
- Download the code to your local computer.
- Complete the prerequisite steps in the
README
. - Apply the configuration using the Terraform CLI.
Create the Resources
After you set the variables in terraform.tfvars
file, use the Terraform CLI to deploy the resources defined in the Terraform configuration.
Terraform stores state information to track your managed infrastructure resources, map the deployed resources to your configuration, track metadata, and improve performance for large infrastructure deployments.
By default, the terraform.tfstate
file is stored on the
local host. This default behavior is not optimal in IT environments where multiple
users need to create and destroy the resources that are defined in a given
configuration. To control deploying and managing resources in a multi-user
environment, store the Terraform state files in Oracle Cloud
Infrastructure Object Storage, and share the state files and lock files between all the users.