Set the OpenStack operating system environment to support DB2

Source: Internet
Author: User
Tags ibm db2
OpenStack is a cloud operating system that controls a large pool of computing, storage, and network resources in the entire data center. All resources are managed through a dashboard, which gives administrators control and allows users to prepare resources through the Web interface.

OpenStack is a cloud operating system that controls a large pool of computing, storage, and network resources in the entire data center. All resources are managed through a dashboard, which gives administrators control and allows users to prepare resources through the Web interface.

OpenStack supports MySQL, SQLite, and PostgreSQL by default. In this article, the author shows how to quickly enable OpenStack to support DB2®.

OpenStack is an excellent cloud operating system. It is wise for developers, administrators, and operators to possess skills related to it in their own virtual toolkit. An efficient cloud requires an efficient database and can accept multiple databases. However, if you want®What should I do if DB2 is used for OpenStack? OpenStack does not support DB2 by default.

This short exercise shows how to implement DB2 support in the OpenStack environment. The six steps involved include:

  1. Collect materials before you start.
  2. Install the database access package.
  3. Add additional support for DB2.
  4. Use OpenStack scripts.
  5. Configure OpenStack for DB2.
  6. Run OpenStack and DB2.

Let's get started.

Step 2: collect materials before start

OpenStack is built on other packages in Python 2.7 and Ubuntu 11.10 (64-bit Environment version. IBM DB2 is the target database you want to support. Before you begin, you need the following elements:

  • A physical machine.
  • An operating system, such as Ubuntu 11.10 or later, should be a 64-bit operating system.
  • A programming language, such as Python 2.7 +. For Python, run the following command after the system is ready:
    sudo apt-get install python-software-propertiessudo apt-get update, sudo apt-get install python-dev libaio-devInstall pip: sudo apt-get install python-pipInstall ez_setup: sudo pip install ez_setup
  • We recommend that you use DB2 Version 9.7 or later.

Step 2: Install the database access package

SQLAlchemy is a Python SQL Toolkit and object relation er. It supports SQL for Python application developers through an enterprise-level persistent mode suite designed for efficient and high-performance database access. SQLAlchemy tries to treat a database like a relational algebra engine, instead of a table set, to adapt to the two sizes and performance principles and abstract principles.

The object relation tor in SQLAlchemy (ing classes to databases in unlimited ways) supports the development of object models and database models in a completely decoupled manner.

SQLAlchemy-migrate is a mode migration tool. It provides a way to handle database schema changes in the SQLAlchemy project, and a database change repository mechanism that can be used on command lines, it can also be used in Python code.

  1. SQLAlchemy. Use sudo pip install SQLAlchemy = 0.7.2 (or any version you select) to install the SDK.
  2. Download SQLAlchemy-migrate. Because DB2 is not supported, install the patch db2.patch for DB2. Save the patch in the root folder of SQLAlchemy-migrate and run the command-p1 <db2.patch. Next, install SQLAlchemy-migrate.

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.