Create a Virtual Cloud Network and Allow Traffic Through MySQL Database Service Port

Welcome to the first step of our workshop on “Automated Machine Learning from Your Database System with MySQL HeatWave Cloud Service”. In this section, we’ll guide you through the process of creating a Virtual Cloud Network (VCN) in your cloud environment and configuring it to allow traffic through the MySQL Database Service port.

Objectives

By the end of this guide, you will have:

Prerequisites

Understanding Key Concepts

Before diving into the setup process, let’s clarify some essential networking concepts you’ll be working with:

VCN Architecture

Virtual Cloud Network (VCN)

What is it? A VCN is a customizable and private network in the cloud. It’s similar to a traditional network that you’d operate in your own data center, but with the benefits of scalable cloud infrastructure. You have complete control over your virtual networking environment, including your own private IP address range, subnet creation, route tables, and network gateways.

Why is it important? Creating a VCN is one of the first steps in setting up cloud-based resources. It provides a secure environment where your cloud resources such as VMs, databases, and applications can run safely and communicate with each other.

Security Lists

What are they? Security lists act as virtual firewalls for your VCN, with rules that specify the types of traffic (ingress and egress) allowed in and out of the resources connected to the subnets. Each rule is stateful, meaning return traffic automatically matches regardless of the rule’s egress or ingress designation.

Why use them? They are essential for controlling access to your resources, ensuring that only permitted traffic can enter or leave your network, thereby enhancing the security of your cloud environment.

Ingress Rules

What are they? These are rules within your security list that control incoming traffic to your subnet, allowing you to specify accessible ports, source IP ranges, and protocols.

Why are they important? Ingress rules are crucial for enabling external clients or applications to interact with your cloud services, such as accessing your MySQL database.

CIDR Notation

What is it? Classless Inter-Domain Routing (CIDR) notation is a method for specifying IP addresses and their associated routing prefix. It’s a compact representation of an IP address and its associated network mask.

Why is it used? CIDR notation is used to define the range of IP addresses that can access a particular resource, allowing you to control network traffic precisely.

Subnet

What is it? A subnet is a subdivision of a VCN. It represents a range of IP addresses that can be allocated to cloud resources, such as VMs and databases. Subnets allow you to segment your VCN and allocate IP addresses in a way that aligns with your network design and security requirements.

Why is it used? They enable you to distribute your cloud resources across different logical segments within a VCN, often to enhance security, improve network efficiency, or comply with regulatory requirements. Each subnet can have its own route table, security list, and network security group, providing a way to apply fine-grained access control and traffic routing rules.

More information about OCI Networking can be found in the documentation.

Step 1: Access the Virtual Cloud Network Section

Step 2: Create a New Virtual Cloud Network (VCN) using VCN Wizard

The OCI VCN Wizard is a tool provided by Oracle to simplify the process of setting up and configuring a Virtual Cloud Network in their cloud environment. This wizard is particularly beneficial for users who may not be deeply familiar with networking concepts or those who wish to streamline the network creation process.

The wizard offers several pre-configured templates that match to different use cases or deployment scenarios. These templates might include configurations for:

By selecting one of these templates, users can quickly set up a VCN that matches their application’s architectural requirements, ensuring that the network is configured correctly and securely.

By selecting the VCN with Internet Connectivity, the OCI VCN Wizard automates the setup of several resources within your cloud environment:

Workshop logo

Step 3: Configure the Security List to Allow MySQL Traffic

The public subnet needs to be configured to allow traffic on the MySQL default port (3306 TCP) so that applications and services, possibly running in other parts of your cloud environment or on the internet, can communicate with your MySQL Database Service.

This involves adjusting the security lists associated with the subnet to include rules that permit inbound traffic on the MySQL port (3306).

Add the following Ingress Rule:

This rule will allow inbound connections on port 3306, which is used by MySQL.

Step 4: Verify Your Configuration

Ensure that the VCN, subnets, internet gateway, and route tables are correctly configured. Double-check the security list rules to ensure that port 3306 is allowed.

Conclusion

You have successfully created a Virtual Cloud Network and configured it to allow traffic through the MySQL Database Service port. This setup is crucial for ensuring that your MySQL HeatWave instances can communicate securely within your cloud environment.

Please proceed to the next section of the workshop once you have completed these steps.

The next step of our workshop will focus on creating a database system within the MySQL HeatWave Service and attaching a HeatWave cluster to this database system, enabling us to leverage the full power of HeatWave’s analytics and machine learning capabilities.

Lab 2: Create MySQL Database System