Automation tips for Database change deployment

Source: Internet
Author: User
Tags version control system

A rapidly changing World: Agile & DevOps

Because business requirements are the main drivers of change, do less, but do better and deliver faster, which is the difference between a leading enterprise and a successful enterprise and other enterprises.

When competitors deliver related features faster than you, quality is better than you, then you end up losing market share. Making up for the lack of products by investing in sales and marketing campaigns can be costly and unreliable, and you may find that customers are turning to quality products.

That's why agile development happens: it needs to act faster to respond to changing needs (because our target market and competitor will never be static), the best quality to be trusted, and the lack of regular resources. Agile comes from the expectations of technology companies and IT departments.

Naturally, the next step is to find a way to apply agile to production: connectivity development and operations. This creates a "DevOps".

The main goal of operations is to ensure the stability and health of applications, while the primary goal of development is to innovate continuously and provide applications that meet business and customer needs. Understanding these two points is the key to DevOps development. Since change is the most stable enemy there is no doubt, then understanding and reconciling such conflicts should be the main objective of DevOps.

To effectively master Agile sprint deployments and implement DevOps, people need to be able to implement deployment automation. Otherwise, deployment and publishing require manual steps and procedures that do not always accurately repeat, are prone to human error, and are not handled at a high frequency.

Processing database deployments is not simple; unlike other software components and code or compiled code, the database is not a collection of files. That is not something that can be copied from the development environment to the test environment and then replicated to the production environment, because the database is a container that contains our most valuable and necessary asset-business data. It preserves all due process content, customer transaction processing, and so on. To facilitate database changes, you need to develop migration code-scripts for handling database schema structures (table structures), database code (procedures, functions, and so on), and content used by applications (metadata tables, lookup table, or parameter tables).

Challenges of the database change deployment process

One way to respond to database challenges is to force database changes to follow a generic process: Creating scripts for database objects and then storing them in a traditional version control system.

That poses other challenges, including:

Because it is two separate systems, there is no association between the scripts in the version control system and the database objects they represent. Database code writing and testing are done on the database side, out of any best coding practices (check in, check out, tags, etc.), easy to "old times" all the problems, such as:

Code coverage is common in the database because nothing can prevent it from happening.

Before running the code on the database, get the script from the version control system and prevent it from working on the wrong version, but there is no enforcement to ensure that.

The path of the script in the version control system may be wrong because the developer relies on memory to do it.

Updates outside the process are ignored and so on.

Scripts are written manually, prone to perceived errors, grammatical errors, and so on.

In order to have everything that might be needed in the future, developers had to save two to three scripts for each object: the object's actual code, the upgrade script, and the rollback script.

Scripts are hard to test overall. One person updates an object individually, and another individual updates another object, and if the script needs to run in a particular order, then running in any order will usually result in an error due to an incorrect dependency.

If a script is developed as a separate script that represents the entire update rather than a single change, it can handle dependencies, but it will be much more difficult to process the project scope changes. That's a long list of commands.

Unless you are very experienced, these scripts will lack the changes that occurred in the target environment from the time you wrote to the runtime, may overwrite hot patches in your production environment, or run parallel operations with another team.

Content change management is very difficult. In fact, the version control system does not fit the metadata or find content. In most cases, they are not managed at all.

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.