diff options
author | shuai chen <chenshuai@huawei.com> | 2015-11-16 15:43:26 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2015-11-16 15:43:26 +0000 |
commit | c3eb0aa24e4c4697f446f69b86a9cb159734e5f2 (patch) | |
tree | 1cb47bdd2f5b7788092213a08ac7319a99df2898 /build/templates/RedHat_kilo.tmpl | |
parent | a8aa85f2a26256938b0057802ac5521edb594791 (diff) | |
parent | cb5ae68b968f28c1cedee3720ff14cf5fa1ab92c (diff) |
Merge "suport installing openstack kilo on centos 7"
Diffstat (limited to 'build/templates/RedHat_kilo.tmpl')
-rw-r--r-- | build/templates/RedHat_kilo.tmpl | 100 |
1 files changed, 100 insertions, 0 deletions
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 |