Build Opsmanage platform Today the final step opsmanage build
We build 2 images containers in front of us: the first Redis second mariadb
Let's start with the first one. The second mariadb on the 200 host:
New DB Directory
mkdir/data/opsmanages_db
Mount to container and start mariadb and Redis into mariadb create a user and a DB database
This time we are on a different host:
Build a images called PYTHON-OPSMAGES:BASE-V1 basic images or we have to Docker.io/centos #主要安装python-django Basic support RPM package such as: GCC makezlib zlib-devel readline-devel sqlite-devel ........还有我们得python模块 pip install **模块包
Construct the project with PYTHON-OPSMAGES:BASE-V1 as the base package images actually to this second images we can move it without building a direct project package. Set up Redis and mariadb to run this Opsmanag E.
Mkdir/proect-opsmanage-dokcerfile #下面就两个文件 a dockerfile and a directory to hold Easy_install and Pip tar packages and a list of Python modules that must be in one of the items
Look at the dockerfile.
#指定基础镜像: docker.io/centosfrom docker.io/centos#set epel-relaserun Yum Install wget-y RUN wget Http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmRUN RPM-IVH epel-release-latest-7.noarch.rpm RUN rm-rf./epel-release-latest-7.noarch.rpm && Yum Clean all # install python- Base-rpmrun Yum install zlib zlib-devel make Readline-devel sqlite-devel bzip2-devel openssl-devel gdbm-devel libdbi-deve L ncurses-libs kernel-devel libxslt-devel libffi-devel python-devel mysql-devel zlib-devel mysql-server wget git sshpass Gcc-y#install setuptoolsadd./pybase_rpm/setuptools-28.0.0.tar.gz/mntrun cd/mnt/setuptools-28.0.0 && python setup.py install#install pipadd./pybase_rpm/pip-1.5.5.tar.gz/mntrun cd/mnt/pip-1.5.5 && python setup.py insta Ll#install python2.7_pip*base****copy./pybase_rpm/requirements.txt/mnt RUN pip Install-r/mnt/requirements.txt-i htt P://pypi.douban.com/simplecmd ["Bin/bash"]
Docker builds an open source CMDB platform step three: building a CMDB platform Opsmanage