Step-by-step with me to learn the entry level of model design: designing a MySQL Model

Source: Internet
Author: User
Tags docker hub

Welcome to the linker Networks (www.linkernetworks.com) Quintiq, a hybrid cloud platform based on Mesos Docker.

http://marketplace.linkernetworks.com/

In this section, we design the model without considering any application relationships, starting with an atom application.

Let's design a basic MySQL model.

For the sake of simplicity, we won't consider the process of compiling a Docker image from Dockerfile, but starting with an existing image.

First step: Find a Docker Image on the Docker hub

Let's go to the Docker hub and find an existing Docker image.

Search for MySQL on https://hub.docker.com/

Can search out a lot of results

Among these numerous results, choose the official version

Click Details to view more information

Read on to see how you can start a docker from this Docker image.

The focus is

Mysql_root_password

This variable are mandatory and specifies the password that would be set for the MySQL root superuser account. In the above example, it is set to MY-SECRET-PW.

Mysql_database

This variable are optional and allows you to specify the name of a database to being created on image startup. If a User/password is supplied (see below) then that user would be is granted Superuser access (corresponding to GRANT all) t o This database.

The-v/my/own/datadir:/var/lib/mysql part of the command Mounts The/my/own/datadir directory from the underlying host Sy Stem as/var/lib/mysql inside the container, where MySQL by default would write its data files.

Step two: Create an app model

Register and Login Www.linkermarket.com

Click Work Area

Click the application model in the Model designer

Click the plus sign to create a new app model.

Fill in the basic information

App name Add MYSQL1

Memory Settings 1024

Docker Image Select Docker hub image, fill in MySQL

Next, fill in the Docker parameters

The docker parameter is the environment variable

Click the plus sign to add an environment variable.

Add the required environment variables that you see on the Docker hub website above.

The front tick indicates that these variables are allowed to be modified at run time, because neither the password nor the database should be dead, but each user is set to create a database docker.

Next, fill in the disk parameters

Click the plus sign on the back of the disk to add an external volume, so that the data is not lost when Docker is in trouble, and the data is still available when you restart Docker.

Fill in the disk as required on the Docker Hub's official website

Select the exposed port so that the service can be accessed through the port mapping of the extranet IP.

Click Save App

Part III: Creating a service model

Click the service model

Click the plus sign on the right to create a service model.

Take a name for the service model MYSQL1

Save the service model.

Find the service model that begins with your alias, with the service model suffix.

Click Open this service model to start editing

Right click on the icon and Pop right button "Add dependent app Group"

Once clicked, give the dependent application Group a name

Press ENTER to appear with a dashed box

On the right side of the service details, click on the available app model

In the visible application model, find the MYSQL1 you just designed.

Drag the model into the dashed box

Fourth Step: Submit Service Pending approval

Click Submit Service in the lower right corner to wait for approval

Click Submit

Popup dialog box

Fill out a description click Publish.

Once published, the icon for this service model becomes

This time wait for the system administrator to audit, audit through the model icon to become

Fourth step: Order this model in the market

At this time, your model has been developed in the market, in the market to find your model, click to order

Click to Order Now

Fill in the runtime parameters and click order

View ordered Services

This time page to the Order service page, click to open the ordered service

This time you can see the running MySQL, if the box is green, indicating the success of the order

Mouse click Mysql1, will pop up more information

Accessing the database requires an extranet IP and address

Find a command line that has a database client

Look at the database can be connected, HelloWorld database is also created.

Step-by-step with me to learn the entry level of model design: designing a MySQL Model

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.