diff options
author | shuai chen <chenshuai@huawei.com> | 2015-12-02 01:20:22 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2015-12-02 01:20:22 +0000 |
commit | 59f12c1119da51446dcddc84c903e385645632e5 (patch) | |
tree | e4e58abbaf13feae8bdd6c781b527022b33442b4 /build/templates | |
parent | 59450840d28991bef93ffe893fd5cde4173c1ad2 (diff) | |
parent | e93d595baf9b3fbbc0ec213ad725ce438772d8a4 (diff) |
Merge "support libverty on ubuntu"
Diffstat (limited to 'build/templates')
-rw-r--r-- | build/templates/Debian_liberty.tmpl | 49 | ||||
-rw-r--r-- | build/templates/RedHat_liberty.tmpl | 83 |
2 files changed, 132 insertions, 0 deletions
diff --git a/build/templates/Debian_liberty.tmpl b/build/templates/Debian_liberty.tmpl new file mode 100644 index 00000000..ede5b51f --- /dev/null +++ b/build/templates/Debian_liberty.tmpl @@ -0,0 +1,49 @@ +#!/bin/bash +set -ex + +# add openstack liberty repo +sudo apt-get update && apt-get install -y software-properties-common +sudo add-apt-repository -y cloud-archive:liberty + +# add galeracluster repo +#sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db +#sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu trusty main' +sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 D669017EBC19DDBA +sudo add-apt-repository 'deb http://releases.galeracluster.com/ubuntu trusty main' +# add oracle java8 ppa +sudo add-apt-repository ppa:webupd8team/java +# add open java7 repo +sudo add-apt-repository 'deb http://security.ubuntu.com/ubuntu trusty-security main' + +sudo apt-get update + +sudo apt-get install reprepro -y + +#download packages +#set packages = $getVar('default_packages', []) +#for pkg in $packages +sudo apt-get -d install $pkg -y +#end for +#set packages = $getVar('packages', []) +#for pkg in $packages +sudo apt-get -d install $pkg -y +#end for + +#make repo +mkdir -p trusty-liberty-ppa/conf +cat <<EOF > trusty-liberty-ppa/conf/distributions +Codename: trusty +Components: main +Architectures: amd64 +EOF + +sudo apt-get install wget +wget -O /var/cache/apt/python-pyasn1_0.1.8-2_all.deb http://us.archive.ubuntu.com/ubuntu/pool/main/p/pyasn1/python-pyasn1_0.1.8-2_all.deb +rm -rf /var/cache/apt/python-pyasn1_0.1.7-1ubuntu2_all.deb + +mkdir deb +find /var/cache/apt/ -name *.deb | xargs -i cp {} deb + +reprepro -b trusty-liberty-ppa includedeb trusty deb/*.deb + +tar -zcvf /trusty-liberty-ppa.tar.gz ./trusty-liberty-ppa diff --git a/build/templates/RedHat_liberty.tmpl b/build/templates/RedHat_liberty.tmpl new file mode 100644 index 00000000..8473f070 --- /dev/null +++ b/build/templates/RedHat_liberty.tmpl @@ -0,0 +1,83 @@ +#!/bin/bash +set -x + +yum remove systemd -y +# add 163 repo +#rm -f /etc/yum.repos.d/CentOS-*.repo +yum repolist +yum clean all +# add openstack liberty 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-liberty/rdo-release-liberty.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 + +yum update -y +yum install createrepo tar -y + +yum -y install --downloadonly MariaDB-Galera-server +#download packages +#set packages = $getVar('default_packages', []) +yum -y install --downloadonly #echo ' '.join(packages) +#set packages = $getVar('packages', []) +#silent packages.pop(packages.index('MariaDB-Galera-server')) +yum -y install --downloadonly #echo ' '.join(packages) + +#make repo +mkdir -p /centos7-liberty-ppa/{Packages,repodata} + +find /var/cache/yum/ -name "*.rpm" | xargs -i cp {} /centos7-liberty-ppa/Packages/ + +rm /centos7-liberty-ppa/Packages/selinux-policy* -f +rm /centos7-liberty-ppa/Packages/systemd* -f + +mv /epel-release-7-5.noarch.rpm /centos7-liberty-ppa/Packages/ +cp /comps.xml /centos7-liberty-ppa/ +cp /ceph_key_release.asc /centos7-liberty-ppa/ +createrepo -g comps.xml /centos7-liberty-ppa +mkdir /centos7-liberty-ppa/noarch +mkdir /centos7-liberty-ppa/noarch/Packages +cp -r /centos7-liberty-ppa/Packages/ceph* /centos7-liberty-ppa/noarch/Packages/ +cp -r /centos7-liberty-ppa/repodata/ /centos7-liberty-ppa/noarch/ +tar -zcvf /centos7-liberty-ppa.tar.gz /centos7-liberty-ppa |