Micro course | lesson 2: introduction to docker installation method
In the last issue, we introduced the basic overview of dble. Now we will go to the main topic. The main topic is basically divided into these four parts.
The structure of the course catalogue
1. Installation demonstration
We’ll introduce two ways to get started quickly. Let us not be familiar with, do not know what the structure, or even the upper level of the structure chart, quickly start.
2. Basic functions
This paper introduces the basic functions of dble Middleware in detail. For example, our most common database addition, deletion, modification and query, including some others, I now do data splitting, how to do the splitting, introduce these.
3. Advanced function
It includes global sequence, and manages some functions of application side.
4. Analysis functionThe analysis function is relatively friendly to operation and maintenance. I want to know how I write SQL and how to check whether my SQL writing is reasonable through the query plan, including how to see a slow SQL, where the bottleneck is reflected in the whole operation, including how my slow log is collected and used.
This is the quick start of docker. Let’s start to deploy such a structure. Let’s leave the application layer behind. The application layer may be a MySQL client client here. One dble, two mysql. How long does it take to build such an environment? Answer: two lines of command.
Premise: docker and docker compose have been installed.
Docker is a great invention, which liberates us from complex problems and focuses on the core work. Let’s first WGet and download the configuration file of my docker compose from GitHub. The file content of docker compose is actually to organize the three nodes in the diagram. You can see a MySQL node and a second MySQL node. Then we have a dble server, which is three servers in total. The docker compose documentation is complete in all aspects. We will expose some ports, including port 33061 of MySQL and 80669066 of dble. After the burst leaks out, as long as you execute a command like compose up, our environment will be set up! Log in to the interactive interface through MySQL client, and then show tables. You can see that I have established many tables. Then we can execute other commands, such as show full tables and some dble custom statements. For example, show all tables. It shows what kind of table this is. Split tables, global tables, or other tables. Look at a table at random. There are four rows of data. This is the end of such a simple installation process. It is very convenient to use docker compose to make a quick running attempt, or I need to quickly build an environment to do some tests. Compared with manual installation of MySQL, the complexity is significantly reduced. With docker, you can skip the complicated front-end problems and do the core problems, which is very good. OK, that’s all for today.
In order to facilitate reading, some spoken words are optimized without affecting learning. The manuscript and the video will be consistent as far as possible.
Dble and related project code address: