summaryrefslogtreecommitdiffstats
path: root/build/templates
diff options
context:
space:
mode:
Diffstat (limited to 'build/templates')
-rw-r--r--build/templates/Debian_juno.tmpl45
-rw-r--r--build/templates/Debian_kilo.tmpl43
-rw-r--r--build/templates/RedHat_juno.tmpl53
-rw-r--r--build/templates/compass_core.tmpl23
4 files changed, 164 insertions, 0 deletions
diff --git a/build/templates/Debian_juno.tmpl b/build/templates/Debian_juno.tmpl
new file mode 100644
index 00000000..2f88cb2e
--- /dev/null
+++ b/build/templates/Debian_juno.tmpl
@@ -0,0 +1,45 @@
+#!/bin/bash
+set -ex
+
+# add openstack juno repo
+sudo apt-get update && apt-get install -y software-properties-common
+sudo add-apt-repository -y cloud-archive:juno
+
+# 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-juno-ppa/conf
+cat <<EOF > trusty-juno-ppa/conf/distributions
+Codename: trusty
+Components: main
+Architectures: amd64
+EOF
+
+mkdir deb
+find /var/cache/apt/ -name *.deb | xargs -i cp {} deb
+
+reprepro -b trusty-juno-ppa includedeb trusty deb/*.deb
+
+tar -zcvf /trusty-juno-ppa.tar.gz ./trusty-juno-ppa
diff --git a/build/templates/Debian_kilo.tmpl b/build/templates/Debian_kilo.tmpl
new file mode 100644
index 00000000..223173b5
--- /dev/null
+++ b/build/templates/Debian_kilo.tmpl
@@ -0,0 +1,43 @@
+#!/bin/bash
+set -ex
+
+# add openstack kilo repo
+sudo apt-get update && apt-get install -y software-properties-common
+sudo add-apt-repository -y cloud-archive:kilo
+
+# add galeracluster repo
+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-kilo-ppa/conf
+cat <<EOF > trusty-kilo-ppa/conf/distributions
+Codename: trusty
+Components: main
+Architectures: amd64
+EOF
+
+mkdir deb
+find /var/cache/apt/ -name *.deb | xargs -i cp {} deb
+
+reprepro -b trusty-kilo-ppa includedeb trusty deb/*.deb
+
+tar -zcvf /trusty-kilo-ppa.tar.gz ./trusty-kilo-ppa
diff --git a/build/templates/RedHat_juno.tmpl b/build/templates/RedHat_juno.tmpl
new file mode 100644
index 00000000..8efd23b8
--- /dev/null
+++ b/build/templates/RedHat_juno.tmpl
@@ -0,0 +1,53 @@
+#!/bin/bash
+set -x
+
+# add 163 repo
+yum install wget -y
+wget -O /etc/yum.repos.d/CentOS7-Base-163.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
+yum remove wget iptables-services -y
+rm -f /etc/yum.repos.d/CentOS-*.repo
+yum repolist
+yum cleanall
+# add openstack juno 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-juno/rdo-release-juno.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
+
+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-juno-ppa/{Packages,repodata}
+
+find /var/cache/yum/ -name *.rpm | xargs -i cp {} /centos7-juno-ppa/Packages/
+
+rm /centos7-juno-ppa/Packages/selinux-policy* -f
+rm /centos7-juno-ppa/Packages/systemd* -f
+
+cp /centos7-comps.xml /centos7-juno-ppa/
+createrepo -g centos7-comps.xml /centos7-juno-ppa
+tar -zcvf /centos7-juno-ppa.tar.gz /centos7-juno-ppa
diff --git a/build/templates/compass_core.tmpl b/build/templates/compass_core.tmpl
new file mode 100644
index 00000000..9c88cc4f
--- /dev/null
+++ b/build/templates/compass_core.tmpl
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -x
+yum install tar -y
+
+#download packages
+#set packages = $getVar('default_packages', [])
+#for pkg in $packages
+yum -y install $pkg
+#end for
+#set packages = $getVar('packages', [])
+#for pkg in $packages
+yum -y install $pkg
+#end for
+
+#make repo
+
+mkdir -p /centos6-package
+
+find /var/cache/yum/ -name *.rpm | xargs -i cp {} /centos6-package
+
+find /centos6-package -size 0 -name *.rpm | xargs rm -f
+
+tar -zcvf /centos6-package.tar.gz /centos6-package