About Testing the Infrastructure Setup

To verify that your infrastructure components have been set up appropriately, use the Oracle Cloud Infrastructure Console to view the components that have been created. You can also use SSH to connect to the bastion hosts, which are created in public subnets.

Viewing all the components in your compartment using the Oracle Cloud Infrastructure Console allows you to verify that components have been created in the appropriate subnets and Availability Domains. You can also view details of each component, including the IP addresses of instances, ingress and egress security rules, and so on.

Connecting to the bastion hosts using SSH verifies that your SSH keys have been generated and used correctly and that the bastion hosts are set up to be accessible with SSH over the public internet.

Verify that Infrastructure Components Are Created

Use the Oracle Cloud Infrastructure Console to view the components that were created. You can also view detailed information about each of the components.

  1. Sign in to the Oracle Cloud Infrastructure Console.
  2. Click Networking and then click Virtual Cloud Networks to view the VCN in your compartment.
  3. Click the VCN to view other networking components including subnets, route tables, security lists, the service gateway, and load balancers.
  4. Click Compute and then click Instances to view the instances in your compartment.
  5. Click any instance to view details including the subnet, public and/or private IP addresses, and the boot volumes associated with the instance.
  6. Under Database, click Bare Metal, VM, and Exadata to view the DB Systems in your compartment.
  7. Click any DB System to view details including its nodes, databases, edition, storage, IP address and so on.
  8. Click File Storage to view the file systems in your compartment.
  9. Click any file system to view its mount target.

Verify the SSH Connection to the Bastion Host

To verify that your SSH keys have been generated used appropriately and that the security lists have been set up correctly to enable SSH access, verify that you can connect to the bastion hosts from your local system using SSH.

  1. Find out the public IP address of the bastion host that you want to connect to. The terraform apply command shows the public IP address of the bastion host in the success message. If you didn’t make a note of the public IP address of the bastion hosts when this command completed, you can view the bastions hosts in the Oracle Cloud Infrastructure Console to find out the public IP address.
  2. If your local system is a Linux or UNIX-like system, navigate to the directory where you saved your SSH key pair and enter: ssh -i ./<private_key_name> opc@<public_ip_address_of_bastion_host>
    You’ll be prompted to confirm that you want to connect to this host. Enter yes. The IP address is added to the list of known hosts and a secure connection is established.
  3. If your local system is a Windows system:
    1. Start PuTTY.
    2. In Host Name (or IP address) field, enter the public IP address of your instance.
    3. Confirm that the Connection type option is set to SSH.
    4. In the Category tree, expand Connection and then click Data.
    5. In the Auto-login username field, enter opc.
    6. In the Category tree, expand SSH and then click Auth.
    7. Click the Browse button next to Private key file for authentication. Select the SSH private key that you generated earlier.
    8. In the Category tree, click Session.
    9. Click Open to open the connection.
      You’ll be prompted to confirm the public key. Click Yes.. A secure connection to the bastion host is established.
  4. If multiple bastion hosts are created, you can repeat these steps to confirm that you can connect to the other bastion hosts as well.