diff options
Diffstat (limited to 'build')
-rw-r--r-- | build/build.conf | 7 | ||||
-rwxr-xr-x | build/make_repo.sh | 4 | ||||
-rw-r--r-- | build/os/centos/rhel7/kilo/Dockerfile.tmpl | 27 | ||||
-rw-r--r-- | build/templates/RedHat_kilo.tmpl | 100 |
4 files changed, 136 insertions, 2 deletions
diff --git a/build/build.conf b/build/build.conf index c6f0bdef..2f2025c3 100644 --- a/build/build.conf +++ b/build/build.conf @@ -6,10 +6,11 @@ export CENTOS_BASE=${CENTOS_BASE:-$PACKAGE_URL/centos_base.iso} export COMPASS_CORE=${COMPASS_CORE:-http://github.com/baigk/compass-core.git} export COMPASS_WEB=${COMPASS_WEB:-http://github.com/baigk/compass-web.git} export COMPASS_INSTALL=${COMPASS_INSTALL:-http://github.com/baigk/compass-install.git} -export TRUSTY_JUNO_PPA=${TRUSTY_JUNO_PPA:-$PACKAGE_URL/trusty-juno-ppa.tar.gz} export UBUNTU_ISO=${UBUNTU_ISO:-$PACKAGE_URL/ubuntu-14.04.3-server-amd64.iso} +export TRUSTY_JUNO_PPA=${TRUSTY_JUNO_PPA:-$PACKAGE_URL/trusty-juno-ppa.tar.gz} export CENTOS_ISO=${CENTOS_ISO:-$PACKAGE_URL/CentOS-7-x86_64-Minimal-1503-01.iso} export CENTOS7_JUNO_PPA=${CENTOS7_JUNO_PPA:-$PACKAGE_URL/centos7-juno-ppa.tar.gz} +#export CENTOS7_KILO_PPA=${CENTOS7_KILO_PPA:-$PACKAGE_URL/centos7-kilo-ppa.tar.gz} export COMPASS_PKG=${COMPASS_PKG:-$PACKAGE_URL/centos6-package.tar.gz} export LOADERS=${LOADERS:-$PACKAGE_URL/loaders.tar.gz} export CIRROS=${CIRROS:-$PACKAGE_URL/cirros-0.3.3-x86_64-disk.img} @@ -71,4 +72,6 @@ export PIP_CONF="https://bootstrap.pypa.io/ez_setup.py \ https://pypi.python.org/packages/source/o/ordereddict/ordereddict-1.0.tar.gz \ https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz \ https://pypi.python.org/packages/source/l/lazypy/lazypy-0.5.tar.gz \ - https://pypi.python.org/packages/source/p/pycrypto-on-pypi/pycrypto-on-pypi-2.3.tar.gz" + https://pypi.python.org/packages/source/p/pycrypto-on-pypi/pycrypto-on-pypi-2.3.tar.gz \ + https://pypi.python.org/packages/2.6/p/pymongo/pymongo-3.0.3-cp26-none-macosx_10_10_intel.whl \ + https://pypi.python.org/packages/source/c/crudini/crudini-0.7.tar.gz" diff --git a/build/make_repo.sh b/build/make_repo.sh index 7ed4c249..61c40aef 100755 --- a/build/make_repo.sh +++ b/build/make_repo.sh @@ -197,6 +197,10 @@ function make_all_repo() make_repo --os-ver rhel7 --package-tag juno \ --ansible-dir $WORK_PATH/deploy/adapters/ansible \ --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server dracut-config-rescue-033-241.el7_1.3 dracut-network-033-241.el7_1.3" + + make_repo --os-ver rhel7 --package-tag kilo \ + --ansible-dir $WORK_PATH/deploy/adapters/ansible \ + --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server dracut-config-rescue-033-241.el7_1.5 dracut-network-033-241.el7_1.5" } function main() diff --git a/build/os/centos/rhel7/kilo/Dockerfile.tmpl b/build/os/centos/rhel7/kilo/Dockerfile.tmpl new file mode 100644 index 00000000..34945d00 --- /dev/null +++ b/build/os/centos/rhel7/kilo/Dockerfile.tmpl @@ -0,0 +1,27 @@ +FROM centos:7.1.1503 +MAINTAINER Chigang(Justin) <chigang@huawei.com> + +# set cache enable +RUN sed -i 's/keepcache=0/keepcache=1/g' /etc/yum.conf +#set packages = $getVar('spcial_packages', []) +#for package in $packages +ADD ./RedHat/packages/$package /var/cache/yum/x86_64/7/base/packages/ +#end for +#set scripts = $getVar('scripts', []) +#for script in $scripts +ADD ./RedHat/script/$script /tmp/chigang/$script +RUN chmod +x /tmp/chigang/$script +RUN /tmp/chigang/$script +#end for +ADD ./comps.xml / +ADD ./ceph_key_release.asc / +ADD ./install_packages.sh /tmp/chigang/install_packages.sh +RUN chmod +x /tmp/chigang/install_packages.sh +RUN /tmp/chigang/install_packages.sh + +ADD ./cp_repo.sh /tmp/chigang/cp_repo.sh +RUN chmod +x /tmp/chigang/cp_repo.sh +RUN mkdir /result + +CMD ["/tmp/chigang/cp_repo.sh"] +#VOLUME /tmp/chigang diff --git a/build/templates/RedHat_kilo.tmpl b/build/templates/RedHat_kilo.tmpl new file mode 100644 index 00000000..3d587250 --- /dev/null +++ b/build/templates/RedHat_kilo.tmpl @@ -0,0 +1,100 @@ +#!/bin/bash +set -x + +yum remove systemd -y +# add 163 repo +yum install wget -y +wget -O /epel-release-7-5.noarch.rpm http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm +yum remove wget iptables-services -y +yum update -y +#rm -f /etc/yum.repos.d/CentOS-*.repo +yum repolist +yum clean all +# add openstack kilo repo +yum install yum-plugin-priorities -y +yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm -y +yum install http://rdo.fedorapeople.org/openstack-kilo/rdo-release-kilo.rpm -y + +# modify centos7 repo for workaround +sed -i 's/epel-Derived from Red Hat Enterprise Linux 7.1 (Source)/epel-7/g' /etc/yum.repos.d/rdo-release.repo + +# add galeracluster repo +cat <<EOF >/etc/yum.repos.d/MariaDB.repo +[mariadb] +name =MariaDB +baseurl = http://yum.mariadb.org/5.5/centos7-amd64 +gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB +gpgcheck=1 +EOF + +cat <<EOF >/etc/yum.repos.d/syslog.repo +[rsyslog_v7] +name=rsyslog +baseurl="http://rpms.adiscon.com/v7-stable/epel-7/x86_64" +enabled=1 +gpgcheck=0 +gpgkey=http://rpms.adiscon.com/RPM-GPG-KEY-Adiscon +protect=1 +EOF + +cat <<EOF >/etc/yum.repos.d/ceph.repo +[ceph] +name=Ceph packages for x86_64 +baseurl=http://ceph.com/rpm-hammer/rhel7/x86_64 +enabled=1 +priority=2 +gpgcheck=1 +type=rpm-md +gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc + +[ceph-noarch] +name=Ceph noarch packages +baseurl=http://ceph.com/rpm-hammer/rhel7/noarch +enabled=1 +priority=2 +gpgcheck=1 +type=rpm-md +gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc +EOF + +cat <<EOF >/etc/yum.repos.d/mongo.repo +[10gen] +name=10gen Repository +baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64 +gpgcheck=0 +EOF + +yum update -y +yum install createrepo -y +yum install tar -y + +#download packages +#set packages = $getVar('default_packages', []) +#for pkg in $packages +yum -y install $pkg --downloadonly +#end for +#set packages = $getVar('packages', []) +#for pkg in $packages +yum -y install $pkg --downloadonly +#end for + +#make repo + +mkdir -p /centos7-kilo-ppa/{Packages,repodata} + +find /var/cache/yum/ -name "*.rpm" | xargs -i cp {} /centos7-kilo-ppa/Packages/ + +rm /centos7-kilo-ppa/Packages/selinux-policy* -f +rm /centos7-kilo-ppa/Packages/systemd* -f +rm /centos7-kilo-ppa/Packages/openssl-1.0.1e-42.el7.9.x86_64.rpm +rm /centos7-kilo-ppa/Packages/libnl3-3.2.21-9.el7_1.x86_64.rpm + +mv /epel-release-7-5.noarch.rpm /centos7-kilo-ppa/Packages/ +cp /comps.xml /centos7-kilo-ppa/ +cp /ceph_key_release.asc /centos7-kilo-ppa/ +createrepo -g comps.xml /centos7-kilo-ppa +mkdir /centos7-kilo-ppa/noarch +mkdir /centos7-kilo-ppa/noarch/Packages +cp -r /centos7-kilo-ppa/Packages/ceph* /centos7-kilo-ppa/noarch/Packages/ +cp -r /centos7-kilo-ppa/repodata/ /centos7-kilo-ppa/noarch/ +tar -zcvf /centos7-kilo-ppa.tar.gz /centos7-kilo-ppa |