summaryrefslogtreecommitdiffstats
path: root/repo/openstack/make_ppa/centos/rhel7/newton
diff options
context:
space:
mode:
authorliyuenan <liyuenan@huawei.com>2017-01-14 11:31:08 +0800
committerJustin chi <chigang@huawei.com>2017-01-14 05:48:28 +0000
commit2e33f30a1f0a17692d6d0348248df10b98cfb498 (patch)
tree1f8d3612a4667bf977db5ce5a0cbe0696f06e78b /repo/openstack/make_ppa/centos/rhel7/newton
parent1da2cee07a11d5dd7b83ab0437807fc239929f1c (diff)
Deploy OpenStack Newton on CentOS hosts
JIRA: COMPASS-518 Make Centos Newton ppa. Update host Centos version to 7.3. Support Centos Newton Deploy. Support Ceph Deploy. Change-Id: I6dd110cc10d425a9d590e1dcb5777ade5cce96aa Signed-off-by: liyuenan <liyuenan@huawei.com>
Diffstat (limited to 'repo/openstack/make_ppa/centos/rhel7/newton')
-rw-r--r--repo/openstack/make_ppa/centos/rhel7/newton/download_pkg.tmpl119
1 files changed, 119 insertions, 0 deletions
diff --git a/repo/openstack/make_ppa/centos/rhel7/newton/download_pkg.tmpl b/repo/openstack/make_ppa/centos/rhel7/newton/download_pkg.tmpl
new file mode 100644
index 00000000..cbeb1dc3
--- /dev/null
+++ b/repo/openstack/make_ppa/centos/rhel7/newton/download_pkg.tmpl
@@ -0,0 +1,119 @@
+#!/bin/bash
+set -x
+
+#set OPV="newton"
+
+yum remove systemd -y
+# add 163 repo
+#rm -f /etc/yum.repos.d/CentOS-*.repo
+yum repolist
+yum clean all
+
+yum install yum-plugin-priorities -y
+# yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm -y
+# yum install http://rdo.fedorapeople.org/openstack-$OPV/rdo-release-${OPV}.rpm -y
+yum install -y centos-release-openstack-${OPV}
+
+# 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 mongodb repo
+cat <<EOF >/etc/yum.repos.d/mongodb.repo
+[mongodb]
+name=MongoDB Repository
+baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
+gpgcheck=0
+enabled=1
+EOF
+
+# 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
+
+rm -rf /etc/yum.repos.d/CentOS-Ceph-Jewel.repo
+#raw
+cat <<EOF >>/etc/yum.repos.d/CentOS-Ceph-Hammer.repo
+# CentOS-Ceph-Hammer.repo
+#
+# Please see http://wiki.centos.org/SpecialInterestGroup/Storage for more
+# information
+
+[centos-ceph-hammer]
+name=CentOS-\$releasever - Ceph Hammer
+baseurl=http://mirror.centos.org/centos/\$releasever/storage/\$basearch/ceph-hammer/
+gpgcheck=1
+enabled=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage
+
+[centos-ceph-hammer-test]
+name=CentOS-\$releasever - Ceph Hammer Testing
+baseurl=http://buildlogs.centos.org/centos/\$releasever/storage/\$basearch/ceph-hammer/
+gpgcheck=0
+enabled=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage
+
+[centos-ceph-hammer-debuginfo]
+name=CentOS-\$releasever - Ceph Hammer DebugInfo
+baseurl=http://debuginfo.centos.org/centos/\$releasever/storage/\$basearch/
+gpgcheck=1
+enabled=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage
+
+[centos-ceph-hammer-source]
+name=CentOS-\$releasever - Ceph Hammer Source
+baseurl=http://vault.centos.org/centos/\$releasever/storage/Source/ceph-hammer/
+gpgcheck=1
+enabled=0
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage
+EOF
+#end raw
+
+cat <<EOF >>/etc/yum.conf
+exclude=mongodb-org,mongodb-org-server
+EOF
+
+yum update -y
+yum install createrepo tar -y
+rpm --import 'https://download.ceph.com/keys/release.asc'
+
+yum -y install --downloadonly MariaDB-Galera-server
+#download packages
+#set packages = $getVar('default_packages', [])
+yum -y install --skip-broken --downloadonly #echo ' '.join(packages)
+#set packages = $getVar('packages', [])
+#silent packages.pop(packages.index('MariaDB-Galera-server'))
+yum -y install --skip-broken --downloadonly #echo ' '.join(packages)
+
+#make repo
+mkdir -p /centos7-$OPV-ppa/{Packages,repodata}
+
+find /var/cache/yum/ -name "*.rpm" | xargs -i cp {} /centos7-$OPV-ppa/Packages/
+
+rm /centos7-$OPV-ppa/Packages/selinux-policy* -f
+rm /centos7-$OPV-ppa/Packages/systemd* -f
+
+mv /epel-release-7-5.noarch.rpm /centos7-$OPV-ppa/Packages/
+cp /comps.xml /centos7-$OPV-ppa/
+cp /ceph_key_release.asc /centos7-$OPV-ppa/
+createrepo -g comps.xml /centos7-$OPV-ppa
+mkdir /centos7-$OPV-ppa/noarch
+mkdir /centos7-$OPV-ppa/noarch/Packages
+cp -r /centos7-$OPV-ppa/Packages/ceph* /centos7-$OPV-ppa/noarch/Packages/
+cp -r /centos7-$OPV-ppa/repodata/ /centos7-$OPV-ppa/noarch/
+tar -zcvf /centos7-$OPV-ppa.tar.gz /centos7-$OPV-ppa
+