Get Started with Bitnami Multi-Tier Solutions on Oracle Jump Start Launch
Oracle Cloud Infrastructure offers a collection of cloud services designed to manage applications, services, and databases, in a high-performance cloud computing environment. Its architecture provides the flexibility to scale. In addition to this, Oracle Cloud Infrastructure offers the highly durable storage of public cloud combined with the security, control access, and cost-effectiveness of on-premise infrastructure.
If you’re looking to deploy Multi-Tier or clustered applications in the Oracle cloud, the easiest way to get started is with Bitnami. Bitnami provides ready-to-use Oracle Cloud Jump Start Launch reference deployments, so you can get productive with your new server immediately.
This tutorial walks you through the process of deploying Bitnami’s MySQL with Replication solution as an Oracle Jump Start Launch deployment. You can also find other Oracle Cloud Jump Start Launch reference deployments.
TIP: To learn more about launching servers on Oracle Cloud Infrastructure with Terraform, refer to this tutorial.
MySQL is a fast, reliable, scalable, and easy-to-use open-source relational database system. It also comes with full replication support, allowing you to automatically mirror data across multiple nodes to avoid critical data loss. Bitnami offers a ready-to-use MySQL with Replication cluster that follows current best practices for security and scalability, thereby ensuring that it’s ready for immediate production use.
In this guide, I’ll walk you, step by step, through the process of provisioning Bitnami’s MySQL with Replication solution on Oracle Cloud Jump Start Launch. Here are the steps you’ll complete in this tutorial:
NOTE: This guide assumes that you have an Oracle Cloud Infrastructure account and an Oracle Jump Start Learning Labs account. If you don’t have an Oracle Cloud Infrastructure account, register for one here. If you don’t have an Oracle Jump Start Learning Labs account, register for one here.
Step 1: Configure a MySQL with Replication solution
- At the end of this step, you will have configured and deployed MySQL with Replication on Oracle Jump Start.
In a MySQL replication cluster, copies of the MySQL data are maintained on separate server nodes. Spreading the data across multiple nodes significantly reduces the risk of application failure and data loss in the event of a hardware failure.
To launch the MySQL with Replication solution on Oracle Jump Start, follow these steps:
- Log in to Oracle Jump Start Learning Labs and navigate to the MySQL with Replication solution.
Click the “Deploy now” button on the solution page. This will launch the Deployment Console, a multi-page wizard that guides you through the deployment process.
On the “Plan & Pricing” page, select a plan. Click “Next” to proceed.
On the “Deployment Details” page:
- Enter a name and brief description for your deployment. Limit the length of the name to 15 characters.
- Modify the instance type, region, volume size in GB, and number of nodes if required.
- Enter the fingerprint for your SSH public key. This key will be automatically added to all the nodes of the cluster, so that you can log in to them using SSH.
- Click “Next” once done.
On the “Link Cloud Account” page, select your Oracle Cloud account. Click “Next” to proceed.
On the “Review” page, review the details shown and click “Deploy” to proceed.
The system will generate a Terraform plan. This may take a few minutes. Once complete, the deployment plan will be displayed for your review.
Click “Confirm and Apply” to proceed with the deployment.
Deployment may take up to 10 minutes. Once complete, you should see an output message containing both the application password and the public IP addresses of the master and slave nodes nodes in the MySQL cluster, as shown below. Make a note of these values, as you will need them in the next step.
Step 2: Connect and create a MySQL database
- At the end of this step, you will have connected to the MySQL with Replication cluster and created a new database.
By default, the nodes of the cluster are configured with the public part of the SSH key pair specified at deployment time. You should now be able to use any third-party SSH client and the corresponding private SSH key to log in to the master node as the bitnami user.
At the master node console, connect to MySQL using a command like the one below. Enter the password from the previous step when prompted.
$ mysql -h localhost -u root -p
This should launch the MySQL command-line interface (CLI).
To check that everything is working correctly, run the queries shown below:
mysql> SHOW SLAVE HOSTS\G mysql> SHOW PROCESSLIST\G
These queries will provide information on connected slaves and the status of the replication process. If you see output similar to the image below, your cluster is good to go!
Proceed to create and populate an example database using the MySQL CLI using the commands shown below. Note that this example creates a database name mydb and a user named myuser with password mypassword. Replace these example values with values suitable for your intended use when executing the commands below.
mysql> CREATE DATABASE mydb; mysql> USE mydb; mysql> CREATE TABLE test (id int not null, val varchar(255) not null); mysql> INSERT INTO test VALUES (1, 'foo'), (2, 'bar'); mysql> GRANT ALL ON mydb.* TO 'myuser'@'localhost' IDENTIFIED BY 'mypassword'; mysql> exit
Check that data is being correctly replicated by connecting to any of the slave nodes using SSH. Launch the MySQL CLI with the example user, password and database name created above and run the queries shown.
$ mysql -h localhost -u myuser -p ... mysql> SHOW DATABASES; mysql> SELECT * FROM mydb.test;
You should see that the data created on the master node is also present on the slave node.
You can now begin using the cluster with your application(s).
To learn more about the topics discussed in this tutorial, see the links below: